Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple-Autoplay theme -> no preview images #673

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions mythplugins/mytharchive/mythburn/scripts/mythburn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4695,18 +4695,19 @@ def doProcessFile(file, folder, count):
# check if we need to convert any of the audio streams to ac3
processAudio(folder)

# if we don't already have one find a title thumbnail image
titleImage = os.path.join(folder, "title.jpg")
if not os.path.exists(titleImage):
# if the file is a recording try to use its preview image for the thumb
if file.attributes["type"].value == "recording":
previewImage = file.attributes["filename"].value + ".png"
if usebookmark == True and os.path.exists(previewImage):
copy(previewImage, titleImage)
# if necessary and we don't already have one, find a title thumbnail image
if wantMainMenu:
titleImage = os.path.join(folder, "title.jpg")
if not os.path.exists(titleImage):
# if the file is a recording try to use its preview image for the thumb
if file.attributes["type"].value == "recording":
previewImage = file.attributes["filename"].value + ".png"
if usebookmark == True and os.path.exists(previewImage):
copy(previewImage, titleImage)
else:
extractVideoFrame(os.path.join(folder, "stream.mv2"), titleImage, thumboffset)
else:
extractVideoFrame(os.path.join(folder, "stream.mv2"), titleImage, thumboffset)
else:
extractVideoFrame(os.path.join(folder, "stream.mv2"), titleImage, thumboffset)

write( "*************************************************************")
write( "Finished processing '%s'" % file.attributes["filename"].value)
Expand Down