dev: Max. Eintraege pro Seite Setting pro Plugin
This commit is contained in:
@@ -3176,8 +3176,9 @@ def _show_popular(plugin_name: str | None = None, page: int = 1) -> None:
|
||||
|
||||
def _show_new_titles(plugin_name: str, page: int = 1, *, action_name: str = "new_titles") -> None:
|
||||
handle = _get_handle()
|
||||
page_size = LIST_PAGE_SIZE
|
||||
page = max(1, int(page or 1))
|
||||
max_items_key = f"{(plugin_name or '').strip().casefold()}_max_page_items"
|
||||
page_size = _get_setting_int(max_items_key, default=15) or LIST_PAGE_SIZE
|
||||
|
||||
plugin_name = (plugin_name or "").strip()
|
||||
plugin = _discover_plugins().get(plugin_name)
|
||||
@@ -3218,6 +3219,8 @@ def _show_new_titles(plugin_name: str, page: int = 1, *, action_name: str = "new
|
||||
xbmcplugin.endOfDirectory(handle)
|
||||
return
|
||||
page_items = [str(t).strip() for t in page_items if t and str(t).strip()]
|
||||
if page_size > 0 and len(page_items) > page_size:
|
||||
page_items = page_items[:page_size]
|
||||
page_items.sort(key=lambda value: value.casefold())
|
||||
else:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user