diff --git a/HISTORY.rst b/HISTORY.rst index 80224a8..f4980f5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,15 @@ History ======= +v0.8.5 +------ +* Cleanup: Removed deprecated function(s). - tehkillerbee_ +* Feature: MixV2: Add support for parsing mixes originating from PageCategoryV2. - tehkillerbee_ +* Feature: Add support for PageCategoryV2 as used on Home page. - tehkillerbee_, Nokse22_ +* Feature: Add pagination workers from mopidy-tidal - tehkillerbee_, BlackLight_ +* Fix(playlist): Improve v2 endpoint usage. - tehkillerbee_ +* fix(playlist): More robust handling of the passed objects. - BlackLight_ + v0.8.4 ------ * Album: Add UPC barcode, genre URL for tidal tracks - tehkillerbee_ diff --git a/docs/conf.py b/docs/conf.py index 366d97c..75b6773 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,7 +23,7 @@ author = "The tidalapi Developers" # The full version, including alpha/beta/rc tags -release = "0.8.4" +release = "0.8.5" # -- General configuration --------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index a9311e3..3096903 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tidalapi" -version = "0.8.4" +version = "0.8.5" description = "Unofficial API for TIDAL music streaming service." authors = ["Thomas Amland "] maintainers = ["tehkillerbee "] diff --git a/tidalapi/__init__.py b/tidalapi/__init__.py index e2cfa39..a292f13 100644 --- a/tidalapi/__init__.py +++ b/tidalapi/__init__.py @@ -17,4 +17,4 @@ User, ) -__version__ = "0.8.4" +__version__ = "0.8.5" diff --git a/tidalapi/page.py b/tidalapi/page.py index a5c3bc9..4bd3300 100644 --- a/tidalapi/page.py +++ b/tidalapi/page.py @@ -27,6 +27,7 @@ Iterator, List, Optional, + Type, Union, cast, ) @@ -310,7 +311,7 @@ def _parse_base(self, list_item: Dict): self.module_id = list_item.get("moduleId") self.title = list_item.get("title") self.subtitle = list_item.get("subtitle") - self.description = list_item.get("description") + self.description = list_item.get("description", self.title) self._more = More.parse(list_item) def parse(self, json_obj: JsonObj): diff --git a/tidalapi/request.py b/tidalapi/request.py index d584830..d16eab6 100644 --- a/tidalapi/request.py +++ b/tidalapi/request.py @@ -258,24 +258,3 @@ def map_json( if parse is None: raise ValueError("A parser must be supplied") return list(map(parse, items)) - - def get_items(self, url: str, parse: Callable[..., Any]) -> List[Any]: - """Returns a list of items, used when there are over a 100 items, but TIDAL - doesn't always allow more specifying a higher limit. - - Not meant for use outside of this library. - - :param url: TIDAL api endpoint where you get the objects. - :param parse: The method that parses the data in the url - item_List: List[Any] = [] - """ - - params = {"offset": 0, "limit": 100} - remaining = 100 - item_list: List[Any] = [] - while remaining == 100: - items = self.map_request(url, params=params, parse=parse) - remaining = len(items) - params["offset"] += 100 - item_list.extend(items or []) - return item_list diff --git a/tidalapi/session.py b/tidalapi/session.py index 9ee5401..4dc2270 100644 --- a/tidalapi/session.py +++ b/tidalapi/session.py @@ -1096,7 +1096,7 @@ def home(self) -> page.Page: base_url=self.config.api_v2_location, params=params, ).json() - return self.page.parseV2(json_obj) + return self.page.parse(json_obj) def explore(self) -> page.Page: """