[Rhythmbox-devel] override the entry-type's get_playback_uri method
- From: longming <promingx gmail com>
- To: rhythmbox-devel gnome org
- Subject: [Rhythmbox-devel] override the entry-type's get_playback_uri method
- Date: Sun, 5 Dec 2010 23:19:11 +0800
Hi all. I'm writing a plugin use python, and override the entry-type's get_playback_uri method, but it does not work yet now.I don't know why.
BTW it can work on Ubuntu 10.04, but does not work on Ubuntu 10.10, the rhythmbox version is 0.13.1.
my code:
class GMusicEntryType(rhythmdb.EntryType):
def __init__(self, db):
rhythmdb.EntryType.__init__(self, name='OnlineMusicType')
def can_sync_metadata(self, entry):
return True
class Plugin(rb.Plugin):
def __init__(self):
self.switch = None
rb.Plugin.__init__(self)
def activate(self, shell):
self.db = shell.props.db
self.entry_type = GMusicEntryType(self.db)
self.db.register_entry_type(self.entry_type)
self.entry_type.get_playback_uri=self.get_playback_uri
def get_playback_uri(self, entry):
#do my thing...
retrun url
Thanks.
Longming
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]