Ticket #4537: mythburn-addtitletodvd.diff

File mythburn-addtitletodvd.diff, 2.8 KB (added by thrantastic@…, 12 years ago)

Sets DVD and ISO title to the title of video instead of 'MythTV DVD'

  • mythburn.py

    old new  
    21902190#############################################################
    21912191# Creates an ISO image from the contents of a directory
    21922192
    2193 def CreateDVDISO():
     2193def CreateDVDISO(title):
    21942194    write("Creating ISO image")
    21952195    checkCancelFlag()
    21962196    result = os.spawnlp(os.P_WAIT, path_mkisofs[0], path_mkisofs[1], '-dvd-video', \
    2197         '-V','MythTV BurnDVD','-o',os.path.join(getTempPath(),'mythburn.iso'), \
     2197        '-V',title,'-o',os.path.join(getTempPath(),'mythburn.iso'), \
    21982198        os.path.join(getTempPath(),'dvd'))
    21992199
    22002200    if result<>0:
     
    22052205#############################################################
    22062206# Burns the contents of a directory to create a DVD
    22072207
    2208 def BurnDVDISO():
     2208def BurnDVDISO(title):
    22092209    write( "Burning ISO image to %s" % dvddrivepath)
    22102210    checkCancelFlag()
    22112211
     
    22222222                if drivespeed != 0:
    22232223                    command += "-speed=%d " % drivespeed
    22242224                command += " -use-the-force-luke -Z " + dvddrivepath
    2225                 command += " -dvd-video -V 'MythTV DVD' "
     2225                command += " -dvd-video -V " + title + " "
    22262226                command += os.path.join(getTempPath(),'dvd')
    22272227            else:
    22282228                command = path_growisofs[0] + " -dvd-compat "
    22292229                if drivespeed != 0:
    22302230                    command += "-speed=%d " % drivespeed
    2231                 command += " -Z " + dvddrivepath + " -dvd-video -V 'MythTV DVD' "
     2231                command += " -Z " + dvddrivepath + " -dvd-video -V " + title + " "
    22322232                command += os.path.join(getTempPath(),'dvd')
    22332233
    22342234            write(command)
     
    45254525            #Now all the files are completed and ready to be burnt
    45264526            runDVDAuthor()
    45274527
     4528            #Get DVD title from first processed file
     4529            #Get the XML containing information about this item
     4530            infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(1),"info.xml") )
     4531            #Error out if its the wrong XML
     4532            if infoDOM.documentElement.tagName != "fileinfo":
     4533                fatalError("The info.xml file (%s) doesn't look right" % os.path.join(folder,"info.xml"))
     4534            title = expandItemText(infoDOM,"%title",1,0,0,0,0)
     4535            title = title[:32]
     4536
    45284537            #Create the DVD ISO image
    45294538            if docreateiso == True or mediatype == FILE:
    4530                 CreateDVDISO()
     4539                CreateDVDISO(title)
    45314540
    45324541            #Burn the DVD ISO image
    45334542            if doburn == True and mediatype != FILE:
    4534                 BurnDVDISO()
     4543                BurnDVDISO(title)
    45354544
    45364545            #Move the created iso image to the given location
    45374546            if mediatype == FILE and savefilename != "":