X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=page_video.sh;h=7fda30ff267a0c463071b85fc6b6c7f49223af3f;hb=46dd851ef09fcb3c7b68ba2278b7ce443c72a8e0;hp=74e03e60b5e5055f63a6a77ef98cd720a6f80383;hpb=45879706651a39f9456af903f27f68f7e6ca08ad;p=rawnet diff --git a/page_video.sh b/page_video.sh index 74e03e6..7fda30f 100755 --- a/page_video.sh +++ b/page_video.sh @@ -5,8 +5,8 @@ includepage_video="$0" . "$_EXEC/db_channel.sh" . "$_EXEC/db_video.sh" -. "$_EXEC/widgets.sh" . "$_EXEC/upload.sh" +. "$_EXEC/transcoding.sh" read_channel "$channel" read_video "$video" @@ -37,7 +37,8 @@ read_video "$video" elif [ "$(POST delconfirm)" != confirm ]; then REDIRECT "${_BASE}/channel/$CHANNEL_ID/$VIDEO_ID/#ERROR_NOT_CONFIRMED" elif delete_video "$VIDEO_ID"; then - rm -f -- "$VIDEO_FILE" "$VIDEO_THUMB" "$VIDEO_MP4" "$VIDEO_WEBM" + rm -f -- "$VIDEO_FILE" "$VIDEO_THUMB" "$VIDEO_MP4" "$VIDEO_WEBM" \ + "${VIDEO_MP4%.mp4}".*.mp4 "${VIDEO_WEBM%.webm}".*.webm REDIRECT "${_BASE}/channel/$CHANNEL_ID/#DELETE_CONFIRM" else REDIRECT "${_BASE}/channel/$CHANNEL_ID/$VIDEO_ID/#ERROR_UPDATE_NOLOCK" @@ -53,6 +54,7 @@ if [ "$REQUEST_METHOD" = POST -a "$CHANNEL_ID" -a "$VIDEO_ID" ]; then head -c "$CONTENT_LENGTH" >/dev/null REDIRECT "${_BASE}/channel/$CHANNEL_ID/$VIDEO_ID/#ERROR_UPLOAD_NOCLOBBER" elif UPLOAD "$VIDEO_FILE"; then + transcode "$VIDEO_FILE" REDIRECT "${_BASE}/channel/$CHANNEL_ID/$VIDEO_ID/edit" fi fi