svn path=/trunk/; revision=186
linkinfo="$(urlsafe "$info")"
-if [ "${_COOKIE[fakemp4]}" = yes ] && [ "${info##*.}" != mp4 ]; then
- [ -e "${_DATA}/videos/${info%.*}.mp4" ] || ln -s "${_DATA}/videos/$info" "${_DATA}/mp4/${info%.*}.mp4"
- videourl="$(urlsafe "mp4/${info%.*}.mp4")"
+if [ "${_COOKIE[fakemp4]}" = yes ]; then
+ fakename="$(printf %s "${info}" |sed -r 's;.*/;;g; s;.[^.]+$;;; s;\.;_;g;')"
+ if [ "$info" != "${fakename}.mp4" ]; then
+ [ -e "${_DATA}/mp4/${fakename}.mp4" ] || ln -s "${_DATA}/videos/$info" "${_DATA}/mp4/${fakename}.mp4"
+ videourl="$(urlsafe "mp4/${fakename}.mp4")"
+ fi
elif [ -n "$foreign" ]; then
_COOKIE[watch]=server
videourl="${_GET[url]}"