Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fanart/poster change #77

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions custom_components/plex_recently_added/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def parse_library(root):

return output

import logging
_LOGGER = logging.getLogger(__name__)

def parse_data(data, max, base_url, token, identifier, section_key, images_base_url, is_all = False):
if is_all:
sorted_data = []
Expand Down Expand Up @@ -69,6 +72,20 @@ def parse_data(data, max, base_url, token, identifier, section_key, images_base_
data_output["fanart"] = (f'{images_base_url}?path={art}') if art else ""
data_output["deep_link"] = deep_link if identifier else None

_LOGGER.warn({
"fanart": {
"self": (f'{images_base_url}?path={item.get("art", None)}') if item.get("art", None) else "",
"grandparent": (f'{images_base_url}?path={item.get("grandparentArt", None)}') if item.get("grandparentArt", None) else "",
"current": (f'{images_base_url}?path={art}') if art else ""
},
"poster": {
"self": (f'{images_base_url}?path={item.get("thumb", None)}') if item.get("thumb", None) else "",
"parent": (f'{images_base_url}?path={item.get("parentThumb", None)}') if item.get("parentThumb", None) else "",
"grandparent": (f'{images_base_url}?path={item.get("grandparentThumb", None)}') if item.get("grandparentThumb", None) else "",
"current": (f'{images_base_url}?path={thumb}') if thumb else ""
}
})

output.append(data_output)

return output
Expand Down
Loading