[gpodder-devel] PATCH] implementation of the "delete episodes in gPodder after sync to MP3 player" feature

  • From: thp at perli.net (Thomas Perl)
  • Date: Sun, 16 Dec 2007 12:03:04 +0100

Hello, J?r?me!

J?r?me Chabod wrote:
> I'm quite new with python and glade, and as a exercice, I tried to
> implement the "delete episodes in gPodder after sync to MP3 player"
> feature as I really need it.

After reviewing your patch, I'd say pretty good for a Python and Glade
newbie. I've changed some things, but most of your patch was fine :)

> You'll find a patch in attachment and inline after this mail (I hope it
> is OK), the patch apply to revision 495 from today. Fill free to include
> it into the svn or to throw it away if you think so, but comments are
> welcome, I could send you more patches on the future.

The patch was okay, but it was ~400k. Next time when the patch is
equally large, you might want to gzip it before attaching it to the
mail. If the patch is just some kbs, you can attach it directly.

I've attached a modified and stripped-down version of your patch in this
e-mail. If you want to try it, please svn revert -R your gPodder working
copy (possibly after backing up your changes with "svn diff >
~/gpodder-patch-backup") and then apply the attached patch.

My modifications re-arrange the widgets in the glade file a bit and also
make gPodder use the delete_from_disk() method of podcastItem. The
deletion is also not carried out before the episode gets copied to the
MP3 player/iPod, but only after a successful sync (this way, the episode
does not get deleted when sync fails for whatever reason).

The configuration option and GUI glue-ing was done very well, I didn't
have to change anything there.

In the preferences dialog, I also hided the "on_sync_leave" and
"label_after_sync" widgets when "None" was selected in the device
combobox, so all sync options (and their labels) are hidden when the
user has no device configured.

> I choose to replace the "mark as played" check box with 3 radio boxes
> ("leave episodes", "mark episodes as played", "delete episodes from
> download directory") since only one of this 3 actions can be performed
> simutaneously, but I might be wrong.

A very good idea! Even the configuration glue works with the
radiobuttons, so the configuration items are always set correctly and
the radio buttons perform their function well.

I'll give the patch some time to be reviewed here on the list, and after
that, I'm going to merge it into our SVN repository. Thank you very much
for your time and effort and for the patch :) And of course, you are
welcome to send in more patches if you decide to.


Thanks,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpodder_r497_delete_episode_after_sync.patch
Type: text/x-patch
Size: 11184 bytes
Desc: not available
URL: 
<https://lists.berlios.de/pipermail/gpodder-devel/attachments/20071216/b226fc7e/attachment.bin>

Other related posts: