diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-01 14:40:32 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-01 14:40:32 +0200 |
| commit | a9b51e5a39f3375947204215c50ac70c86a176c7 (patch) | |
| tree | bc3bf280daaa4c56b80936a23c3d12cf62816d41 | |
| parent | 1a833f30fe98acc4692b4f8684a6d1f9baa99d82 (diff) | |
| download | jasper-client-a9b51e5a39f3375947204215c50ac70c86a176c7.tar.gz jasper-client-a9b51e5a39f3375947204215c50ac70c86a176c7.zip | |
Use instance attributes in MPDWrapper
| -rw-r--r-- | client/modules/MPDControl.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/client/modules/MPDControl.py b/client/modules/MPDControl.py index ecf857e..778fe5c 100644 --- a/client/modules/MPDControl.py +++ b/client/modules/MPDControl.py @@ -230,15 +230,6 @@ class Song(object): self.album = album class MPDWrapper(object): - - client = None - songs = [] # may have duplicates - playlists = [] - - # capitalized strings - song_titles = [] - song_artists = [] - def __init__(self, server="localhost", port=6600): """ Prepare the client and music variables @@ -260,6 +251,11 @@ class MPDWrapper(object): for playlist in self.playlists: self.client.load(playlist) + self.songs = [] # may have duplicates + # capitalized strings + self.song_titles = [] + self.song_artists = [] + soup = self.client.playlist() for i in range(0, len(soup) / 10): index = i * 10 |
