Ticket #5247: count.diff

File count.diff, 4.2 KB (added by myth@…, 16 years ago)
  • mythburn.py

     
    17501750#############################################################
    17511751# Pre-process a single video/recording file
    17521752
    1753 def preProcessFile(file, folder):
     1753def preProcessFile(file, folder, count):
    17541754    """Pre-process a single video/recording file."""
    17551755
    1756     write( "Pre-processing file '" + file.attributes["filename"].value + \
    1757            "' of type '"+ file.attributes["type"].value+"'")
     1756    write( "Pre-processing %s %d: '%s'" % (file.attributes["type"].value, count, file.attributes["filename"].value))
    17581757
    17591758    #As part of this routine we need to pre-process the video:
    17601759    #1. check the file actually exists
     
    45924591# process a single file ready for burning using either
    45934592# mythtranscode/mythreplex or ProjectX as the cutter/demuxer
    45944593
    4595 def processFile(file, folder):
     4594def processFile(file, folder, count):
    45964595    """Process a single video/recording file ready for burning."""
    45974596
    45984597    if useprojectx:
    4599         doProcessFileProjectX(file, folder)
     4598        doProcessFileProjectX(file, folder, count)
    46004599    else:
    4601         doProcessFile(file, folder)
     4600        doProcessFile(file, folder, count)
    46024601
    46034602#############################################################
    46044603# process a single file ready for burning using mythtranscode/mythreplex
    46054604# to cut and demux
    46064605
    4607 def doProcessFile(file, folder):
     4606def doProcessFile(file, folder, count):
    46084607    """Process a single video/recording file ready for burning."""
    46094608
    46104609    write( "*************************************************************")
    4611     write( "Processing file " + file.attributes["filename"].value + " of type " + file.attributes["type"].value)
     4610    write( "Processing %s %d: '%s'" % (file.attributes["type"].value, count, file.attributes["filename"].value))
    46124611    write( "*************************************************************")
    46134612
    46144613    #As part of this routine we need to pre-process the video this MAY mean:
     
    48084807            extractVideoFrame(os.path.join(folder, "stream.mv2"), titleImage, thumboffset)
    48094808
    48104809    write( "*************************************************************")
    4811     write( "Finished processing file " + file.attributes["filename"].value)
     4810    write( "Finished processing '%s'" % file.attributes["filename"].value)
    48124811    write( "*************************************************************")
    48134812
    48144813
     
    48204819    """Process a single video/recording file ready for burning."""
    48214820
    48224821    write( "*************************************************************")
    4823     write( "Processing file " + file.attributes["filename"].value + " of type " + file.attributes["type"].value)
     4822    write( "Processing %s %d: '%s'" % (file.attributes["type"].value, count, file.attributes["filename"].value))
    48244823    write( "*************************************************************")
    48254824
    48264825    #As part of this routine we need to pre-process the video this MAY mean:
     
    49774976            extractVideoFrame(os.path.join(folder, "stream.mv2"), titleImage, thumboffset)
    49784977
    49794978    write( "*************************************************************")
    4980     write( "Finished processing file " + file.attributes["filename"].value)
     4979    write( "Finished processing file '%s'" % file.attributes["filename"].value)
    49814980    write( "*************************************************************")
    49824981
    49834982#############################################################
     
    51095108                        os.rmdir (folder)
    51105109                    os.makedirs(folder)
    51115110                #Do the pre-process work
    5112                 preProcessFile(node,folder)
     5111                preProcessFile(node,folder,filecount)
    51135112
    51145113            if debug_secondrunthrough==False:
    51155114                #Loop through all the files again but this time do more serious work!
     
    51195118                    folder=getItemTempPath(filecount)
    51205119
    51215120                    #Process this file
    5122                     processFile(node,folder)
     5121                    processFile(node,folder,filecount)
    51235122
    51245123            #We can only create the menus after the videos have been processed
    51255124            #and the commercials cut out so we get the correct run time length