http://bugs.gpodder.org/show_bug.cgi?id=418

           Summary: ipod sync fails because podcast date_released is
                    invalid related to bug #352
           Product: gPodder
           Version: 0.15.2
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: low
         Component: Application
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=292)
 --> (http://bugs.gpodder.org/attachment.cgi?id=292)
the sync.py with the added try/except around line 346

I manually edit a podcast to have a date released of 1950.

When I do a gpodder --sync  I get the following output

  iPod opened
Traceback (most recent call last):
  File "/usr/bin/gpodder", line 185, in <module>
    sys.exit( main())                           
  File "/usr/bin/gpodder", line 148, in main    
    console.sync_device()                       
  File "/var/lib/python-support/python2.6/gpodder/console.py", line 128, in
sync_device
    if not device.open():                                                       
  File "/var/lib/python-support/python2.6/gpodder/sync.py", line 295, in open   
    self.tracks_list = self.get_all_tracks()                                    
  File "/var/lib/python-support/python2.6/gpodder/sync.py", line 346, in
get_all_tracks
    released = gpod.itdb_time_mac_to_host(track.time_released)                  
  File "/usr/lib/python2.6/dist-packages/gpod/gpod.py", line 2024, in
itdb_time_mac_to_host
    return _gpod.itdb_time_mac_to_host(*args)                                   
ValueError: timestamp out of range for platform time_t   

********************END OF CONSOLE OUTPUT*****************

Having looked at the code in sync.py, it seems like the error happens here
around line 346

              released = gpod.itdb_time_mac_to_host(track.time_released)
              released = util.format_date(released)

I surrounded that block of code with a try/except to give me

            try:
              released = gpod.itdb_time_mac_to_host(track.time_released)
              released = util.format_date(released)
            except:
              released = 0

And the sync process worked perfectly.

I tested by changing the date released using gtkpod to 1950 and this code
worked fine.

I don't want to submit a patch as I am not a python programmer and I have no
idea if the above code is dangerous or not or has implications to interfere
with other operations.  Setting released = 0 might be a bad idea 

Problems experienced with versions 0.14 and 0.15, 0.15.2 on Jaunty beta using
an 5G Video ipod.

Problem goes away after fix.

-- 
Configure bugmail: http://bugs.gpodder.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
gPodder-Bugs mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-bugs

Reply via email to