[Rhythmbox-devel] Plug-in to insert a 2-second pause between each track in a playlist
- From: Imran Chaudhry <ichaudhry gmail com>
- To: rhythmbox-devel gnome org
- Subject: [Rhythmbox-devel] Plug-in to insert a 2-second pause between each track in a playlist
- Date: Tue, 14 Jul 2009 22:00:31 +0100
Hi All,
As topic, I want to create a plugin that pauses 2 seconds between each
song in the playlist. So imagine a simple 2 track playlist. When the
plugin is active, the playlist starts playing track 1 immediately,
then after it ends there is a 2 second pause then track 2 plays. When
track 2 ends there is no pause.
I have read the guide here:
http://live.gnome.org/RhythmboxPlugins/WritingGuide
But it doesn't help that much. Right now I have a simple skeleton
plugin called "two-second-pause" which just pauses the song when
active and unpauses when deactivated.
I am not asking for anyone to write it for me but some pointers or
pseudo-code would be welcome. I'm also happy to look at code of other
plugins that do a similar thing. I'd like to code it up myself but the
lack of documentation is holding me back.
Many thanks,
Imran Chaudhry
My plugin at the moment:
#!/usr/bin/python
import rb
class two_second_pause (rb.Plugin):
def __init__(self):
rb.Plugin.__init__(self)
def activate(self, shell):
self.shell = shell
self.string = "Hello Imran"
print self.string
# pause playback
shell.props.shell_player.pause()
def deactivate(self, shell):
# start the song again
shell.props.shell_player.play()
del self.shell
del self.string
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]