[gpodder] More on device sync

  • From: Joseph Wickremasinghe <jnwickremasinghe@xxxxxxxxx>
  • To: gpodder@xxxxxxxxxxxxx
  • Date: Mon, 12 Mar 2012 08:53:12 -0700 (PDT)

Hi Thomas,

Lots of discussion on device syncing in the last few days! :)

I've uploaded my proposed patch as bug 1579, as the patch seemed too big to 
send to the mailing list.

https://bugs.gpodder.org/show_bug.cgi?id=1579

As I mentioned earlier, I started with the sync code from 2.20 and looked to 
add it back into the 3.0 codebase.

After applying the patch, gPodder will sync all feeds, all episodes to the 
selected device if the user selects 'Sync Device' from the (newly added) 
'Device' menu. (I haven't added any context menu items for syncing yet). The 
user can configure their (filesystem-based) device from the 'Devices' tab in 
the preferences dialog, and there are additional device settings accessible 
from the 'Edit config' window as well.

The code for iPod sync is included, but I removed 'iPod' from the device 
options drop-down for now. I updated the database schema to add a 
'sync_to_device' and 'playlist_name' columns to the podcast table and 
'is_played' to episodes. Schema version is now 3.

I can certainly rewrite this an extension if that's the best way to approach 
this. Aside from that, I would also want to do the following:

1. Enable iPod support
2. Get 'custom sync name' working. {episode.title} works, but I can't figure 
out where the episode published date is stored in the 3.0 object model.
3. Update the interface to allow the user to specify which podcasts are synced 
(at present it's all or nothing)
4. Add in functionality to create a separate playlist for each podcast
5. Update syncing to allow a episode that has been deleted on the device to be 
marked for deletion within gPodder.

This is of course all assuming that what I've done so far make sense... :)

Please review the patch & let me know what you think!

Joseph

Other related posts: