summaryrefslogtreecommitdiff
path: root/nephilim/song.py
diff options
context:
space:
mode:
Diffstat (limited to 'nephilim/song.py')
-rw-r--r--nephilim/song.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/nephilim/song.py b/nephilim/song.py
index 454b53d..607d4a6 100644
--- a/nephilim/song.py
+++ b/nephilim/song.py
@@ -105,21 +105,21 @@ 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. """
- id = None
+ plid = None
mpclient = None
- def __init__(self, mpclient, id):
+ def __init__(self, mpclient, plid):
self.mpclient = mpclient
- self.id = id
+ self.plid = plid
def __getitem__(self, key):
- return self.id if key == 'id' else self.song()[key]
+ return self.plid if key == 'id' else self.song()[key]
def __nonzero__(self):
- return self.id != '-1'
+ return self.plid != '-1'
def song(self):
try:
- return Song(self.mpclient.playlistid(id)[0])
+ return self.mpclient.playlistid(self.plid)
except IndexError:
return Song({})