[rhythmbox/gobject-introspection: 34/39] fix up python plugins for gi namespace merge



commit 56118294060e63a36dfd37d6ed450399ac9450d9
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Nov 6 23:34:15 2010 +1000

    fix up python plugins for gi namespace merge

 plugins/artdisplay/artdisplay/CoverArtDatabase.py  |   20 ++++----
 .../artdisplay/EmbeddedCoverArtSearch.py           |    4 +-
 .../artdisplay/artdisplay/LastFMCoverArtSearch.py  |   10 ++--
 .../artdisplay/artdisplay/LocalCoverArtSearch.py   |    8 ++--
 .../artdisplay/MusicBrainzCoverArtSearch.py        |    4 +-
 .../artdisplay/artdisplay/PodcastCoverArtSearch.py |    6 +-
 plugins/artdisplay/artdisplay/__init__.py          |    6 +-
 plugins/coherence/upnp_coherence/MediaPlayer.py    |   49 ++++++++++++-------
 plugins/coherence/upnp_coherence/MediaStore.py     |   50 ++++++++++----------
 plugins/coherence/upnp_coherence/UpnpSource.py     |   14 +++---
 plugins/coherence/upnp_coherence/__init__.py       |   13 +++++-
 plugins/context/context/AlbumTab.py                |    6 +-
 plugins/context/context/ArtistTab.py               |    4 +-
 plugins/context/context/ContextView.py             |    4 +-
 plugins/context/context/LyricsTab.py               |    8 ++--
 plugins/im-status/im-status/__init__.py            |    9 ++--
 plugins/jamendo/jamendo/JamendoSaxHandler.py       |   18 ++++----
 plugins/jamendo/jamendo/JamendoSource.py           |   12 ++--
 plugins/jamendo/jamendo/__init__.py                |    6 +-
 plugins/lyrics/lyrics/__init__.py                  |    6 +-
 plugins/magnatune/magnatune/MagnatuneSource.py     |   10 ++--
 plugins/magnatune/magnatune/TrackListHandler.py    |   18 ++++----
 plugins/magnatune/magnatune/__init__.py            |    6 +-
 plugins/pythonconsole/pythonconsole.py             |    2 -
 24 files changed, 156 insertions(+), 137 deletions(-)
---
diff --git a/plugins/artdisplay/artdisplay/CoverArtDatabase.py b/plugins/artdisplay/artdisplay/CoverArtDatabase.py
index 047bc74..4aaf055 100644
--- a/plugins/artdisplay/artdisplay/CoverArtDatabase.py
+++ b/plugins/artdisplay/artdisplay/CoverArtDatabase.py
@@ -33,7 +33,7 @@ import gi
 
 import rb
 from gi.repository import GdkPixbuf
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 
 from PodcastCoverArtSearch import PodcastCoverArtSearch
 from MusicBrainzCoverArtSearch import MusicBrainzCoverArtSearch
@@ -111,10 +111,10 @@ class TicketSystem:
 			return False
 
 def get_search_props(db, entry):
-	artist = entry.get_string(RhythmDB.PropType.ALBUM_ARTIST)
+	artist = entry.get_string(RB.RhythmDBPropType.ALBUM_ARTIST)
 	if artist == "":
-		artist = entry.get_string(RhythmDB.PropType.ARTIST)
-	album = entry.get_string(RhythmDB.PropType.ALBUM)
+		artist = entry.get_string(RB.RhythmDBPropType.ARTIST)
+	album = entry.get_string(RB.RhythmDBPropType.ALBUM)
 	return (artist, album)
 
 
@@ -233,8 +233,8 @@ class CoverArtDatabase (object):
 		match_entry = self.ticket.find(entry, find_same_search, db)
 		if match_entry is not None:
 			print "entry %s matches existing search for %s" % (
-				 entry.get_string(RhythmDB.PropType.LOCATION),
-				 match_entry.get_string(RhythmDB.PropType.LOCATION))
+				 entry.get_string(RB.RhythmDBPropType.LOCATION),
+				 match_entry.get_string(RB.RhythmDBPropType.LOCATION))
 			self.same_search.setdefault (match_entry, []).append(entry)
 			return
 
@@ -264,10 +264,10 @@ class CoverArtDatabase (object):
 						else:
 							uri = engine_uri
 
-						print "found image for %s" % (entry.get_string(RhythmDB.PropType.LOCATION))
+						print "found image for %s" % (entry.get_string(RB.RhythmDBPropType.LOCATION))
 						callback (entry, pixbuf, uri, tooltip_image, tooltip_text)
 						for m in self.same_search.pop(entry, []):
-							print "and for same search %s" % (m.get_string(RhythmDB.PropType.LOCATION))
+							print "and for same search %s" % (m.get_string(RB.RhythmDBPropType.LOCATION))
 							callback (m, pixbuf, uri, tooltip_image, tooltip_text)
 
 					self.write_blist (blist_location, blist)
@@ -314,10 +314,10 @@ class CoverArtDatabase (object):
 				return
 
 		if self.ticket.forget (entry, ticket):
-			print "didn't find image for %s" % (entry.get_string(RhythmDB.PropType.LOCATION))
+			print "didn't find image for %s" % (entry.get_string(RB.RhythmDBPropType.LOCATION))
 			callback (entry, None, None, None, None)
 			for m in self.same_search.pop (entry, []):
-				print "or for same search %s" % (m.get_string(RhythmDB.PropType.LOCATION))
+				print "or for same search %s" % (m.get_string(RB.RhythmDBPropType.LOCATION))
 				callback (m, None, None, None, None)
 
 		self.write_blist (blist_location, blist)
diff --git a/plugins/artdisplay/artdisplay/EmbeddedCoverArtSearch.py b/plugins/artdisplay/artdisplay/EmbeddedCoverArtSearch.py
index 9f60497..d329940 100644
--- a/plugins/artdisplay/artdisplay/EmbeddedCoverArtSearch.py
+++ b/plugins/artdisplay/artdisplay/EmbeddedCoverArtSearch.py
@@ -29,7 +29,7 @@ import gobject
 
 import rb
 from gi.repository import GdkPixbuf
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 class EmbeddedCoverArtSearch (object):
 	def __init__ (self):
@@ -87,7 +87,7 @@ class EmbeddedCoverArtSearch (object):
 			return
 
 		# only search local files
-		uri = db.entry_get_string(entry, RhythmDB.PropType.LOCATION)
+		uri = db.entry_get_string(entry, RB.RhythmDBPropType.LOCATION)
 		if uri.startswith("file://") is False:
 			print "not checking for embedded cover art in non-local entry %s" % uri
 			on_search_completed (self, entry, None, *args)
diff --git a/plugins/artdisplay/artdisplay/LastFMCoverArtSearch.py b/plugins/artdisplay/artdisplay/LastFMCoverArtSearch.py
index cf4fea0..00d448c 100644
--- a/plugins/artdisplay/artdisplay/LastFMCoverArtSearch.py
+++ b/plugins/artdisplay/artdisplay/LastFMCoverArtSearch.py
@@ -30,7 +30,7 @@ import re
 
 import rb
 from gi.repository import GConf
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 # this API key belongs to jonathan d14n org
 # and was generated specifically for this use
@@ -122,17 +122,17 @@ class LastFMCoverArtSearch (object):
 			callback (self, entry, None, *args)
 			return
 
-		artist = entry.get_string(RhythmDB.PropType.ALBUM_ARTIST)
+		artist = entry.get_string(RB.RhythmDBPropType.ALBUM_ARTIST)
 		if artist == "":
-			artist = entry.get_string (RhythmDB.PropType.ARTIST)
+			artist = entry.get_string (RB.RhythmDBPropType.ARTIST)
 		if artist == _("Unknown"):
 			artist = ""
 
-		album = entry.get_string (RhythmDB.PropType.ALBUM)
+		album = entry.get_string (RB.RhythmDBPropType.ALBUM)
 		if album == _("Unknown"):
 			album = ""
 
-		album_mbid = entry.get_string (RhythmDB.PropType.MB_ALBUMID)
+		album_mbid = entry.get_string (RB.RhythmDBPropType.MB_ALBUMID)
 		if (artist, album, album_mbid) == ("", "", ""):
 			print "can't search: no artist, album, or album ID"
 			callback (self, entry, None, *args)
diff --git a/plugins/artdisplay/artdisplay/LocalCoverArtSearch.py b/plugins/artdisplay/artdisplay/LocalCoverArtSearch.py
index 5b5885e..45fbcb3 100644
--- a/plugins/artdisplay/artdisplay/LocalCoverArtSearch.py
+++ b/plugins/artdisplay/artdisplay/LocalCoverArtSearch.py
@@ -30,7 +30,7 @@ import gobject
 import gio
 import gi
 
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 IMAGE_NAMES = ["cover", "album", "albumart", ".folder", "folder"]
 ITEMS_PER_NOTIFICATION = 10
@@ -50,10 +50,10 @@ def shared_prefix_length (a, b):
 	return l
 
 def get_search_props(db, entry):
-	artist = entry.get_string(RhythmDB.PropType.ALBUM_ARTIST)
+	artist = entry.get_string(RB.RhythmDBPropType.ALBUM_ARTIST)
 	if artist == "":
-		artist = entry.get_string(RhythmDB.PropType.ARTIST)
-	album = entry.get_string(RhythmDB.PropType.ALBUM)
+		artist = entry.get_string(RB.RhythmDBPropType.ARTIST)
+	album = entry.get_string(RB.RhythmDBPropType.ALBUM)
 	return (artist, album)
 
 
diff --git a/plugins/artdisplay/artdisplay/MusicBrainzCoverArtSearch.py b/plugins/artdisplay/artdisplay/MusicBrainzCoverArtSearch.py
index e8ab0bd..8c7a825 100644
--- a/plugins/artdisplay/artdisplay/MusicBrainzCoverArtSearch.py
+++ b/plugins/artdisplay/artdisplay/MusicBrainzCoverArtSearch.py
@@ -28,7 +28,7 @@ import urllib
 import xml.dom.minidom as dom
 
 import rb
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 # musicbrainz URLs
 MUSICBRAINZ_RELEASE_URL = "http://musicbrainz.org/ws/1/release/%s?type=xml";
@@ -74,7 +74,7 @@ class MusicBrainzCoverArtSearch (object):
 		self.entry = entry
 
 		# if we've got an album ID, we can get the album info directly
-		album_id = db.entry_get_string(entry, RhythmDB.PropType.MUSICBRAINZ_ALBUMID)
+		album_id = db.entry_get_string(entry, RB.RhythmDBPropType.MUSICBRAINZ_ALBUMID)
 		if album_id != "":
 			# these sometimes look like full URLs, sometimes not
 			if album_id.startswith(MUSICBRAINZ_RELEASE_PREFIX):
diff --git a/plugins/artdisplay/artdisplay/PodcastCoverArtSearch.py b/plugins/artdisplay/artdisplay/PodcastCoverArtSearch.py
index d56ef9b..c8ae3f5 100644
--- a/plugins/artdisplay/artdisplay/PodcastCoverArtSearch.py
+++ b/plugins/artdisplay/artdisplay/PodcastCoverArtSearch.py
@@ -25,7 +25,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
 
 import rb
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 class PodcastCoverArtSearch (object):
 	def __init__ (self):
@@ -43,11 +43,11 @@ class PodcastCoverArtSearch (object):
 			return
 
 		# Retrieve corresponding feed for this entry
-		podcast_location = entry.get_string(RhythmDB.PropType.SUBTITLE)
+		podcast_location = entry.get_string(RB.RhythmDBPropType.SUBTITLE)
 		podcast_feed_entry = db.entry_lookup_by_location(podcast_location)
 
 		# Check for PROP_IMAGE in feed
-		image_url = podcast_feed_entry.get_string(RhythmDB.PropType.IMAGE)
+		image_url = podcast_feed_entry.get_string(RB.RhythmDBPropType.IMAGE)
 		
 		on_search_completed_callback (self, entry, image_url, *args)
 
diff --git a/plugins/artdisplay/artdisplay/__init__.py b/plugins/artdisplay/artdisplay/__init__.py
index 9beb32e..d0b7dd9 100644
--- a/plugins/artdisplay/artdisplay/__init__.py
+++ b/plugins/artdisplay/artdisplay/__init__.py
@@ -34,7 +34,7 @@ from CoverArtDatabase import CoverArtDatabase
 
 import rb
 from gi.repository import Gtk, Gdk, GdkPixbuf
-from gi.repository import RhythmDB, RB
+from gi.repository import RB
 
 FADE_STEPS = 10
 FADE_TOTAL_TIME = 1000
@@ -274,8 +274,8 @@ gobject.type_register (FadingImage)
 
 class ArtDisplayWidget (FadingImage):
 	__gsignals__ = {
-			'pixbuf-dropped' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (RhythmDB.Entry, GdkPixbuf.Pixbuf)),
-			'uri-dropped' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (RhythmDB.Entry, gobject.TYPE_STRING))
+			'pixbuf-dropped' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (RB.RhythmDBEntry, GdkPixbuf.Pixbuf)),
+			'uri-dropped' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (RB.RhythmDBEntry, gobject.TYPE_STRING))
 			}
 
 	def __init__ (self, missing_image):
diff --git a/plugins/coherence/upnp_coherence/MediaPlayer.py b/plugins/coherence/upnp_coherence/MediaPlayer.py
index c24b66c..95ce8ee 100644
--- a/plugins/coherence/upnp_coherence/MediaPlayer.py
+++ b/plugins/coherence/upnp_coherence/MediaPlayer.py
@@ -6,7 +6,7 @@
 import os.path
 import urllib
 
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 from twisted.python import failure
 
@@ -20,6 +20,17 @@ from coherence import log
 
 TRACK_COUNT = 1000000
 
+class CoherencePlayerEntryType(RB.RhythmDBEntryType):
+    def __init__(self):
+        RB.RhythmDBEntryType.__init__(self, name='CoherencePlayer')
+
+    def can_sync_metadata(self, entry):
+        return True
+
+    def sync_metadata(self, entry, changes):
+        return
+
+
 class RhythmboxPlayer(log.Loggable):
 
     """ a backend to the Rhythmbox
@@ -49,7 +60,7 @@ class RhythmboxPlayer(log.Loggable):
         self.player = self.shell.get_player()
         louie.send('Coherence.UPnP.Backend.init_completed', None, backend=self)
 
-	self.entry_type = rhythmdb.EntryType(name='CoherencePlayer')
+	self.entry_type = CoherencePlayerEntryType()
 	self.shell.props.db.register_entry_type(self.entry_type)
 
         self.playing = False
@@ -81,29 +92,29 @@ class RhythmboxPlayer(log.Loggable):
             self.metadata = None
             self.duration = None
         else:
-            id = self.shell.props.db.entry_get_ulong (entry, RhythmDB.PropType.ENTRY_ID)
-            bitrate = self.shell.props.db.entry_get_ulong(entry, RhythmDB.PropType.BITRATE) * 1024 / 8
+            id = self.shell.props.db.entry_get_ulong (entry, RB.RhythmDBPropType.ENTRY_ID)
+            bitrate = self.shell.props.db.entry_get_ulong(entry, RB.RhythmDBPropType.BITRATE) * 1024 / 8
             # Duration is in HH:MM:SS format
-            seconds = self.shell.props.db.entry_get_ulong(entry, RhythmDB.PropType.DURATION)
+            seconds = self.shell.props.db.entry_get_ulong(entry, RB.RhythmDBPropType.DURATION)
             hours = seconds / 3600
             seconds = seconds - hours * 3600
             minutes = seconds / 60
             seconds = seconds - minutes * 60
             self.duration = "%02d:%02d:%02d" % (hours, minutes, seconds)
 
-            mimetype = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.MIMETYPE)
+            mimetype = self.shell.props.db.entry_get_string(entry, RB.RhythmDBPropType.MIMETYPE)
             # This isn't a real mime-type
             if mimetype == "application/x-id3":
                 mimetype = "audio/mpeg"
-            size = self.shell.props.db.entry_get_uint64(entry, RhythmDB.PropType.FILE_SIZE)
+            size = self.shell.props.db.entry_get_uint64(entry, RB.RhythmDBPropType.FILE_SIZE)
 
             # create item
             item = DIDLLite.MusicTrack(id + TRACK_COUNT,'101')
-            item.album = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.ALBUM)
-            item.artist = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.ARTIST)
-            item.genre = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.GENRE)
-            item.originalTrackNumber = str(self.shell.props.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER))
-            item.title = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.TITLE) # much nicer if it was entry.title
+            item.album = self.shell.props.db.entry_get_string(entry, RB.RhythmDBPropType.ALBUM)
+            item.artist = self.shell.props.db.entry_get_string(entry, RB.RhythmDBPropType.ARTIST)
+            item.genre = self.shell.props.db.entry_get_string(entry, RB.RhythmDBPropType.GENRE)
+            item.originalTrackNumber = str(self.shell.props.db.entry_get_ulong (entry, RB.RhythmDBPropType.TRACK_NUMBER))
+            item.title = self.shell.props.db.entry_get_string(entry, RB.RhythmDBPropType.TITLE) # much nicer if it was entry.title
 
             cover = self.shell.props.db.entry_request_extra_metadata(entry, "rb:coverArt-uri")
             if cover != None:
@@ -112,7 +123,7 @@ class RhythmboxPlayer(log.Loggable):
 
             item.res = []
 
-            location = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.LOCATION)
+            location = self.shell.props.db.entry_get_string(entry, RB.RhythmDBPropType.LOCATION)
             if location.startswith("file://"):
                 location = unicode(urllib.unquote(location[len("file://"):]))
 
@@ -281,22 +292,22 @@ class RhythmboxPlayer(log.Loggable):
                         bitrate = res.bitrate
                         break
 
-                self.shell.props.db.set(self.entry, RhythmDB.PropType.TITLE, item.title)
+                self.shell.props.db.set(self.entry, RB.RhythmDBPropType.TITLE, item.title)
                 try:
                     if item.artist is not None:
-                        self.shell.props.db.set(self.entry, RhythmDB.PropType.ARTIST, item.artist)
+                        self.shell.props.db.set(self.entry, RB.RhythmDBPropType.ARTIST, item.artist)
                 except AttributeError:
                     pass
                 try:
                     if item.album is not None:
-                        self.shell.props.db.set(self.entry, RhythmDB.PropType.ALBUM, item.album)
+                        self.shell.props.db.set(self.entry, RB.RhythmDBPropType.ALBUM, item.album)
                 except AttributeError:
                     pass
 
                 try:
                     self.info("%r %r", item.title,item.originalTrackNumber)
                     if item.originalTrackNumber is not None:
-                        self.shell.props.db.set(self.entry, RhythmDB.PropType.TRACK_NUMBER, int(item.originalTrackNumber))
+                        self.shell.props.db.set(self.entry, RB.RhythmDBPropType.TRACK_NUMBER, int(item.originalTrackNumber))
                 except AttributeError:
                     pass
 
@@ -304,10 +315,10 @@ class RhythmboxPlayer(log.Loggable):
                     h,m,s = duration.split(':')
                     seconds = int(h)*3600 + int(m)*60 + int(s)
                     self.info("%r %r:%r:%r %r", duration, h, m , s, seconds)
-                    self.shell.props.db.set(self.entry, RhythmDB.PropType.DURATION, seconds)
+                    self.shell.props.db.set(self.entry, RB.RhythmDBPropType.DURATION, seconds)
 
                 if size is not None:
-                    self.shell.props.db.set(self.entry, RhythmDB.PropType.FILE_SIZE,int(size))
+                    self.shell.props.db.set(self.entry, RB.RhythmDBPropType.FILE_SIZE,int(size))
 
         else:
             if uri.startswith('track-'):
diff --git a/plugins/coherence/upnp_coherence/MediaStore.py b/plugins/coherence/upnp_coherence/MediaStore.py
index 0b81cc5..a15e442 100644
--- a/plugins/coherence/upnp_coherence/MediaStore.py
+++ b/plugins/coherence/upnp_coherence/MediaStore.py
@@ -8,7 +8,7 @@ import os.path
 import louie
 import urllib
 
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 from coherence import __version_info__
 
@@ -90,8 +90,8 @@ class Album(BackendItem):
         self.store = store
 
         query = self.store.db.query_new()
-        self.store.db.query_append(query,[RhythmDB.QueryType.EQUALS, RhythmDB.PropType.TYPE, self.store.db.entry_type_get_by_name('song')],
-                                      [RhythmDB.QueryType.EQUALS, RhythmDB.PropType.ALBUM, self.title])
+        self.store.db.query_append(query,[RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.TYPE, self.store.db.entry_type_get_by_name('song')],
+                                      [RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.ALBUM, self.title])
         self.tracks_per_album_query = self.store.db.query_model_new(query)
         #self.tracks_per_album_query.set_sort_order(rhythmdb.rhythmdb_query_model_track_sort_func)
         self.store.db.do_full_query_async_parsed(self.tracks_per_album_query, query)
@@ -101,9 +101,9 @@ class Album(BackendItem):
 
         def track_sort(x,y):
             entry = self.store.db.entry_lookup_by_id (x.id)
-            x_track = self.store.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER)
+            x_track = self.store.db.entry_get_ulong (entry, RB.RhythmDBPropType.TRACK_NUMBER)
             entry = self.store.db.entry_lookup_by_id (y.id)
-            y_track = self.store.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER)
+            y_track = self.store.db.entry_get_ulong (entry, RB.RhythmDBPropType.TRACK_NUMBER)
             return cmp(x_track,y_track)
 
         def collate (model, path, iter):
@@ -152,12 +152,12 @@ class Artist(BackendItem):
         self.store = store
 
         query = self.store.db.query_new()
-        self.store.db.query_append(query,[RhythmDB.QueryType.EQUALS, RhythmDB.PropType.TYPE, self.store.db.entry_type_get_by_name('song')],
-                                      [RhythmDB.QueryType.EQUALS, RhythmDB.PropType.ARTIST, self.name])
+        self.store.db.query_append(query,[RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.TYPE, self.store.db.entry_type_get_by_name('song')],
+                                      [RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.ARTIST, self.name])
         self.tracks_per_artist_query = self.store.db.query_model_new(query)
         self.store.db.do_full_query_async_parsed(self.tracks_per_artist_query, query)
 
-        self.albums_per_artist_query = self.store.db.property_model_new(RhythmDB.PropType.ALBUM)
+        self.albums_per_artist_query = self.store.db.property_model_new(RB.RhythmDBPropType.ALBUM)
         self.albums_per_artist_query.props.query_model = self.tracks_per_artist_query
 
     def get_artist_all_tracks(self,id):
@@ -225,7 +225,7 @@ class Track(BackendItem):
         if type(id) == int:
             self.id = id
         else:
-            self.id = self.store.db.entry_get_ulong (id, RhythmDB.PropType.ENTRY_ID)
+            self.id = self.store.db.entry_get_ulong (id, RB.RhythmDBPropType.ENTRY_ID)
         self.parent_id = parent_id
 
     def get_children(self, start=0, request_count=0):
@@ -243,9 +243,9 @@ class Track(BackendItem):
         # load common values
         entry = self.store.db.entry_lookup_by_id(self.id)
         # Bitrate is in bytes/second, not kilobits/second
-        bitrate = self.store.db.entry_get_ulong(entry, RhythmDB.PropType.BITRATE) * 1024 / 8
+        bitrate = self.store.db.entry_get_ulong(entry, RB.RhythmDBPropType.BITRATE) * 1024 / 8
         # Duration is in HH:MM:SS format
-        seconds = self.store.db.entry_get_ulong(entry, RhythmDB.PropType.DURATION)
+        seconds = self.store.db.entry_get_ulong(entry, RB.RhythmDBPropType.DURATION)
         hours = seconds / 3600
         seconds = seconds - hours * 3600
         minutes = seconds / 60
@@ -253,13 +253,13 @@ class Track(BackendItem):
         duration = ("%02d:%02d:%02d") % (hours, minutes, seconds)
 
         location = self.get_path(entry)
-        mimetype = self.store.db.entry_get_string(entry, RhythmDB.PropType.MIMETYPE)
+        mimetype = self.store.db.entry_get_string(entry, RB.RhythmDBPropType.MIMETYPE)
         # This isn't a real mime-type
         if mimetype == "application/x-id3":
             mimetype = "audio/mpeg"
-        size = self.store.db.entry_get_uint64(entry, RhythmDB.PropType.FILE_SIZE)
+        size = self.store.db.entry_get_uint64(entry, RB.RhythmDBPropType.FILE_SIZE)
 
-        album = self.store.db.entry_get_string(entry, RhythmDB.PropType.ALBUM)
+        album = self.store.db.entry_get_string(entry, RB.RhythmDBPropType.ALBUM)
         if self.parent_id == None:
             try:
                 self.parent_id = self.store.albums[album].id
@@ -270,11 +270,11 @@ class Track(BackendItem):
         item = DIDLLite.MusicTrack(self.id + TRACK_COUNT,self.parent_id)
         item.album = album
 
-        item.artist = self.store.db.entry_get_string(entry, RhythmDB.PropType.ARTIST)
+        item.artist = self.store.db.entry_get_string(entry, RB.RhythmDBPropType.ARTIST)
         #item.date =
-        item.genre = self.store.db.entry_get_string(entry, RhythmDB.PropType.GENRE)
-        item.originalTrackNumber = str(self.store.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER))
-        item.title = self.store.db.entry_get_string(entry, RhythmDB.PropType.TITLE) # much nicer if it was entry.title
+        item.genre = self.store.db.entry_get_string(entry, RB.RhythmDBPropType.GENRE)
+        item.originalTrackNumber = str(self.store.db.entry_get_ulong (entry, RB.RhythmDBPropType.TRACK_NUMBER))
+        item.title = self.store.db.entry_get_string(entry, RB.RhythmDBPropType.TITLE) # much nicer if it was entry.title
 
         cover = self.store.db.entry_request_extra_metadata(entry, "rb:coverArt-uri")
         #self.warning("cover for %r is %r", item.title, cover)
@@ -310,7 +310,7 @@ class Track(BackendItem):
 
     def get_name(self):
         entry = self.store.db.entry_lookup_by_id (self.id)
-        return self.store.db.entry_get_string(entry, RhythmDB.PropType.TITLE)
+        return self.store.db.entry_get_string(entry, RB.RhythmDBPropType.TITLE)
 
     def get_url(self):
         return self.store.urlbase + str(self.id + TRACK_COUNT)
@@ -318,7 +318,7 @@ class Track(BackendItem):
     def get_path(self, entry = None):
         if entry is None:
             entry = self.store.db.entry_lookup_by_id (self.id)
-        uri = self.store.db.entry_get_string(entry, RhythmDB.PropType.LOCATION)
+        uri = self.store.db.entry_get_string(entry, RB.RhythmDBPropType.LOCATION)
         self.info("Track get_path uri = %r", uri)
         location = None
         if uri.startswith("file://"):
@@ -365,14 +365,14 @@ class MediaStore(BackendStore):
 
         query = self.db.query_new()
         self.info(query)
-        self.db.query_append(query, [RhythmDB.QueryType.EQUALS, RhythmDB.PropType.TYPE, self.db.entry_type_get_by_name('song')])
+        self.db.query_append(query, [RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.TYPE, self.db.entry_type_get_by_name('song')])
         qm = self.db.query_model_new(query)
         self.db.do_full_query_async_parsed(qm, query)
 
-        self.album_query = self.db.property_model_new(RhythmDB.PropType.ALBUM)
+        self.album_query = self.db.property_model_new(RB.RhythmDBPropType.ALBUM)
         self.album_query.props.query_model = qm
 
-        self.artist_query = self.db.property_model_new(RhythmDB.PropType.ARTIST)
+        self.artist_query = self.db.property_model_new(RB.RhythmDBPropType.ARTIST)
         self.artist_query.props.query_model = qm
 
         self.containers = {}
@@ -437,9 +437,9 @@ class MediaStore(BackendStore):
         tracks = []
 
         def track_cb (entry):
-            if self.db.entry_get_boolean (entry, RhythmDB.PropType.HIDDEN):
+            if self.db.entry_get_boolean (entry, RB.RhythmDBPropType.HIDDEN):
                 return
-            id = self.db.entry_get_ulong (entry, RhythmDB.PropType.ENTRY_ID)
+            id = self.db.entry_get_ulong (entry, RB.RhythmDBPropType.ENTRY_ID)
             track = Track(self, id, parent_id)
             tracks.append(track)
 
diff --git a/plugins/coherence/upnp_coherence/UpnpSource.py b/plugins/coherence/upnp_coherence/UpnpSource.py
index f6a841a..72e8d36 100644
--- a/plugins/coherence/upnp_coherence/UpnpSource.py
+++ b/plugins/coherence/upnp_coherence/UpnpSource.py
@@ -7,7 +7,7 @@
 import gobject
 
 import rb
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 
 from coherence import __version_info__ as coherence_version
 
@@ -114,22 +114,22 @@ class UpnpSource(RB.BrowserSource,log.Loggable):
                     if entry == None:
                         entry = self.__db.entry_new(self.__entry_type, url)
 
-                    self.__db.set(entry, RhythmDB.PropType.TITLE, item.title)
+                    self.__db.set(entry, RB.RhythmDBPropType.TITLE, item.title)
                     try:
                         if item.artist is not None:
-                            self.__db.set(entry, RhythmDB.PropType.ARTIST, item.artist)
+                            self.__db.set(entry, RB.RhythmDBPropType..ARTIST, item.artist)
                     except AttributeError:
                         pass
                     try:
                         if item.album is not None:
-                            self.__db.set(entry, RhythmDB.PropType.ALBUM, item.album)
+                            self.__db.set(entry, RB.RhythmDBPropType..ALBUM, item.album)
                     except AttributeError:
                         pass
 
                     try:
                         self.info("%r %r", item.title,item.originalTrackNumber)
                         if item.originalTrackNumber is not None:
-                            self.__db.set(entry, RhythmDB.PropType.TRACK_NUMBER, int(item.originalTrackNumber))
+                            self.__db.set(entry, RB.RhythmDBPropType..TRACK_NUMBER, int(item.originalTrackNumber))
                     except AttributeError:
                         pass
 
@@ -137,10 +137,10 @@ class UpnpSource(RB.BrowserSource,log.Loggable):
                         h,m,s = duration.split(':')
                         seconds = int(h)*3600 + int(m)*60 + int(s)
                         self.info("%r %r:%r:%r %r", duration, h, m , s, seconds)
-                        self.__db.set(entry, RhythmDB.PropType.DURATION, seconds)
+                        self.__db.set(entry, RB.RhythmDBPropType..DURATION, seconds)
 
                     if size is not None:
-                        self.__db.set(entry, RhythmDB.PropType.FILE_SIZE,int(size))
+                        self.__db.set(entry, RB.RhythmDBPropType..FILE_SIZE,int(size))
 
                     self.__db.commit()
 
diff --git a/plugins/coherence/upnp_coherence/__init__.py b/plugins/coherence/upnp_coherence/__init__.py
index 1142b19..14ae8ad 100644
--- a/plugins/coherence/upnp_coherence/__init__.py
+++ b/plugins/coherence/upnp_coherence/__init__.py
@@ -34,6 +34,17 @@ gconf_keys = {
     'dmc_active': "/apps/rhythmbox/plugins/coherence/dmc/active",
 }
 
+class CoherenceEntryType(RB.RhythmDBEntryType):
+    def __init__(self):
+        RB.RhythmDBEntryType.__init__(self, name='Coherence')
+
+    def can_sync_metadata(self, entry):
+        return True
+
+    def sync_metadata(self, entry, changes):
+        return
+
+
 class CoherencePlugin(RB.Plugin, log.Loggable):
 
     logCategory = 'rb_coherence_plugin'
@@ -73,7 +84,7 @@ class CoherencePlugin(RB.Plugin, log.Loggable):
         self.shell = shell
         self.sources = {}
 	if self.entry_type is None:
-            self.entry_type = rhythmdb.EntryType(name='CoherenceUpnp')
+            self.entry_type = CoherenceEntryType()
             shell.props.db.register_entry_type(self.entry_type)
 
         # Set up our icon
diff --git a/plugins/context/context/AlbumTab.py b/plugins/context/context/AlbumTab.py
index 1642918..1bffaaa 100644
--- a/plugins/context/context/AlbumTab.py
+++ b/plugins/context/context/AlbumTab.py
@@ -35,7 +35,7 @@ import xml.dom.minidom as dom
 import LastFM
 
 import rb
-from gi.repository import RhythmDB
+from gi.repository import RB
 from gi.repository import Gtk
 
 class AlbumTab (gobject.GObject):
@@ -79,8 +79,8 @@ class AlbumTab (gobject.GObject):
         if entry is None:
             return None
 
-        artist = self.db.entry_get_string (entry, RhythmDB.PropType.ARTIST)
-        album  = self.db.entry_get_string (entry, RhythmDB.PropType.ALBUM)
+        artist = self.db.entry_get_string (entry, RB.RhythmDBPropType.ARTIST)
+        album  = self.db.entry_get_string (entry, RB.RhythmDBPropType.ALBUM)
         if self.active and artist != self.artist:
             self.view.loading(artist)
             self.ds.fetch_album_list (artist)
diff --git a/plugins/context/context/ArtistTab.py b/plugins/context/context/ArtistTab.py
index 6975854..8382e00 100644
--- a/plugins/context/context/ArtistTab.py
+++ b/plugins/context/context/ArtistTab.py
@@ -37,7 +37,7 @@ import rb
 import LastFM
 
 from gi.repository import Gtk
-from gi.repository import RhythmDB
+from gi.repository import RB
     
 class ArtistTab (gobject.GObject):
     
@@ -82,7 +82,7 @@ class ArtistTab (gobject.GObject):
         if entry is None:
             print "Nothing playing"
             return None
-        artist = self.db.entry_get_string (entry, RhythmDB.PropType.ARTIST)
+        artist = self.db.entry_get_string (entry, RB.RhythmDBPropType.ARTIST)
 
         if self.active and self.artist != artist:
             self.datasource.fetch_artist_data (artist)
diff --git a/plugins/context/context/ContextView.py b/plugins/context/context/ContextView.py
index c0321b7..e2301b2 100644
--- a/plugins/context/context/ContextView.py
+++ b/plugins/context/context/ContextView.py
@@ -34,7 +34,7 @@ import LyricsTab as lt
 
 import rb
 from gi.repository import Gtk, Gdk, Pango
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 
 context_ui = """
 <ui>
@@ -191,7 +191,7 @@ class ContextView (gobject.GObject):
         if playing_entry is None:
             return
 
-        playing_artist = self.db.entry_get_string (playing_entry, RhythmDB.PropType.ARTIST)
+        playing_artist = self.db.entry_get_string (playing_entry, RB.RhythmDBPropType.ARTIST)
 
         if self.current_artist != playing_artist:
             self.current_artist = playing_artist.replace ('&', '&amp;')
diff --git a/plugins/context/context/LyricsTab.py b/plugins/context/context/LyricsTab.py
index f921f43..b69930c 100644
--- a/plugins/context/context/LyricsTab.py
+++ b/plugins/context/context/LyricsTab.py
@@ -32,7 +32,7 @@ from mako.template import Template
 
 import rb
 from gi.repository import Gtk
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 class LyricsTab (gobject.GObject):
     
@@ -134,7 +134,7 @@ class LyricsView (gobject.GObject):
 class LyricsDataSource (gobject.GObject):
     
     __gsignals__ = {
-        'lyrics-ready' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (RhythmDB.Entry, gobject.TYPE_STRING,)),
+        'lyrics-ready' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (RB.RhythmDBEntry, gobject.TYPE_STRING,)),
     }
 
     def __init__ (self, db):
@@ -154,8 +154,8 @@ class LyricsDataSource (gobject.GObject):
             self.emit ('lyrics-ready', self.entry, lyrics)
 
     def get_title (self):
-        return self.db.entry_get_string(self.entry, RhythmDB.PropType.TITLE)
+        return self.db.entry_get_string(self.entry, RB.RhythmDBPropType.TITLE)
 
     def get_artist (self):
-        return self.db.entry_get_string(self.entry, RhythmDB.PropType.ARTIST)
+        return self.db.entry_get_string(self.entry, RB.RhythmDBPropType.ARTIST)
 
diff --git a/plugins/im-status/im-status/__init__.py b/plugins/im-status/im-status/__init__.py
index 42af58e..3f95b47 100644
--- a/plugins/im-status/im-status/__init__.py
+++ b/plugins/im-status/im-status/__init__.py
@@ -27,7 +27,6 @@
 
 import rb
 from gi.repository import RB
-from gi.repository import RhythmDB
 
 try:
   import dbus
@@ -136,11 +135,11 @@ class IMStatusPlugin (RB.Plugin):
 
   def set_status_from_entry (self):
     db = self.shell.get_property ("db")
-    self.current_artist = db.entry_get_string (self.current_entry, RhythmDB.PropType.ARTIST)
-    self.current_title  = db.entry_get_string (self.current_entry, RhythmDB.PropType.TITLE)
-    self.current_album  = db.entry_get_string (self.current_entry, RhythmDB.PropType.ALBUM)
+    self.current_artist = db.entry_get_string (self.current_entry, RB.RhythmDBPropType.ARTIST)
+    self.current_title  = db.entry_get_string (self.current_entry, RB.RhythmDBPropType.TITLE)
+    self.current_album  = db.entry_get_string (self.current_entry, RB.RhythmDBPropType.ALBUM)
 
-    if self.current_entry.get_entry_type().props.category == RhythmDB.EntryCategory.STREAM:
+    if self.current_entry.get_entry_type().props.category == RB.RhythmDBEntryCategory.STREAM:
       if not self.current_artist:
         self.current_artist = db.entry_request_extra_metadata (self.current_entry, STREAM_SONG_ARTIST)
       if not self.current_title:
diff --git a/plugins/jamendo/jamendo/JamendoSaxHandler.py b/plugins/jamendo/jamendo/JamendoSaxHandler.py
index 9cd9763..42c64f6 100644
--- a/plugins/jamendo/jamendo/JamendoSaxHandler.py
+++ b/plugins/jamendo/jamendo/JamendoSaxHandler.py
@@ -22,7 +22,7 @@ import xml.sax, xml.sax.handler
 import datetime
 
 import rb
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 data = {"artist" : ["name"],
         "album" : ["name","id","releasedate","id3genre"],
@@ -76,17 +76,17 @@ class JamendoSaxHandler(xml.sax.handler.ContentHandler):
 			entry = self.__db.entry_lookup_by_location (track_url)
 			if entry == None:
 				entry = self.__db.entry_new(self.__entry_type, track_url)
-			self.__db.set(entry, RhythmDB.PropType.ARTIST, self.__data["artist"]["name"])
-			self.__db.set(entry, RhythmDB.PropType.ALBUM, self.__data["album"]["name"])
-			self.__db.set(entry, RhythmDB.PropType.TITLE, self.__data["track"]["name"])
-			self.__db.set(entry, RhythmDB.PropType.TRACK_NUMBER, int(self.__data["track"]["numalbum"]))
-			self.__db.set(entry, RhythmDB.PropType.DATE, date)
-			self.__db.set(entry, RhythmDB.PropType.GENRE, albumgenre)
-			self.__db.set(entry, RhythmDB.PropType.DURATION, duration)
+			self.__db.set(entry, RB.RhythmDBPropType.ARTIST, self.__data["artist"]["name"])
+			self.__db.set(entry, RB.RhythmDBPropType.ALBUM, self.__data["album"]["name"])
+			self.__db.set(entry, RB.RhythmDBPropType.TITLE, self.__data["track"]["name"])
+			self.__db.set(entry, RB.RhythmDBPropType.TRACK_NUMBER, int(self.__data["track"]["numalbum"]))
+			self.__db.set(entry, RB.RhythmDBPropType.DATE, date)
+			self.__db.set(entry, RB.RhythmDBPropType.GENRE, albumgenre)
+			self.__db.set(entry, RB.RhythmDBPropType.DURATION, duration)
 
 			# slight misuse, but this is far more efficient than having a python dict
 			# containing this data.
-			self.__db.set(entry, RhythmDB.PropType.MUSICBRAINZ_ALBUMID, self.__data["album"]["id"])
+			self.__db.set(entry, RB.RhythmDBPropType.MUSICBRAINZ_ALBUMID, self.__data["album"]["id"])
 			
 			if self.__num_tracks % 1000 == 0:
 				self.__db.commit()
diff --git a/plugins/jamendo/jamendo/JamendoSource.py b/plugins/jamendo/jamendo/JamendoSource.py
index adab830..69ff8f9 100644
--- a/plugins/jamendo/jamendo/JamendoSource.py
+++ b/plugins/jamendo/jamendo/JamendoSource.py
@@ -29,7 +29,7 @@ import datetime
 
 import rb
 from gi.repository import Gtk, Gdk, GConf
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 
 from JamendoSaxHandler import JamendoSaxHandler
 import JamendoConfigureDialog
@@ -290,7 +290,7 @@ class JamendoSource(RB.BrowserSource):
 		#without any track selected
 		if len(tracks) == 1:
 			track = tracks[0]
-			albumid = self.__db.entry_get_string(track, RhythmDB.PropType.MB_ALBUMID)
+			albumid = self.__db.entry_get_string(track, RB.RhythmDBPropType.MB_ALBUMID)
 
 			formats = {}
 			formats["mp32"] = mp32_uri + albumid
@@ -317,8 +317,8 @@ class JamendoSource(RB.BrowserSource):
 		if len(tracks) == 1:
 			track = tracks[0]
 			# The Album ID can be used to lookup the artist, and issue a clean redirect.
-			albumid = self.__db.entry_get_string(track, RhythmDB.PropType.MB_ALBUMID)
-			artist = self.__db.entry_get_string(track, RhythmDB.PropType.ARTIST)
+			albumid = self.__db.entry_get_string(track, RB.RhythmDBPropType.MB_ALBUMID)
+			artist = self.__db.entry_get_string(track, RB.RhythmDBPropType.ARTIST)
 			url = artist_url + albumid.__str__() + "/"
 
 			l = rb.Loader()
@@ -341,8 +341,8 @@ class JamendoSource(RB.BrowserSource):
 		gobject.idle_add(self.emit_cover_art_uri, entry)
 
 	def emit_cover_art_uri (self, entry):
-		stream = self.__db.entry_get_string (entry, RhythmDB.PropType.LOCATION)
-		albumid = self.__db.entry_get_string (entry, RhythmDB.PropType.MB_ALBUMID)
+		stream = self.__db.entry_get_string (entry, RB.RhythmDBPropType.LOCATION)
+		albumid = self.__db.entry_get_string (entry, RB.RhythmDBPropType.MB_ALBUMID)
 		url = artwork_url % albumid
 
 		self.__db.emit_entry_extra_metadata_notify (entry, "rb:coverArt-uri", str(url))
diff --git a/plugins/jamendo/jamendo/__init__.py b/plugins/jamendo/jamendo/__init__.py
index 926b27f..a30c6c4 100644
--- a/plugins/jamendo/jamendo/__init__.py
+++ b/plugins/jamendo/jamendo/__init__.py
@@ -36,7 +36,7 @@ from JamendoConfigureDialog import JamendoConfigureDialog
 
 import rb
 from gi.repository import Gtk
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 
 popup_ui = """
 <ui>
@@ -54,9 +54,9 @@ popup_ui = """
 </ui>
 """
 
-class JamendoEntryType(RhythmDB.EntryType):
+class JamendoEntryType(RB.RhythmDBEntryType):
 	def __init__(self):
-		RhythmDB.EntryType.__init__(self, name="jamendo")
+		RB.RhythmDBEntryType.__init__(self, name="jamendo")
 
 	def do_can_sync_metadata(self, entry):
 		return True
diff --git a/plugins/lyrics/lyrics/__init__.py b/plugins/lyrics/lyrics/__init__.py
index d2edebb..6f414c2 100644
--- a/plugins/lyrics/lyrics/__init__.py
+++ b/plugins/lyrics/lyrics/__init__.py
@@ -30,7 +30,7 @@ import os, re
 
 import rb
 from gi.repository import Gtk, GConf
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 
 import LyricsParse
 from LyricsConfigureDialog import LyricsConfigureDialog
@@ -106,8 +106,8 @@ def get_artist_and_title(db, entry):
 	if stream_song_title is not None:
 		(artist, title) = extract_artist_and_title(stream_song_title)
 	else:
-		artist = entry.get_string(RhythmDB.PropType.ARTIST)
-		title = entry.get_string(RhythmDB.PropType.TITLE)
+		artist = entry.get_string(RB.RhythmDBPropType.ARTIST)
+		title = entry.get_string(RB.RhythmDBPropType.TITLE)
 	return (artist, title)
 
 def extract_artist_and_title(stream_song_title):
diff --git a/plugins/magnatune/magnatune/MagnatuneSource.py b/plugins/magnatune/magnatune/MagnatuneSource.py
index 72df8b1..e64c924 100644
--- a/plugins/magnatune/magnatune/MagnatuneSource.py
+++ b/plugins/magnatune/magnatune/MagnatuneSource.py
@@ -34,7 +34,7 @@ import threading
 import zipfile
 
 import rb
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 from gi.repository import Gtk, GConf, GnomeKeyring
 
 from TrackListHandler import TrackListHandler
@@ -191,7 +191,7 @@ class MagnatuneSource(RB.BrowserSource):
 		urls = set([])
 
 		for tr in tracks:
-			sku = self.__sku_dict[self.__db.entry_get_string(tr, RhythmDB.PropType.LOCATION)]
+			sku = self.__sku_dict[self.__db.entry_get_string(tr, RB.RhythmDBPropType.LOCATION)]
 			url = self.__home_dict[sku]
 			if url not in urls:
 				Gtk.show_uri(screen, url, Gdk.CURRENT_TIME)
@@ -203,7 +203,7 @@ class MagnatuneSource(RB.BrowserSource):
 		urls = set([])
 
 		for tr in tracks:
-			sku = self.__sku_dict[self.__db.entry_get_string(tr, RhythmDB.PropType.LOCATION)]
+			sku = self.__sku_dict[self.__db.entry_get_string(tr, RB.RhythmDBPropType.LOCATION)]
 			url = magnatune_buy_album_uri + urllib.urlencode({ 'sku': sku, 'ref': magnatune_partner_id })
 			if url not in urls:
 				Gtk.show_uri(screen, url, Gdk.CURRENT_TIME)
@@ -226,7 +226,7 @@ class MagnatuneSource(RB.BrowserSource):
 		skus = []
 
 		for track in tracks:
-			sku = self.__sku_dict[self.__db.entry_get_string(track, RhythmDB.PropType.LOCATION)]
+			sku = self.__sku_dict[self.__db.entry_get_string(track, RB.RhythmDBPropType.LOCATION)]
 			if sku in skus:
 				continue
 			skus.append(sku)
@@ -565,7 +565,7 @@ class MagnatuneSource(RB.BrowserSource):
 		gobject.idle_add(self.emit_cover_art_uri, entry)
 
 	def emit_cover_art_uri(self, entry):
-		sku = self.__sku_dict[self.__db.entry_get_string(entry, RhythmDB.PropType.LOCATION)]
+		sku = self.__sku_dict[self.__db.entry_get_string(entry, RB.RhythmDBPropType.LOCATION)]
 		url = self.__art_dict[sku]
 		self.__db.emit_entry_extra_metadata_notify(entry, 'rb:coverArt-uri', url)
 		return False
diff --git a/plugins/magnatune/magnatune/TrackListHandler.py b/plugins/magnatune/magnatune/TrackListHandler.py
index 5907644..97cd0b8 100644
--- a/plugins/magnatune/magnatune/TrackListHandler.py
+++ b/plugins/magnatune/magnatune/TrackListHandler.py
@@ -29,7 +29,7 @@ import xml.sax, xml.sax.handler
 import datetime, re, urllib
 
 import rb
-from gi.repository import RhythmDB
+from gi.repository import RB
 
 class TrackListHandler(xml.sax.handler.ContentHandler):
 	def __init__(self, db, entry_type, sku_dict, home_dict, art_dict, account_type, username, password):
@@ -72,7 +72,7 @@ class TrackListHandler(xml.sax.handler.ContentHandler):
 				entry = self.__db.entry_lookup_by_location (trackurl)
 				if entry == None:
 					# entry = self.__db.entry_new(self.__entry_type, trackurl)
-					entry = RhythmDB.Entry.new(self.__db, self.__entry_type, trackurl)
+					entry = RB.RhythmDBEntry.new(self.__db, self.__entry_type, trackurl)
 
 				# if year is not set, use launch date instead
 				try:
@@ -92,15 +92,15 @@ class TrackListHandler(xml.sax.handler.ContentHandler):
 				except ValueError:
 					duration = 0
 
-				self.__db.entry_set(entry, RhythmDB.PropType.ARTIST, str(self.__track['artist']))
-				self.__db.entry_set(entry, RhythmDB.PropType.ALBUM, str(self.__track['albumname']))
-				self.__db.entry_set(entry, RhythmDB.PropType.TITLE, str(self.__track['trackname']))
-				self.__db.entry_set(entry, RhythmDB.PropType.GENRE, str(self.__track['magnatunegenres']))
+				self.__db.entry_set(entry, RB.RhythmDBPropType.ARTIST, str(self.__track['artist']))
+				self.__db.entry_set(entry, RB.RhythmDBPropType.ALBUM, str(self.__track['albumname']))
+				self.__db.entry_set(entry, RB.RhythmDBPropType.TITLE, str(self.__track['trackname']))
+				self.__db.entry_set(entry, RB.RhythmDBPropType.GENRE, str(self.__track['magnatunegenres']))
 				# setting ulong properties currently crashes because we don't have enough control
 				# over the type conversion; or maybe we need to be more flexible in rhythmdb?
-				#self.__db.entry_set(entry, RhythmDB.PropType.TRACK_NUMBER, long(tracknum))
-				#self.__db.entry_set(entry, RhythmDB.PropType.DATE, long(date))
-				#self.__db.entry_set(entry, RhythmDB.PropType.DURATION, long(duration))
+				#self.__db.entry_set(entry, RB.RhythmDBPropType.TRACK_NUMBER, long(tracknum))
+				#self.__db.entry_set(entry, RB.RhythmDBPropType.DATE, long(date))
+				#self.__db.entry_set(entry, RB.RhythmDBPropType.DURATION, long(duration))
 
 				key = str(trackurl)
 				sku = intern(str(self.__track['albumsku']))
diff --git a/plugins/magnatune/magnatune/__init__.py b/plugins/magnatune/magnatune/__init__.py
index 9879226..090fe03 100644
--- a/plugins/magnatune/magnatune/__init__.py
+++ b/plugins/magnatune/magnatune/__init__.py
@@ -35,7 +35,7 @@ import datetime
 import string
 
 import rb
-from gi.repository import RB, RhythmDB
+from gi.repository import RB
 from gi.repository import GConf, GnomeKeyring, Gtk
 
 from MagnatuneSource import MagnatuneSource
@@ -57,9 +57,9 @@ popup_ui = """
 </ui>
 """
 
-class MagnatuneEntryType(RhythmDB.EntryType):
+class MagnatuneEntryType(RB.RhythmDBEntryType):
 	def __init__(self):
-		RhythmDB.EntryType.__init__(self, name='magnatune')
+		RB.RhythmDBEntryType.__init__(self, name='magnatune')
 
 	def can_sync_metadata(self, entry):
 		return True
diff --git a/plugins/pythonconsole/pythonconsole.py b/plugins/pythonconsole/pythonconsole.py
index c5d5f60..5b02020 100644
--- a/plugins/pythonconsole/pythonconsole.py
+++ b/plugins/pythonconsole/pythonconsole.py
@@ -40,7 +40,6 @@ import gobject
 
 from gi.repository import Gtk, Gdk, Pango, GConf
 from gi.repository import RB
-from gi.repository import RhythmDB
 
 try:
 	import rpdb2
@@ -110,7 +109,6 @@ class PythonConsolePlugin(RB.Plugin):
 		if not self.window:
 			ns = {'__builtins__' : __builtins__, 
 			      'RB' : RB,
-			      'RhythmDB' : RhythmDB,
 			      'shell' : shell}
 			console = PythonConsole(namespace = ns, 
 			                        destroy_cb = self.destroy_console)



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