summaryrefslogtreecommitdiff
path: root/nephilim/song.py
diff options
context:
space:
mode:
Diffstat (limited to 'nephilim/song.py')
-rw-r--r--nephilim/song.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/nephilim/song.py b/nephilim/song.py
index eb5fedb..709934a 100644
--- a/nephilim/song.py
+++ b/nephilim/song.py
@@ -26,7 +26,7 @@ class Song(dict):
Song provides a dictionary-like wrapper around song metadata.
Its instances are generated by MPClient, don't instantiate it
directly.
- Its instances _shouldn't_ be stored, use SongRef or PlaylistEntryRef for that.
+ Its instances _shouldn't_ be stored, use SongRef for that.
Access '?tag' to get always at least an empty string.
"""
@@ -109,23 +109,3 @@ class SongRef:
def song(self):
return list(self.mpclient.find_sync('file', self.path))[0]
-
-class PlaylistEntryRef:
- """This class stores a reference to a playlist entry instead of full
- metadata to conserve memory. Song's tags can be accessed
- as in Song, but it requires a call to MPD for each tag. """
- plid = None
- mpclient = None
-
- def __init__(self, mpclient, plid):
- self.mpclient = mpclient
- self.plid = plid
-
- def __getitem__(self, key):
- return self.plid if key == 'id' else self.song()[key]
-
- def __nonzero__(self):
- return self.plid != '-1'
-
- def song(self):
- return self.mpclient.get_plist_song(self.plid)