diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-03-06 10:31:54 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-03-06 10:31:54 +0100 |
commit | c1e234beae44134d567fb3d8915a77649379fd63 (patch) | |
tree | c0662304dc023a9213b1b2466244473623def741 /nephilim/plugins | |
parent | 4bb2fd69ab26566f93815dae4aef2679c57b9d05 (diff) |
mpclient: get rid of CamelCase everywhere.
Diffstat (limited to 'nephilim/plugins')
-rw-r--r-- | nephilim/plugins/AlbumCover.py | 6 | ||||
-rw-r--r-- | nephilim/plugins/Filebrowser.py | 2 | ||||
-rw-r--r-- | nephilim/plugins/Library.py | 4 | ||||
-rw-r--r-- | nephilim/plugins/Lyrics.py | 2 | ||||
-rw-r--r-- | nephilim/plugins/Notify.py | 2 | ||||
-rw-r--r-- | nephilim/plugins/PlayControl.py | 6 | ||||
-rw-r--r-- | nephilim/plugins/Playlist.py | 4 | ||||
-rw-r--r-- | nephilim/plugins/Systray.py | 8 |
8 files changed, 17 insertions, 17 deletions
diff --git a/nephilim/plugins/AlbumCover.py b/nephilim/plugins/AlbumCover.py index ee51903..5330189 100644 --- a/nephilim/plugins/AlbumCover.py +++ b/nephilim/plugins/AlbumCover.py @@ -67,7 +67,7 @@ class wgAlbumCover(QtGui.QLabel): def refresh(self): logging.info("refreshing cover") - song = self.p.mpclient.getCurrentSong() + song = self.p.mpclient.current_song() if not song: self.clear() self.cover_loaded = False @@ -108,7 +108,7 @@ class wgAlbumCover(QtGui.QLabel): self.set_cover(cover, write) def fetch_local_manual(self): - song = self.p.mpclient.getCurrentSong() + song = self.p.mpclient.current_song() if not song: return @@ -157,7 +157,7 @@ class wgAlbumCover(QtGui.QLabel): return None def fetch_amazon_manual(self): - song = self.p.mpclient.getCurrentSong() + song = self.p.mpclient.current_song() if not song: return cover = self.fetch_amazon(song) diff --git a/nephilim/plugins/Filebrowser.py b/nephilim/plugins/Filebrowser.py index b4d055d..5faa678 100644 --- a/nephilim/plugins/Filebrowser.py +++ b/nephilim/plugins/Filebrowser.py @@ -62,7 +62,7 @@ class wgFilebrowser(QtGui.QWidget): paths = [] for index in self.view.selectedIndexes(): paths.append(u'file://' + unicode(self.model.filePath(index))) - self.plugin.mpclient.addToPlaylist(paths) + self.plugin.mpclient.add(paths) def path_changed(self): if os.path.isdir(self.path.text()): diff --git a/nephilim/plugins/Library.py b/nephilim/plugins/Library.py index 24fab35..ebc49ab 100644 --- a/nephilim/plugins/Library.py +++ b/nephilim/plugins/Library.py @@ -97,7 +97,7 @@ class LibraryWidget(QtGui.QWidget): #build a tree from library tree = [{},self.library.invisibleRootItem()] - for song in self.plugin.mpclient.listLibrary(): + for song in self.plugin.mpclient.library(): cur_item = tree for part in str(self.modes.currentText()).split('/'): tag = song.getTag(part) @@ -141,7 +141,7 @@ class LibraryWidget(QtGui.QWidget): paths = [] for item in self.library.selectedItems(): self.item_to_playlist(item, paths) - self.plugin.mpclient.addToPlaylist(paths) + self.plugin.mpclient.add(paths) def item_to_playlist(self, item, add_queue): if item.type() == 1000: diff --git a/nephilim/plugins/Lyrics.py b/nephilim/plugins/Lyrics.py index e0ca09f..c0b0fe3 100644 --- a/nephilim/plugins/Lyrics.py +++ b/nephilim/plugins/Lyrics.py @@ -58,7 +58,7 @@ class Lyrics(Plugin): def refresh(self, params = None): lyrics = None - song = self.mpclient.getCurrentSong() + song = self.mpclient.current_song() if not song: self.o.set_lyrics(None, None) return diff --git a/nephilim/plugins/Notify.py b/nephilim/plugins/Notify.py index b784534..f086693 100644 --- a/nephilim/plugins/Notify.py +++ b/nephilim/plugins/Notify.py @@ -98,7 +98,7 @@ class Notify(Plugin): return "Show interesting events in a popup window." def onSongChange(self, params): - song = self.mpclient.getCurrentSong() + song = self.mpclient.current_song() if not song: return self.settings.beginGroup(self.name) diff --git a/nephilim/plugins/PlayControl.py b/nephilim/plugins/PlayControl.py index e8dda8c..3ff7170 100644 --- a/nephilim/plugins/PlayControl.py +++ b/nephilim/plugins/PlayControl.py @@ -85,7 +85,7 @@ class wgPlayControl(QtGui.QToolBar): self.queuedSongs.extend(songs) def onStateChange(self, params): - status = self.p.mpclient.getStatus() + status = self.p.mpclient.status() if status['state'] == 'play': self.btnPlayPause.changeIcon('gfx/media-playback-pause.svg') @@ -98,7 +98,7 @@ class wgPlayControl(QtGui.QToolBar): self.slrVolume.setValue(params['newVolume']) def onBtnPlayPauseClick(self): - status=self.p.mpclient.getStatus() + status=self.p.mpclient.status() if status['state']=='play': self.p.mpclient.pause() logging.info("Toggling playback") @@ -118,7 +118,7 @@ class wgPlayControl(QtGui.QToolBar): logging.info("Playing next") def onVolumeSliderChange(self): v=self.slrVolume.value() - self.p.mpclient.setVolume(v) + self.p.mpclient.set_volume(v) if v<=1: mode='mute' else: diff --git a/nephilim/plugins/Playlist.py b/nephilim/plugins/Playlist.py index 230486c..e57c9ac 100644 --- a/nephilim/plugins/Playlist.py +++ b/nephilim/plugins/Playlist.py @@ -71,7 +71,7 @@ class PlaylistWidget(QtGui.QWidget): def fill(self): columns = self.plugin.settings.value(self.plugin.getName() + '/columns').toStringList() self.clear() - for song in self.plugin.mpclient.listPlaylist(): + for song in self.plugin.mpclient.playlist(): item = QtGui.QTreeWidgetItem() for i in range(len(columns)): item.setText(i, unicode(song.getTag(str(columns[i])))) @@ -84,7 +84,7 @@ class PlaylistWidget(QtGui.QWidget): for item in self.selectedItems(): ids.append(item.data(0, QtCore.Qt.UserRole).toPyObject().getID()) - self.plugin.mpclient.deleteFromPlaylist(ids) + self.plugin.mpclient.delete(ids) else: QtGui.QTreeWidget.keyPressEvent(self, event) diff --git a/nephilim/plugins/Systray.py b/nephilim/plugins/Systray.py index 1a9eca8..4a3c45d 100644 --- a/nephilim/plugins/Systray.py +++ b/nephilim/plugins/Systray.py @@ -29,7 +29,7 @@ class Systray(Plugin): if type(event)==QtGui.QWheelEvent: numDegrees=event.delta() / 8 numSteps=5*numDegrees/15 - self.plugin.mpclient.setVolume(self.plugin.mpclient.getVolume() + numSteps) + self.plugin.mpclient.set_volume(self.plugin.mpclient.volume() + numSteps) event.accept() return True return False @@ -51,7 +51,7 @@ class Systray(Plugin): return "Display the mpclientpc icon in the systray." def update(self, params): - status = self.mpclient.getStatus() + status = self.mpclient.status() if not status: return @@ -61,7 +61,7 @@ class Systray(Plugin): values['length'] = sec2min(status['length']) values['time'] = sec2min(status['time']) - song = self.mpclient.getCurrentSong() + song = self.mpclient.current_song() if song: self.o.setToolTip(expand_tags(self.format, (song,))) else: @@ -93,7 +93,7 @@ class Systray(Plugin): else: w.setVisible(True) elif reason == QtGui.QSystemTrayIcon.MiddleClick: - if self.mpclient.isPlaying(): + if self.mpclient.is_playing(): self.mpclient.pause() else: self.mpclient.resume() |