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.

Here's 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
_______________________________________________
rhythmbox-devel mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel

Reply via email to