Am Montag, 28. März 2011, um 14.34:41 schrieb Adam Charrett:
> On Sun, 20 Mar 2011, Andreas Dick wrote:
> > dear list again
> > I have the problem that if I resume my freevo-1.9.2b2 PC after a suspend,
> > (using /etc/acpi/sleep.sh as shutdown command) the inserted DVD is playd
> > automatically after ca 8sec... and this is not what I want.
> > On the other hand, if I start freevo on an allready running PC, the DVD
> > do not start automatically...
> > 
> > The logfiles says the following (Debug on):
> > *****************************************
> > 2011-03-20 16:49:51,328 DEBUG    main.py (568): Main loop starting...
> > Freevo 1.9.2b2 ready
> 
> Do you shutdown and restart freevo before/after the suspend, as this
> appears to suggest that freevo has just started?
> 
> > 2011-03-20 16:49:51,329 DEBUG    Creating thread notifier and signal
> > wakeup pipes (purge=False)
> > 2011-03-20 16:49:54,443 DEBUG    rom_drives.py (595): drive_status
> > changed 3 -
> > 
> >> 4
> 
> Looks like this is caused by the drivers reporting no disc and then ~3
> seconds later (spin up time?) as detecting a disc.
> 
> > now, is it possible to deactivate ths behaviour? or is it a bug, I will
> > try then to hack freevo for a fix.
> 
> If you can try to fix it that would be very useful :-)
> 
> Cheers
> 
> Adam
Hei Adam
I was not yet able to find a module or something that makes the difference 
between boot and resume... but it must be something like that.

I was even not able to find the code position in rom_drives.py that makes the 
diference between drive_status 0->4 change (after boot with dvd inserted) and 
0->3 + 3->4 changes (after resume with same dvd)... I suppose a timing 
discrepancy...?

Thus I wrote a patch witch is remembering, if the tray was allready open or 
not (like on boot/resume), autoplay works only if positive. Now it is working 
well.

The hack could be done at different code positions, please feel free to 
improve,  if you even are willing to accept :-)

Andreas
--- freevo-1.9.2b2.orig/src/plugins/rom_drives.py	2009-08-11 17:18:29.000000000 +0200
+++ freevo-1.9.2b2/src/plugins/rom_drives.py	2011-06-03 14:22:48.000000000 +0200
@@ -312,6 +312,7 @@
         self.cis       = CDS_NO_INFO
         self.cds       = CDS_NO_INFO
         self.cds_changed = False
+        self.cds_startup = True
 
         self.tray_open = False
         self.drive_status = self.get_drive_status()
@@ -472,7 +473,12 @@
 
     def get_drive_status_changed(self):
         """ has the drive status changed """
-        return self.cds_changed
+        if self.cds == CDS_TRAY_OPEN:
+            self.cds_startup = False
+        if self.cds_startup:
+            return False
+        else:
+            return self.cds_changed
 
 
     def open_tray(self):
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to