diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 3dbdc49..7658439 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -8,6 +8,20 @@ The page attempt to keep a clear list of breaking/non-breaking changes and new f :local: :backlinks: none +v0.13.0 +----------- +Bug Fixes +########### +* Renamed `base.search` `category` parameter to `search_category` to avoid conflict with filters +* Fixed the way IDs are retrieved +* Fixed a bug where saving files and medias would not stream the response +* Fixed issue where the front page would sometimes fail to parse + +New Features +############## +* `File` and `Addon` now have a `location` value that contains the location list of the entity +* `File.save`, `Addon.save` and `Media.save` can now take `chunk_size` as a keyword parameter to define the size of the chunks to stream in + v0.12.0 ------- Bug Fixes diff --git a/moddb/base.py b/moddb/base.py index ecc3066..5af5155 100644 --- a/moddb/base.py +++ b/moddb/base.py @@ -17,7 +17,7 @@ def search( - category: SearchCategory, + search_category: SearchCategory, *, query: str = None, sort: Tuple[str, str] = None, @@ -35,7 +35,7 @@ def search( Parameters ------------ - category : SearchCategory + search_category : SearchCategory The model type that you want to search query : str String to search for in the model title @@ -58,7 +58,7 @@ def search( game = filters.get("game", None) game = game.id if game else None - url = f"{BASE_URL}/{category.name}/page/{page}" + url = f"{BASE_URL}/{search_category.name}/page/{page}" filter_parsed = {key: value.value for key, value in filters.items() if hasattr(value, "value")} params = { @@ -82,7 +82,7 @@ def search( total_pages=total_pages, current_page=current_page, params=params, - url=f"{BASE_URL}/{category.name}", + url=f"{BASE_URL}/{search_category.name}", total_results=total_results, ) diff --git a/moddb/boxes.py b/moddb/boxes.py index 8ccd22b..ce005f3 100644 --- a/moddb/boxes.py +++ b/moddb/boxes.py @@ -5,8 +5,9 @@ import logging import re import sys -from typing import TYPE_CHECKING, Any, List, Tuple, Union +from typing import TYPE_CHECKING, Any, Generic, List, Tuple, TypeVar +from typing_extensions import Self from bs4 import BeautifulSoup from .enums import ( @@ -1072,8 +1073,9 @@ def __init__(self, **kwargs): def __repr__(self): return f"