curds: Rename on-add notification to add-track

This matches the rest of my notification naming style

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2019-03-14 10:39:07 -04:00
parent d42492ced5
commit 3529aa5395
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class Playlist(list):
def add(self, track):
if track is not None and track not in self:
self.append(track)
notify.Notify.notify("on-add", self, track)
notify.Notify.notify("add-track", self, track)
def next(self):
max = len(self) - 1

View File

@ -77,7 +77,7 @@ class TestPlaylist(unittest.TestCase):
track = tags.Track.lookup(os.path.join(path, "01 - Test Track 01.ogg"))
plist = playlist.Playlist("Test Playlist")
notify.Notify.notify_me("on-add", self.on_add)
notify.Notify.notify_me("add-track", self.on_add)
plist.add(track)
self.assertEqual(self.cb_plist, plist)