Improve loops and lists (#113269)
* Enable PERF * Enable PERF rule * Enable PERF rule * Don't enable flag yet
This commit is contained in:
parent
8a98fb7cfd
commit
05172d8e4d
30 changed files with 125 additions and 172 deletions
|
@ -124,18 +124,18 @@ class SynologyPhotosMediaSource(MediaSource):
|
|||
can_expand=True,
|
||||
)
|
||||
]
|
||||
for album in albums:
|
||||
ret.append(
|
||||
BrowseMediaSource(
|
||||
domain=DOMAIN,
|
||||
identifier=f"{item.identifier}/{album.album_id}",
|
||||
media_class=MediaClass.DIRECTORY,
|
||||
media_content_type=MediaClass.IMAGE,
|
||||
title=album.name,
|
||||
can_play=False,
|
||||
can_expand=True,
|
||||
)
|
||||
ret.extend(
|
||||
BrowseMediaSource(
|
||||
domain=DOMAIN,
|
||||
identifier=f"{item.identifier}/{album.album_id}",
|
||||
media_class=MediaClass.DIRECTORY,
|
||||
media_content_type=MediaClass.IMAGE,
|
||||
title=album.name,
|
||||
can_play=False,
|
||||
can_expand=True,
|
||||
)
|
||||
for album in albums
|
||||
)
|
||||
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue