Re: [Freevo-devel] [Patches] fixes required for CD-burn plugin to function again (rel 1 brach)
On 1/23/07, mike lewis <[EMAIL PROTECTED]> wrote: On 1/23/07, Duncan Webb <[EMAIL PROTECTED]> wrote: > mike lewis wrote: > > On 1/22/07, mike lewis <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> Been a while since I submitted a patch. Just tried to do this on SF > >> but get the following error: > >> > >> > >> ERROR > >> > >> Artifact: This ArtifactType Does Not Allow Anonymous Submissions. > >> Please Login. > >> > >> I'm not a sf user so can't do that! ;-) > >> > >> --- > >> CD BURN currently crashes when config is run. This is fixed with the > >> following crash. Not sure what happen or why it ever worked without > >> this ;-). > >> > >> One option is to remove the fruity stuff. But, as I wrote it, and I > >> like it, my patch is the other option, (fix the freevo core to allow > >> code other than x=y in the config procedure). > >> > >> FILE = helper.patch > >> > >> Now that it's no longer crashing, we can make use of that fruity stuff > >> in config(). To do this, the defaults need to be removed from > >> freevo_conf.py. Don't worry. config() will add them in again... > >> > >> FILE = freevo_config.patch > >> > >> CD Burn was not burning DVD's. I've had a quick hack at the code to > >> fix the crash's one experiences when attempting to burn a DVD. I've > >> just successfully burned a DVD in growisofs mode (iso file). However, > >> after I wrote the code to use CDBurn for iso's I realised my version > >> of cdburn doesn't support DVD's. What the?? For other users they now > >> have an option of using the nice autofeatures in config() and thus > >> auto discovered device's that cdburn gives you. Or, if your like me, > >> and using ubuntu edgy, your have to set the "use growisofs" are right > >> now your device i hard coded. > >> > >> FILE = cd_burn.patch > >> --- > > So before i go to bed I may as well make the device growisofs uses a > > config option instead of hard coded. So here is an update to the > > previous patch for cd_burn which does all of the above. > > > > Cheers, > > M > > Hi Mike, > > Sorry but you cd_burn patches wont apply. They need to be done against > the latest svn version. > OK. Done. Attached [snip] Index: freevo/freevo/src/plugins/cd_burn.py === --- freevo/freevo/src/plugins/cd_burn.py (revision 9165) +++ freevo/freevo/src/plugins/cd_burn.py (working copy) @@ -183,58 +183,35 @@ def burn_dvd_video(self): _debug_('burn_dvd_video(self)') """ -copy this DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO ALREADY!!! (ie ripped with dvdcopy.py) +copy this file/DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO ALREADY!!! (ie ripped with dvdcopy.py) """ +self.file_to_burn=None name = self.files[0].split("/") self.name = name[len(name) -1] _debug_('self.name = %s' % self.name) -dir = self.files[0] -self.dir = dir + "/" +self.dir = self.files[0] _debug_('self.dir = %s ' % self.dir) -for f in os.listdir(self.dir): -pathname = os.path.join(self.dir, f) -_debug_('%s ' % pathname[-3:]) -if pathname[-3:].lower() == '_ts': -_debug_('would not delete %s' %pathname) -self.file_to_delete = None -else: -_debug_('would delete %s' % pathname) -#self.file_to_delete.append(pathname) -self.file_to_delete = pathname - -if self.file_to_delete: -ConfirmBox(text=_('Delete %s?' % self.file_to_delete ), - handler=self.delete_now, default_choice=0).show() +if self.name.endswith('.iso'): +self.file_to_burn=self.dir else: +self.subdirs = util.getdirnames(self.dir, softlinks=False) +for dir in self.subdirs: +pathname = os.path.join(self.dir, f) +_debug_('%s ' % pathname[-3:]) +if pathname[-3:].lower() == '_ts': +_debug_('OK TO BURN, folder DVD compliant %s' %pathname) +self.file_to_burn = pathname +else: +_debug_('NOT OK to BURN, folder NOT DVD compliant: %s' % pathname) +self.file_to_burn = None + +if self.file_to_burn: ConfirmBox(text=_('Insert media then click OK'), handler=self.start_burning, default_choice=0 ).show() return -def delete_now (self, arg=None, menuw=None): -_debug_('delete_now (self, arg=None, menuw=None)') -""" -Called by burn_dvd_video to remove anything it sees fit.. I think -freevo should have a file op for this but it doesn't (that i can find). -""" -for a in self.files_to_delete: -try: -mode = os.stat(a)[ST_MODE] -if S_ISDIR(mode):
Re: [Freevo-devel] [Patches] fixes required for CD-burn plugin to function again (rel 1 brach)
On 1/23/07, Duncan Webb <[EMAIL PROTECTED]> wrote: > mike lewis wrote: > > On 1/22/07, mike lewis <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> Been a while since I submitted a patch. Just tried to do this on SF > >> but get the following error: > >> > >> > >> ERROR > >> > >> Artifact: This ArtifactType Does Not Allow Anonymous Submissions. > >> Please Login. > >> > >> I'm not a sf user so can't do that! ;-) > >> > >> --- > >> CD BURN currently crashes when config is run. This is fixed with the > >> following crash. Not sure what happen or why it ever worked without > >> this ;-). > >> > >> One option is to remove the fruity stuff. But, as I wrote it, and I > >> like it, my patch is the other option, (fix the freevo core to allow > >> code other than x=y in the config procedure). > >> > >> FILE = helper.patch > >> > >> Now that it's no longer crashing, we can make use of that fruity stuff > >> in config(). To do this, the defaults need to be removed from > >> freevo_conf.py. Don't worry. config() will add them in again... > >> > >> FILE = freevo_config.patch > >> > >> CD Burn was not burning DVD's. I've had a quick hack at the code to > >> fix the crash's one experiences when attempting to burn a DVD. I've > >> just successfully burned a DVD in growisofs mode (iso file). However, > >> after I wrote the code to use CDBurn for iso's I realised my version > >> of cdburn doesn't support DVD's. What the?? For other users they now > >> have an option of using the nice autofeatures in config() and thus > >> auto discovered device's that cdburn gives you. Or, if your like me, > >> and using ubuntu edgy, your have to set the "use growisofs" are right > >> now your device i hard coded. > >> > >> FILE = cd_burn.patch > >> --- > > So before i go to bed I may as well make the device growisofs uses a > > config option instead of hard coded. So here is an update to the > > previous patch for cd_burn which does all of the above. > > > > Cheers, > > M > > Hi Mike, > > Sorry but you cd_burn patches wont apply. They need to be done against > the latest svn version. > Oh. I didn't realise this. I thought because I was changing files that are fairly static, (helpers/plugins.py & plugins/cd_burn.py) that they would apply. As for the freevo_config.py. I figured you would just delete the offending lines, as the plugin will in all cases set the defaults, no entry is required in freevo_config.py. But, I also thought I didn't quite have the "right" to send in a patch removing the whole cd_burn section from the master config file.. That being said. This is another issue which I'd like to discuss. I discovered when fixing this stuff that an entry in freevo_conf.py will override the defaults that the config() function will offer. THis means in all cases the plugins defaults are overridden by freevo's defaults. And then the local_config.py will override freevo's defaults. I think we should try to stick with the old way. Freevo core settings are in freevo_config.py. Plugins set there own defaults. And local_config.py overwrite either the plugins or freevo core settings. > Just have a look at the contributing section in the wiki. > http://freevo.sourceforge.net/cgi-bin/doc/Contributing#head-9ec333e919eefa9afe3b19d417596d388a209b6d > OK. It will be a week or so as I'm going on a camping trip! Yay. > You don't need to add imports to helpers/plugins.py if they are not used > in this module and they don't seem to be. > When issuing: freevo helpers cd_burn -i The cdburn plugin will crash on both no time and no popen2. This is because both these are used by the config() function and for some reason they are not available to the plugin when called by helpers; even though the plugin itself imports them. Is this my system only? I was under the impression everyone was expienceing crashes when trying to run helpers cdburn -i. If I'm right. I don't understand why. I wrote that function back in freevo 1.5 days. And it worked fine back then. But it don't work fine without the imports. The other option is to remove the (fantastic) code that autodetects the cdburn device. I love this code. As it's the first magic I added freevo ;-). But if you guys don't want to change helpers then it won't work and users will have to do without the magic. Mike [snip] - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel
Re: [Freevo-devel] [Patches] fixes required for CD-burn plugin to function again (rel 1 brach)
mike lewis wrote: > On 1/22/07, mike lewis <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Been a while since I submitted a patch. Just tried to do this on SF >> but get the following error: >> >> >> ERROR >> >> Artifact: This ArtifactType Does Not Allow Anonymous Submissions. >> Please Login. >> >> I'm not a sf user so can't do that! ;-) >> >> --- >> CD BURN currently crashes when config is run. This is fixed with the >> following crash. Not sure what happen or why it ever worked without >> this ;-). >> >> One option is to remove the fruity stuff. But, as I wrote it, and I >> like it, my patch is the other option, (fix the freevo core to allow >> code other than x=y in the config procedure). >> >> FILE = helper.patch >> >> Now that it's no longer crashing, we can make use of that fruity stuff >> in config(). To do this, the defaults need to be removed from >> freevo_conf.py. Don't worry. config() will add them in again... >> >> FILE = freevo_config.patch >> >> CD Burn was not burning DVD's. I've had a quick hack at the code to >> fix the crash's one experiences when attempting to burn a DVD. I've >> just successfully burned a DVD in growisofs mode (iso file). However, >> after I wrote the code to use CDBurn for iso's I realised my version >> of cdburn doesn't support DVD's. What the?? For other users they now >> have an option of using the nice autofeatures in config() and thus >> auto discovered device's that cdburn gives you. Or, if your like me, >> and using ubuntu edgy, your have to set the "use growisofs" are right >> now your device i hard coded. >> >> FILE = cd_burn.patch >> --- > So before i go to bed I may as well make the device growisofs uses a > config option instead of hard coded. So here is an update to the > previous patch for cd_burn which does all of the above. > > Cheers, > M Hi Mike, Sorry but you cd_burn patches wont apply. They need to be done against the latest svn version. Just have a look at the contributing section in the wiki. http://freevo.sourceforge.net/cgi-bin/doc/Contributing#head-9ec333e919eefa9afe3b19d417596d388a209b6d You don't need to add imports to helpers/plugins.py if they are not used in this module and they don't seem to be. Duncan >> >> There you go. Have fun. >> >> Mick >> >> >> > > > > --- /mnt/hdb1/build/freevo/freevo/freevo/src/plugins/cd_burn.py > 2007-01-02 20:13:55.0 +0800 > +++ plugins/cd_burn.py2007-01-22 23:17:16.0 +0800 > @@ -182,33 +182,37 @@ > def burn_dvd_video(self): > _debug_('burn_dvd_video'); > """ > -copy this DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO > ALREADY!!! (ie ripped with dvdcopy.py) > +copy this file/DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO > ALREADY!!! (ie ripped with dvdcopy.py) > """ > > +self.file_to_burn=None > name = self.files[0].split("/") > self.name = name[len(name) -1] > print 'CDBURN : self.name = %s' % self.name > -dir = self.files[0] > -self.dir = dir + "/" > +self.dir = self.files[0] > print 'CDBURN : self.dir = %s ' % self.dir > -for f in os.listdir(self.dir): > -pathname = os.path.join(self.dir, f) > -print 'CDBURN : %s ' % pathname[-3:] > -if pathname[-3:].lower() == '_ts': > -print 'CDBURN : would not delete %s' %pathname > -self.file_to_delete = None > -else: > -print 'CDBURN : would delete %s' % pathname > -#self.file_to_delete.append(pathname) > -self.file_to_delete = pathname > - > -if self.file_to_delete: > -ConfirmBox(text=_('Delete %s?' % self.file_to_delete ), > - handler=self.delete_now, > default_choice=0).show() > -else: > +if self.name.endswith('.iso'): > +self.file_to_burn=self.dir > +else: > +self.subdirs = util.getdirnames(self.dir, softlinks=False) > +for dir in self.subdirs: > +pathname = os.path.join(self.dir, f) > +print 'CDBURN : %s ' % pathname[-3:] > +if pathname[-3:].lower() == '_ts': > +print 'CDBURN : OK TO BURN, folder DVD compliant %s' > %pathname > +self.file_to_burn = None > +else: > +print 'CDBURN : NOT OK to BURN, folder NOT DVD > compliant: %s' % pathname > +self.file_to_burn = pathname > + > +if self.file_to_burn: > ConfirmBox(text=_('Insert media then click OK'), > handler=self.start_burning, default_choice=0 > ).show() > + > + > +else: > +print 'CDBURN : NOT OK to BURN, exiting' > return > > def delete_now (self, a
Re: [Freevo-devel] [Patches] fixes required for CD-burn plugin to function again (rel 1 brach)
On 1/22/07, mike lewis <[EMAIL PROTECTED]> wrote: Hi, Been a while since I submitted a patch. Just tried to do this on SF but get the following error: ERROR Artifact: This ArtifactType Does Not Allow Anonymous Submissions. Please Login. I'm not a sf user so can't do that! ;-) --- CD BURN currently crashes when config is run. This is fixed with the following crash. Not sure what happen or why it ever worked without this ;-). One option is to remove the fruity stuff. But, as I wrote it, and I like it, my patch is the other option, (fix the freevo core to allow code other than x=y in the config procedure). FILE = helper.patch Now that it's no longer crashing, we can make use of that fruity stuff in config(). To do this, the defaults need to be removed from freevo_conf.py. Don't worry. config() will add them in again... FILE = freevo_config.patch CD Burn was not burning DVD's. I've had a quick hack at the code to fix the crash's one experiences when attempting to burn a DVD. I've just successfully burned a DVD in growisofs mode (iso file). However, after I wrote the code to use CDBurn for iso's I realised my version of cdburn doesn't support DVD's. What the?? For other users they now have an option of using the nice autofeatures in config() and thus auto discovered device's that cdburn gives you. Or, if your like me, and using ubuntu edgy, your have to set the "use growisofs" are right now your device i hard coded. FILE = cd_burn.patch --- So before i go to bed I may as well make the device growisofs uses a config option instead of hard coded. So here is an update to the previous patch for cd_burn which does all of the above. Cheers, M There you go. Have fun. Mick --- /mnt/hdb1/build/freevo/freevo/freevo/src/plugins/cd_burn.py 2007-01-02 20:13:55.0 +0800 +++ plugins/cd_burn.py 2007-01-22 23:17:16.0 +0800 @@ -182,33 +182,37 @@ def burn_dvd_video(self): _debug_('burn_dvd_video'); """ -copy this DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO ALREADY!!! (ie ripped with dvdcopy.py) +copy this file/DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO ALREADY!!! (ie ripped with dvdcopy.py) """ +self.file_to_burn=None name = self.files[0].split("/") self.name = name[len(name) -1] print 'CDBURN : self.name = %s' % self.name -dir = self.files[0] -self.dir = dir + "/" +self.dir = self.files[0] print 'CDBURN : self.dir = %s ' % self.dir -for f in os.listdir(self.dir): -pathname = os.path.join(self.dir, f) -print 'CDBURN : %s ' % pathname[-3:] -if pathname[-3:].lower() == '_ts': -print 'CDBURN : would not delete %s' %pathname -self.file_to_delete = None -else: -print 'CDBURN : would delete %s' % pathname -#self.file_to_delete.append(pathname) -self.file_to_delete = pathname - -if self.file_to_delete: -ConfirmBox(text=_('Delete %s?' % self.file_to_delete ), - handler=self.delete_now, default_choice=0).show() -else: +if self.name.endswith('.iso'): +self.file_to_burn=self.dir +else: +self.subdirs = util.getdirnames(self.dir, softlinks=False) +for dir in self.subdirs: +pathname = os.path.join(self.dir, f) +print 'CDBURN : %s ' % pathname[-3:] +if pathname[-3:].lower() == '_ts': +print 'CDBURN : OK TO BURN, folder DVD compliant %s' %pathname +self.file_to_burn = None +else: +print 'CDBURN : NOT OK to BURN, folder NOT DVD compliant: %s' % pathname +self.file_to_burn = pathname + +if self.file_to_burn: ConfirmBox(text=_('Insert media then click OK'), handler=self.start_burning, default_choice=0 ).show() + + +else: +print 'CDBURN : NOT OK to BURN, exiting' return def delete_now (self, arg=None, menuw=None): @@ -628,8 +632,17 @@ os.unlink(image_file) elif self.token.burn_mode == "dvd_video": -growisofs_cmd = 'growisofs -use-the-force-luke -dvd-compat -Z /dev/dvd -V %s -dvd-video %s' \ -% (self.token.name,self.token.dir) +growisofs_cmd = '%s -use-the-force-luke -dvd-compat -Z %s-V %s -dvd-video %s' \ +% (config.CDBURN_GROWISOFS_PATH, config.CDBURN_GISOFS_DVD_PATH, self.token.name,self.token.dir) + +if self.token.name.endswith('.iso'): +if config.CDBURN_DVDISO_USE_MKISOFS: +growisofs_cmd = '%s -use-the-force-luke -dvd-compat -Z %s=%s' \ + % (config.CDBURN_GROWISOFS_PATH,config.CDBURN_GISOFS_DVD_PATH,self.token.d
[Freevo-devel] [Patches] fixes required for CD-burn plugin to function again (rel 1 brach)
Hi, Been a while since I submitted a patch. Just tried to do this on SF but get the following error: ERROR Artifact: This ArtifactType Does Not Allow Anonymous Submissions. Please Login. I'm not a sf user so can't do that! ;-) --- CD BURN currently crashes when config is run. This is fixed with the following crash. Not sure what happen or why it ever worked without this ;-). One option is to remove the fruity stuff. But, as I wrote it, and I like it, my patch is the other option, (fix the freevo core to allow code other than x=y in the config procedure). FILE = helper.patch Now that it's no longer crashing, we can make use of that fruity stuff in config(). To do this, the defaults need to be removed from freevo_conf.py. Don't worry. config() will add them in again... FILE = freevo_config.patch CD Burn was not burning DVD's. I've had a quick hack at the code to fix the crash's one experiences when attempting to burn a DVD. I've just successfully burned a DVD in growisofs mode (iso file). However, after I wrote the code to use CDBurn for iso's I realised my version of cdburn doesn't support DVD's. What the?? For other users they now have an option of using the nice autofeatures in config() and thus auto discovered device's that cdburn gives you. Or, if your like me, and using ubuntu edgy, your have to set the "use growisofs" are right now your device i hard coded. FILE = cd_burn.patch --- There you go. Have fun. Mick --- /mnt/hdb1/build/freevo/freevo/freevo/src/plugins/cd_burn.py 2007-01-02 20:13:55.0 +0800 +++ plugins/cd_burn.py 2007-01-22 22:09:49.0 +0800 @@ -182,33 +182,37 @@ def burn_dvd_video(self): _debug_('burn_dvd_video'); """ -copy this DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO ALREADY!!! (ie ripped with dvdcopy.py) +copy this file/DIR to DVD as DVD VIDEO, NB: MUST BE DVD VIDEO ALREADY!!! (ie ripped with dvdcopy.py) """ +self.file_to_burn=None name = self.files[0].split("/") self.name = name[len(name) -1] print 'CDBURN : self.name = %s' % self.name -dir = self.files[0] -self.dir = dir + "/" +self.dir = self.files[0] print 'CDBURN : self.dir = %s ' % self.dir -for f in os.listdir(self.dir): -pathname = os.path.join(self.dir, f) -print 'CDBURN : %s ' % pathname[-3:] -if pathname[-3:].lower() == '_ts': -print 'CDBURN : would not delete %s' %pathname -self.file_to_delete = None -else: -print 'CDBURN : would delete %s' % pathname -#self.file_to_delete.append(pathname) -self.file_to_delete = pathname - -if self.file_to_delete: -ConfirmBox(text=_('Delete %s?' % self.file_to_delete ), - handler=self.delete_now, default_choice=0).show() -else: +if self.name.endswith('.iso'): +self.file_to_burn=self.dir +else: +self.subdirs = util.getdirnames(self.dir, softlinks=False) +for dir in self.subdirs: +pathname = os.path.join(self.dir, f) +print 'CDBURN : %s ' % pathname[-3:] +if pathname[-3:].lower() == '_ts': +print 'CDBURN : OK TO BURN, folder DVD compliant %s' %pathname +self.file_to_burn = None +else: +print 'CDBURN : NOT OK to BURN, folder NOT DVD compliant: %s' % pathname +self.file_to_burn = pathname + +if self.file_to_burn: ConfirmBox(text=_('Insert media then click OK'), handler=self.start_burning, default_choice=0 ).show() + + +else: +print 'CDBURN : NOT OK to BURN, exiting' return def delete_now (self, arg=None, menuw=None): @@ -628,8 +632,17 @@ os.unlink(image_file) elif self.token.burn_mode == "dvd_video": -growisofs_cmd = 'growisofs -use-the-force-luke -dvd-compat -Z /dev/dvd -V %s -dvd-video %s' \ -% (self.token.name,self.token.dir) +growisofs_cmd = '%s -use-the-force-luke -dvd-compat -Z /dev/dvd -V %s -dvd-video %s' \ +% (config.CDBURN_GROWISOFS_PATH,self.token.name,self.token.dir) + +if self.token.name.endswith('.iso'): +if config.CDBURN_DVDISO_USE_MKISOFS: +growisofs_cmd = '%s -use-the-force-luke -dvd-compat -Z /dev/dvd=%s' \ + % (config.CDBURN_GROWISOFS_PATH,self.token.dir) +else: +growisofs_cmd = '%s -dummy -s -eject -v -driveropts=burnfree speed=%s dev=%s %s' \ +% (config.CDBURN_CDRECORD_PATH,config.DVD_BURN_SPEED,config.CDBURN_DEV,self.token.dir) +print 'CDBURN : Command: %s' % growisofs_cmd