curds: Rename PlaylistManager current_changed()

Simply drop the underscores to make the code a little easier to read.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2019-04-18 11:55:01 -04:00
parent dbc7683ccd
commit a767cc08b8
1 changed files with 5 additions and 3 deletions

View File

@ -19,19 +19,21 @@ class PlaylistManager(node.PlaylistNode):
self.current = [ self.lookup("Collection") ]
self.track = None
def __current_changed(self, old):
def current_changed(self, old):
if old != self.current[0]:
old.changed()
self.current[0].changed()
def next(self):
old = self.current[0]
self.track = self.current[0].next()
while self.track == None and len(self.current) > 1:
self.current.pop(0)
self.track = self.current[0].next()
self.lookup("Previous").add(self.track)
self.__current_changed(old)
self.current_changed(old)
return self.track
def peek(self, n):
@ -69,4 +71,4 @@ class PlaylistManager(node.PlaylistNode):
self.current.remove(plist)
self.current.insert(0, plist)
self.__current_changed(old)
self.current_changed(old)