mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Sort Kodi BrowseMedia children TV Shows and Movies (#41377)
This commit is contained in:
parent
9649525fe6
commit
344514601d
@ -176,6 +176,9 @@ async def build_item_response(media_library, payload):
|
||||
except UnknownMediaType:
|
||||
pass
|
||||
|
||||
if search_type in (MEDIA_TYPE_TVSHOW, MEDIA_TYPE_MOVIE) and search_id == "":
|
||||
children.sort(key=lambda x: x.title.replace("The ", "", 1), reverse=False)
|
||||
|
||||
response = BrowseMedia(
|
||||
media_class=CONTAINER_TYPES_SPECIFIC_MEDIA_CLASS.get(
|
||||
search_type, MEDIA_CLASS_DIRECTORY
|
||||
|
Loading…
x
Reference in New Issue
Block a user