Ticket #8438: mythburn.chapter_comma.patch

File mythburn.chapter_comma.patch, 1.4 KB (added by Raymond Wagner, 14 years ago)

completely untested, but should probably work... maybe...

  • mythplugins/mytharchive/mythburn/scripts/mythburn.py

     
    732732
    733733    write( "Video length is %s seconds. Each chapter will be %s seconds" % (lengthofvideo,segment))
    734734
    735     chapters=""
     735    chapters=[]
    736736
    737     thumbList=""
     737    thumbList=[]
    738738    starttime=0
    739739    count=1
    740740    while count<=numofchapters:
    741         chapters+=time.strftime("%H:%M:%S",time.gmtime(starttime))
     741        chapters.append(time.strftime("%H:%M:%S",time.gmtime(starttime)))
    742742
    743743        if starttime==0:
    744744            if thumboffset < segment:
    745                 thumbList+="%s," % thumboffset
     745                thumbList.append(thumboffset)
    746746            else:
    747                 thumbList+="%s," % starttime
     747                thumbList.append(starttime)
    748748        else:
    749             thumbList+="%s," % starttime
     749            thumbList.append(starttime)
    750750
    751         if numofchapters>1:
    752             chapters+=","
    753 
    754751        starttime+=segment
    755752        count+=1
    756753
     754    chapters = ','.join(chapters)
     755    thumblist = ','.join(thumblist)
     756
    757757    if getthumbnails==True:
    758758        extractVideoFrames( os.path.join(getItemTempPath(itemnum),"stream.mv2"),
    759759            os.path.join(getItemTempPath(itemnum),"chapter-%1.jpg"), thumbList)