From d5aa61e2acb0f6adb7bb62d71f47ca4a653d24e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 28 Oct 2021 16:49:21 +0200 Subject: [PATCH] simple UI messages about transcoding status --- page_video.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/page_video.sh b/page_video.sh index 7fda30f..e69089e 100755 --- a/page_video.sh +++ b/page_video.sh @@ -121,6 +121,24 @@ elif [ "$CHANNEL_ID" -a "$VIDEO_ID" -a -f "$VIDEO_FILE" ]; then "$_BASE" "$CHANNEL_ID" "$VIDEO_ID" \ "The video has not yet been transcoded and may not be displayed correctly." )] + $([ ! -f "$VIDEO_MP4" -a ! -f "$VIDEO_WEBM" ] && { + read file <"$_DATA/transcoding.queue" + if [ "$file" = "$VIDEO_FILE" ]; then + printf '[div .transcoding . This video is currently being + converted to various publishing formats. It may not be + rendered correctly until the conversion is finished.]' + elif grep -qFx "$VIDEO_FILE" "${_DATA}/transcoding.queue"; then + printf '[div .transcoding . This video is not yet converted to a + suitable publishing format. It may not be rendered + correctly until the conversion is finished. The conversion + will start automatically once previous jobs have been + finished.]' + else + printf '[div .transcoding Publishing formats do not seem to be + available for this video. It may be possible that the + uploaded file is broken and cannot be transcoded.]' + fi + }) $(AUTHOR && printf '[a .button href="edit" edit]') [h1 .name $(HTML "$VIDEO_NAME")] [div .description . ${VIDEO_DESCR_CACHE}] -- 2.39.2