Ticket #2472: mythburn.py.patch

File mythburn.py.patch, 1.9 KB (added by lofty69@…, 13 years ago)
  • mythburn.py

    old new  
    3131#******************************************************************************
    3232
    3333# version of script - change after each update
    34 VERSION="0.1.20060924-1"
     34VERSION="0.1.20060926-1"
    3535
    3636
    3737##You can use this debug flag when testing out new themes
     
    101101encodetoac3 = False
    102102alwaysRunMythtranscode = False
    103103copyremoteFiles = False
     104thumboffset = 10
     105usebookmark = True
    104106
    105107#main menu aspect ratio (4:3 or 16:9)
    106108mainmenuAspectRatio = "16:9"
     
    460462    while count<=numofchapters:
    461463        chapters+=time.strftime("%H:%M:%S",time.gmtime(starttime))
    462464
    463         thumbList+="%s," % starttime
     465        if starttime==0:
     466            thumbList+="%s," % thumboffset
     467        else:
     468            thumbList+="%s," % starttime
    464469
    465470        if numofchapters>1:
    466471            chapters+=","
     
    28732878    return True
    28742879
    28752880def processFile(file, folder):
     2881    from shutil import copy
     2882
    28762883    """Process a single video/recording file ready for burning."""
    28772884
    28782885    write( "*************************************************************")
     
    30553062    assert doesFileExist(os.path.join(folder,'stream0.ac3'))
    30563063    #assert doesFileExist(os.path.join(folder,'stream1.ac3'))
    30573064
    3058     extractVideoFrame(os.path.join(folder,"stream.mv2"), os.path.join(folder,"thumbnail.jpg"), 0)
     3065    if file.attributes["type"].value == "recording" and usebookmark == True:
     3066        copy(os.path.join(recordingpath, file.attributes["filename"].value + ".png"),os.path.join(folder,"thumbnail.jpg"))
     3067    else:
     3068        extractVideoFrame(os.path.join(folder,"stream.mv2"), os.path.join(folder,"thumbnail.jpg"), thumboffset)
    30593069
    30603070    write( "*************************************************************")
    30613071    write( "Finished processing file " + file.attributes["filename"].value)