~ubuntu-branches/ubuntu/vivid/gpodder/vivid-proposed

« back to all changes in this revision

Viewing changes to doc/dev/examples/hooks.py

  • Committer: Bazaar Package Importer
  • Author(s): tony mancill
  • Date: 2010-12-05 17:08:02 UTC
  • mfrom: (5.3.2 experimental) (5.2.10 sid)
  • Revision ID: james.westby@ubuntu.com-20101205170802-qbsq7r331j21np1i
Tags: 2.10-1
* New upstream release
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
# Example hooks script for gPodder.
3
 
# To use, copy it as a Python script into ~/.config/gpodder/hooks.py
 
3
# To use, copy it as a Python script into ~/.config/gpodder/hooks/mySetOfHooks.py
4
4
# See the module "gpodder.hooks" for a description of when each hook
5
5
# gets called and what the parameters of each hook are.
6
6
 
18
18
    def on_podcast_save(self, podcast):
19
19
        log(u'on_podcast_save(%s)' % podcast.title)
20
20
 
 
21
    def on_episode_downloaded(self, episode):
 
22
        log(u'on_episode_downloaded(%s)' % episode.title)
 
23
 
21
24
    def on_episode_save(self, episode):
22
25
        log(u'on_episode_save(%s)' % episode.title)
 
26
 
 
27
    def on_file_copied_to_filesystem(self, mp3playerdevice, from_file, to_file):
 
28
        log(u'on_file_copied_to_filesystem(%s, %s)' % (from_file, to_file))
 
29
 
 
30
    def on_file_copied_to_ipod(self, ipoddevice, from_file):
 
31
        log(u'on_file_copied_to_ipod(%s)' % from_file)
 
32
 
 
33
    def on_file_copied_to_mtp(self, mtpdevice, from_file, to_file):
 
34
        log(u'on_file_copied_to_mtp(%s, %s)' % (from_file, to_file))