Skip to content

Plex showtime: Added show only artwork option #3024

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

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3f5a5bc
Improving finding art function and small bug fix
MichaelYagi Oct 29, 2024
68d4639
Corrected labelling
MichaelYagi Oct 29, 2024
67d4faf
Added option to show summary
MichaelYagi Nov 1, 2024
1196435
Added option to show summary
MichaelYagi Nov 1, 2024
e858335
Added default plex portrait image
MichaelYagi Nov 1, 2024
88c1123
Fixed line counter
MichaelYagi Nov 1, 2024
68712b3
Fixed line counter
MichaelYagi Nov 1, 2024
848321b
Fixed vertical marquee
MichaelYagi Nov 1, 2024
f645c8a
Find summary
MichaelYagi Nov 1, 2024
97e1d0c
Updated placeholder image
MichaelYagi Nov 2, 2024
fc10e63
Show summary view if it has a summary
MichaelYagi Nov 2, 2024
f1f7580
Code refactoring
MichaelYagi Nov 2, 2024
68794d4
Clarified option description
MichaelYagi Nov 2, 2024
1cba32c
Clarified option description
MichaelYagi Nov 2, 2024
0d13303
Clarified option description
MichaelYagi Nov 2, 2024
fb263a8
Clarified option description
MichaelYagi Nov 2, 2024
557ae31
Clarified option description
MichaelYagi Nov 2, 2024
fb17a4f
Adjusted line length
MichaelYagi Nov 3, 2024
5dd6685
Adjusted line max length
MichaelYagi Nov 4, 2024
97cb9f4
Adjusted line max length
MichaelYagi Nov 4, 2024
7631472
Adjust art order in summary mode
MichaelYagi Nov 4, 2024
d71dfb8
Small change in config wording
MichaelYagi Nov 4, 2024
6e5d750
Added splash page
MichaelYagi Nov 5, 2024
ee35d8f
Merge branch 'tidbyt:main' into main
MichaelYagi Nov 5, 2024
074be61
Added splash page for API image app
MichaelYagi Nov 5, 2024
d607db3
Merge branch 'main' of github.com:MichaelYagi/community into main
MichaelYagi Nov 5, 2024
c23b5ad
Merge branch 'tidbyt:main' into main
MichaelYagi Nov 5, 2024
967858a
Changed random seed
MichaelYagi Nov 7, 2024
b507837
Merge branch 'main' of github.com:MichaelYagi/community into main
MichaelYagi Nov 7, 2024
2ab53d4
Merge branch 'tidbyt:main' into main
MichaelYagi Nov 10, 2024
7112607
Merge branch 'tidbyt:main' into main
MichaelYagi Nov 16, 2024
64c840b
Added support for xml
MichaelYagi Nov 17, 2024
721dedc
Merge branch 'main' of github.com:MichaelYagi/community into main
MichaelYagi Nov 17, 2024
bc830c6
Fixed RSS feeds
MichaelYagi Nov 18, 2024
6ab0bbb
Fixed RSS feeds
MichaelYagi Nov 18, 2024
c7a9fbc
Fixed RSS feeds
MichaelYagi Nov 18, 2024
57c6481
Fixed RSS feeds
MichaelYagi Nov 18, 2024
e64f5ea
Fixed RSS feeds
MichaelYagi Nov 18, 2024
3000336
Fixed RSS feeds
MichaelYagi Nov 18, 2024
6c04184
Added support for xml
MichaelYagi Nov 18, 2024
e38331c
Submitting this along side apiimage due to long review cycle, added a…
MichaelYagi Nov 20, 2024
fc6dacf
Merge branch 'tidbyt:main' into main
MichaelYagi Apr 25, 2025
5530b79
Added show artwork only option
MichaelYagi Apr 25, 2025
fe2bc72
Added show artwork only option
MichaelYagi Apr 25, 2025
be10d4c
Rearranged configs
MichaelYagi Apr 26, 2025
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
55 changes: 45 additions & 10 deletions apps/plexshowtime/plex_showtime.star
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def main(config):
plex_server_url = config.str("plex_server_url", "")
plex_token = config.str("plex_token", "")
show_heading = config.bool("show_heading", True)
show_only_artwork = config.bool("show_only_artwork", False)
heading_color = config.str("heading_color", "#FFA500")
font_color = config.str("font_color", "#FFFFFF")
show_summary = config.bool("show_summary", False)
Expand All @@ -38,6 +39,10 @@ def main(config):
fit_screen = config.bool("fit_screen", True)
debug_output = config.bool("debug_output", False)

if show_only_artwork:
show_heading = False
show_summary = False

ttl_seconds = 5

plex_endpoints = []
Expand Down Expand Up @@ -74,13 +79,14 @@ def main(config):
print("CONFIG - filter_tv: " + str(filter_tv))
print("CONFIG - filter_music: " + str(filter_music))
print("CONFIG - show_heading: " + str(show_heading))
print("CONFIG - show_only_artwork: " + str(show_only_artwork))
print("CONFIG - heading_color: " + heading_color)
print("CONFIG - font_color: " + font_color)
print("CONFIG - fit_screen: " + str(fit_screen))

return get_text(plex_server_url, plex_token, endpoint_map, debug_output, fit_screen, filter_movie, filter_tv, filter_music, show_heading, show_summary, heading_color, font_color, ttl_seconds)
return get_text(plex_server_url, plex_token, endpoint_map, debug_output, fit_screen, filter_movie, filter_tv, filter_music, show_heading, show_only_artwork, show_summary, heading_color, font_color, ttl_seconds)

def get_text(plex_server_url, plex_token, endpoint_map, debug_output, fit_screen, filter_movie, filter_tv, filter_music, show_heading, show_summary, heading_color, font_color, ttl_seconds):
def get_text(plex_server_url, plex_token, endpoint_map, debug_output, fit_screen, filter_movie, filter_tv, filter_music, show_heading, show_only_artwork, show_summary, heading_color, font_color, ttl_seconds):
base_url = plex_server_url
if base_url.endswith("/"):
base_url = base_url[0:len(base_url) - 1]
Expand Down Expand Up @@ -422,12 +428,22 @@ def get_text(plex_server_url, plex_token, endpoint_map, debug_output, fit_screen
# img = base64.decode(PLEX_BANNER_PORTRAIT)
# using_portrait_banner = True

if show_summary:
if show_summary and show_only_artwork == False:
rendered_image = render.Image(
width = 22,
src = img,
)
elif fit_screen:
elif fit_screen and show_only_artwork == False:
rendered_image = render.Image(
width = 64,
src = img,
)
elif fit_screen and show_only_artwork == True:
rendered_image = render.Image(
height = 32,
src = img,
)
elif fit_screen == False and show_only_artwork == True:
rendered_image = render.Image(
width = 64,
src = img,
Expand All @@ -438,7 +454,7 @@ def get_text(plex_server_url, plex_token, endpoint_map, debug_output, fit_screen
src = img,
)

return render_marquee(marquee_text_array, rendered_image, show_summary, debug_output, using_portrait_banner)
return render_marquee(show_only_artwork, marquee_text_array, rendered_image, show_summary, debug_output, using_portrait_banner)

else:
display_message_string = "No valid results for " + endpoint_map["title"]
Expand Down Expand Up @@ -575,9 +591,9 @@ def display_message(debug_output, message_array = [], show_summary = False):
width = 64,
src = img,
)
return render_marquee(message_array, rendered_image, show_summary, debug_output)
return render_marquee(False, message_array, rendered_image, show_summary, debug_output)

def render_marquee(message_array, image, show_summary, debug_output, using_portrait_banner = False):
def render_marquee(show_only_artwork, message_array, image, show_summary, debug_output, using_portrait_banner = False):
icon_img = base64.decode(PLEX_ICON)

text_array = []
Expand Down Expand Up @@ -636,7 +652,7 @@ def render_marquee(message_array, image, show_summary, debug_output, using_portr
if show_summary == False and debug_output:
print("Marquee text: " + full_message)

if show_summary:
if show_summary and show_only_artwork == False:
marquee_height = 32 + ((heading_lines + title_lines + body_lines) - ((heading_lines + title_lines + body_lines) * 0.62))

children = [
Expand Down Expand Up @@ -687,6 +703,18 @@ def render_marquee(message_array, image, show_summary, debug_output, using_portr
),
),
)
elif show_only_artwork == True:
return render.Root(
show_full_animation = True,
child = render.Row(
expanded = True,
main_align = "space_evenly",
cross_align = "center",
children = [
image,
],
),
)
else:
marquee_width = 57 + ((len(full_message)) - ((len(full_message)) * 0.9))

Expand Down Expand Up @@ -844,14 +872,14 @@ def get_schema():
schema.Text(
id = "plex_server_url",
name = "Plex server URL (required)",
desc = "Plex server URL.",
desc = "Your Plex server URL.",
icon = "globe",
default = "",
),
schema.Text(
id = "plex_token",
name = "Plex token (required)",
desc = "Plex token.",
desc = "Your Plex token.",
icon = "key",
default = "",
),
Expand Down Expand Up @@ -883,6 +911,13 @@ def get_schema():
icon = "alignLeft",
default = False,
),
schema.Toggle(
id = "show_only_artwork",
name = "Show Only Artwork",
desc = "Display only the artwork. Overrides 'Show summary' and 'Show heading' configurations.",
icon = "eye",
default = False,
),
schema.Toggle(
id = "fit_screen",
name = "Fit screen",
Expand Down