Skip to content

Commit e1f5366

Browse files
committed
Fanart/poster change
- logging all used/possible images for fanart/poster
1 parent 797a5ef commit e1f5366

File tree

1 file changed

+17
-0
lines changed
  • custom_components/plex_recently_added

1 file changed

+17
-0
lines changed

custom_components/plex_recently_added/parser.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ def parse_library(root):
1919

2020
return output
2121

22+
import logging
23+
_LOGGER = logging.getLogger(__name__)
24+
2225
def parse_data(data, max, base_url, token, identifier, section_key, images_base_url, is_all = False):
2326
if is_all:
2427
sorted_data = []
@@ -69,6 +72,20 @@ def parse_data(data, max, base_url, token, identifier, section_key, images_base_
6972
data_output["fanart"] = (f'{images_base_url}?path={art}') if art else ""
7073
data_output["deep_link"] = deep_link if identifier else None
7174

75+
_LOGGER.warn({
76+
"fanart": {
77+
"self": (f'{images_base_url}?path={item.get("art", None)}') if item.get("art", None) else "",
78+
"grandparent": (f'{images_base_url}?path={item.get("grandparentArt", None)}') if item.get("grandparentArt", None) else "",
79+
"current": (f'{images_base_url}?path={art}') if art else ""
80+
},
81+
"poster": {
82+
"self": (f'{images_base_url}?path={item.get("thumb", None)}') if item.get("thumb", None) else "",
83+
"parent": (f'{images_base_url}?path={item.get("parentThumb", None)}') if item.get("parentThumb", None) else "",
84+
"grandparent": (f'{images_base_url}?path={item.get("grandparentThumb", None)}') if item.get("grandparentThumb", None) else "",
85+
"current": (f'{images_base_url}?path={thumb}') if thumb else ""
86+
}
87+
})
88+
7289
output.append(data_output)
7390

7491
return output

0 commit comments

Comments
 (0)