[Rhythmbox-devel] Plug-in to insert a 2-second pause between each track in a playlist

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:


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:

import rb

class two_second_pause (rb.Plugin):

    def __init__(self):

    def activate(self, shell):
        self.shell = shell
        self.string = "Hello Imran"
        print self.string
        # pause playback

    def deactivate(self, shell):
        # start the song again
        del self.shell
        del self.string

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]