diff --git a/.github/changelog.md b/.github/changelog.md index e0348801..5132e9bf 100644 --- a/.github/changelog.md +++ b/.github/changelog.md @@ -1,20 +1,23 @@ # What's New? + - Auth - New artists/albums Sort by: last played, no. of streams, total stream duration +- Option to show now playing track info on tab title. Go to Settings > Appearance to enable ## Improvements + - The context menu now doesn't take forever to open up - Merged "Save as Playlist" with "Add to Playlist" > "New Playlist" ## Bug fixes + - Add to queue adding to last index -1 -- ## Development -- Rewritten the whole DB layer to move stores from memory to the database. +- Rewritten the whole DB layer to move stores from memory to the database. ## THE BIG ONE API CHANGES @@ -22,13 +25,14 @@ ```ts interface Genre { - name: str; - genrehash: str; + name: str; + genrehash: str; } ``` - Pairing via QR Code has been split into 2 endpoint: - 1. `/getpaircode` - 2. `/pair` -- \ No newline at end of file + 1. `/getpaircode` + 2. `/pair` + +- diff --git a/app/models/album.py b/app/models/album.py index f6262b8a..fb3cda97 100644 --- a/app/models/album.py +++ b/app/models/album.py @@ -39,62 +39,9 @@ class Album: versions: list[str] = dataclasses.field(default_factory=list) def __post_init__(self): - # self.date = datetime.datetime.fromtimestamp(self.date).year self.image = self.albumhash + ".webp" self.populate_versions() - # albumhash: str - # title: str - # albumartists: list[Artist] - - # albumartists_hashes: str = "" - # image: str = "" - # count: int = 0 - # duration: int = 0 - # colors: list[str] = dataclasses.field(default_factory=list) - # date: str = "" - - # created_date: int = 0 - # og_title: str = "" - # base_title: str = "" - # is_soundtrack: bool = False - # is_compilation: bool = False - # is_single: bool = False - # is_EP: bool = False - # is_favorite: bool = False - # is_live: bool = False - - # genres: list[str] = dataclasses.field(default_factory=list) - - # def __post_init__(self): - # self.title = self.title.strip() - # self.og_title = self.title - # self.image = self.albumhash + ".webp" - - # # Fetch album artists from title - # if get_flag(SessionVarKeys.EXTRACT_FEAT): - # featured, self.title = parse_feat_from_title(self.title) - - # if len(featured) > 0: - # original_lower = "-".join([a.name.lower() for a in self.albumartists]) - # self.albumartists.extend( - # [Artist(a) for a in featured if a.lower() not in original_lower] - # ) - - # from ..store.tracks import TrackStore - - # TrackStore.append_track_artists(self.albumhash, featured, self.title) - - # # Handle album version data - # else: - # self.base_title = get_base_title_and_versions( - # self.title, get_versions=False - # )[0] - - # self.albumartists_hashes = "-".join(a.artisthash for a in self.albumartists) - - # # def set_colors(self, colors: list[str]): - # # self.colors = colors def populate_versions(self): _, self.versions = get_base_title_and_versions(self.og_title, get_versions=True) @@ -223,28 +170,3 @@ class Album: # TODO: Review -> Are the above commented checks necessary? ): return True - - # def get_date_from_tracks(self, tracks: list[Track]): - # """ - # Gets the date of the album its tracks. - - # Args: - # tracks (list[Track]): The tracks of the album. - # """ - # if self.date: - # return - - # dates = (int(t.date) for t in tracks if t.date) - # try: - # self.date = datetime.datetime.fromtimestamp(min(dates)).year - # except: - # self.date = datetime.datetime.now().year - - # def set_count(self, count: int): - # self.count = count - - # def set_duration(self, duration: int): - # self.duration = duration - - # def set_created_date(self, created_date: int): - # self.created_date = created_date