Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv1459

Modified Files:
        cdbackup.py 
Log Message:
Get rid of the global variables; keep the thread inside the class.

I still don't know why ripping CDs breaks audio playback, but I'm hoping
these changes will help. 


Index: cdbackup.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/cdbackup.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** cdbackup.py 8 Oct 2003 02:06:18 -0000       1.20
--- cdbackup.py 8 Oct 2003 02:57:41 -0000       1.21
***************
*** 29,32 ****
--- 29,38 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.21  2003/10/08 02:57:41  outlyer
+ # Get rid of the global variables; keep the thread inside the class.
+ #
+ # I still don't know why ripping CDs breaks audio playback, but I'm hoping
+ # these changes will help.
+ #
  # Revision 1.20  2003/10/08 02:06:18  outlyer
  # Just some cleanup of commented out or disabled code.
***************
*** 97,102 ****
  import mmpython
  
- rip_thread = None
- 
  class PluginInterface(plugin.ItemPlugin):
      """
--- 103,106 ----
***************
*** 179,182 ****
--- 183,187 ----
          self.song_names = []
          self.device = ''
+         self.rip_thread = None
  
          
***************
*** 197,206 ****
  
      def actions(self, item):
-         global rip_thread
          self.item = item
          
          try:
              if (self.item.type == 'audiocd'):
!                 if rip_thread:
                      return [ ( self.show_status, 'Show CD ripping status') ]
                  else:
--- 202,210 ----
  
      def actions(self, item):
          self.item = item
          
          try:
              if (self.item.type == 'audiocd'):
!                 if self.rip_thread:
                      return [ ( self.show_status, 'Show CD ripping status') ]
                  else:
***************
*** 216,221 ****
  
      def show_status(self, arg=None, menuw=None):
!         global rip_thread
!         t = rip_thread
          if t:
              pop = AlertBox(text='Ripping in progress\nTrack %s of %s' % \
--- 220,224 ----
  
      def show_status(self, arg=None, menuw=None):
!         t = self.rip_thread
          if t:
              pop = AlertBox(text='Ripping in progress\nTrack %s of %s' % \
***************
*** 250,257 ****
  
      def cd_backup(self, arg,  menuw=None):            
-         global rip_thread
          device, type = arg
!         rip_thread = main_backup_thread(device=device, rip_format=type)        
!         rip_thread.start()
          AlertBox(text='Ripping started').show()
          menuw.delete_menu()
--- 253,259 ----
  
      def cd_backup(self, arg,  menuw=None):            
          device, type = arg
!         self.rip_thread = main_backup_thread(device=device, rip_format=type)        
!         self.rip_thread.start()
          AlertBox(text='Ripping started').show()
          menuw.delete_menu()
***************
*** 435,440 ****
  
          # done
!         global rip_thread
!         rip_thread = None
  
  
--- 437,441 ----
  
          # done
!         self.rip_thread = None
  
  




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to