Remove path parameter from get_album, remove get_album_by_id.

First of all, I realized the return statement was using the
outdated singular name of the method. But anyway, I don't like the
idea that this method would sometimes return a single album by id
or a list of albums by path. If you want to get by path, use
get_albums_by_path explicitly.
This commit is contained in:
voussoir 2020-09-17 21:09:10 -07:00
parent 838982b6c3
commit 22d16693f3

View file

@ -33,16 +33,7 @@ class PDBAlbumMixin:
def __init__(self):
super().__init__()
def get_album(self, id=None, path=None):
if not helpers.is_xor(id, path):
raise exceptions.NotExclusive(['id', 'path'])
if id is not None:
return self.get_album_by_id(id)
else:
return self.get_album_by_path(path)
def get_album_by_id(self, id):
def get_album(self, id):
return self.get_thing_by_id('album', id)
def get_album_count(self):