Coder Social home page Coder Social logo

mattsshack / plex-movie-poster-display Goto Github PK

View Code? Open in Web Editor NEW
128.0 13.0 29.0 4.63 MB

Scraps the Plex sessions page to display the current playing movie or TV show poster on a screen.

Home Page: https://www.mattsshack.com

License: GNU General Public License v3.0

PHP 95.61% CSS 4.39%
poster php plex movie

plex-movie-poster-display's Introduction

Plex Movie Poster Display

Scraps the Plex sessions page to display the current playing movie or TV show poster on a screen.

Disclaimer – I am a network engineer not a programmer. I play around with code. I am publishing this to give back to the communities that has helped me learn. There may be better ways of scraping the Plex Posters, but this is the way I chose to do it. I am open to suggestions. Use at your own risk.

I decided to rewrite the program in PHP and make it browser based. This allows me to have the Raspberry Pi boot to the desktop, automatically start a browser in kiosk mode, and open the PHP site.

This script scraps http://IP_ADDRESS_OF_PLEX_SERVER>:32400/status/sessions for clients and displays the poster of the currently playing movie or TV show. If nothing is currently playing it will pull a random poster of an unwatched movie.

Dev Branch

I have added a dev branch to merge all changes too. I will be adding my changes to the branch in the future.

My Setup

Plex Media Server is running on a dedicated server. Plex Movie Poster Display is running on separate Raspberry Pi 3 connected to a screen via HDMI. On boot up the Pi launches Chromium in kiosk mode and loads the Plex Movie Poster Display URL.

Help

https://www.mattsshack.com/plex-movie-poster-display/

plex-movie-poster-display's People

Contributors

d8ahazard avatar mangavalk avatar mattsshack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plex-movie-poster-display's Issues

Custom Font Top Text Alignment

Really like the suggestion of the FamFonts site for custom fonts for use with PMPD and while many of the Movie font types show up as generic fonts some of my favorites like The Avengers, Predator, The Godfather, and Indiana Jones fonts look very attractive. It seems the area where the Top Text is located needs to be set for midline alignment (center vertical) if that's what it's called cause the text is centered horizontally but it does not center vertically and gets cut off even with much smaller font size choices. Issue applies to Coming Soon, Now Showing, and Custom Image Configuration. Bottom Text vertical and horizontal alignment seems to work really well on the 3 pages other than the Wrap Text that i also reported. Thank you again, hope I am able to help make PMPD a Flawless Victory! https://i.imgur.com/NABadBM.jpg
https://i.imgur.com/YPgJxwt.jpg
https://i.imgur.com/RggN5QJ.jpg

PMPD Pop-up Window with "S" Key

I recently learned by accident that if I click on the "s" key on my keyboard, a NGINX pop-up window appears. I wonder if that pop-up window can be used for another reason such as metadata info or anything else that someone feels would be worthwhile... Just a thought! https://i.imgur.com/6K3Yr1u.png

Scrolling Summary Bottom Text for Now Showing

I have been using Matt's original PMPD work up til yesterday when I finally replaced my Pi 3 with a new Pi4 8GB cause I was dealing with swap memory and wifi issues. Images would stall and have to catch up all the time. Anyways, appreciate all the progress the Dev updates have made. One thing I have been used to is having scrolling text (upwards) in the Now Showing bottom text for movie Summary and the text wraps (doesn't currently wrap) into the vertical screen (screenshot link below). If I currently enable Common Configuration Bottom Scrolling Text that also scrolls the Coming Soon Bottom Text which version 2 didn't do and I'd prefer it not to do. Greatly appreciate all the work on this beautiful project! https://i.imgur.com/dPGhOvr.jpg

Remove all Plex Asset

I have been made aware that PMPD is in direct violation of the PLEX trademarks and guidelines. I would like to apologize to PLEX for these violations. All development will be focused on bringing this project into compliance with the PLEX Trademarks and Guidelines.

Example Violations:
You may not:
Use Plex or derivatives thereof in the name of your application

You may not:
Copy the Plex look and feel of any Plex web site (including the use of our distinct color combinations, graphic designs or typography) or create any altered, distorted or interpreted representation of any of the Plex marks, as this could create confusion among our users.

To-Do:
New frontend with unique code and color scheme.
Audit all code to make sure there is no other trademark / copyright infringements.
Possible new name for project.

Enhancement - Digital Picture Frame Mode

Enhance Custom Configuration to use system as a digital picture frame.

Phase 1:

  • Generate list of all custom images uploaded and randomly pick a photo.
  • Set as "Full Background" same as how the background art is working.
  • Disable "blur" for photo album

Phase 2 (Possibly):

  • Add metadata read for display of information per photo.
  • Add "Folder Name" display and use that as metadata

Custom Images Upload Info

I believe the Custom Images Configuration page would benefit from displaying a minimum and/or maximum pic size requirement and/or max file size requirement for uploads.

Font Enhancements

Due to the growing popularity to the font system. there are a few enhancements I would like to make to the system.

  1. Add "Clear Fonts" to clear out all custom uploaded fonts.

  2. Add a check to see if a font file is supported within a zip file

  3. Add support for multiple font formats (eg. OTF)

  4. Update the "Unzip" to not unzip to the root of the fonts folder but to unzip to its "Zip File Name" for better organization

  5. Using the "Zip File Name" folder method, append the name to the actual name of the font file when displaying in the lists. Currently it only uses the name of the font file itself and and can become a bit harder to identify the type we require.

  6. When unzipping the fonts, only unzip the font files supported and ignore all other files and folders. This will allow for a cleaner storage and organization.

  7. Remove _MACOSX folder when unzipping.

** EDIT **
2021-03-24:

  • Find all 'hard coded' font path and replace with $pmpFontDir
  • Add option to delete individual 'fonts'
  • Add 'fail over' for when font is cleared but set to active if the font does not exist then default to standard font.

Enhancement: Full Screen Poster

Add option to do a 'Full Screen' poster.

Disabling all text and taking over full 'Portrait' mode.

Similar to one used in the wild.
su2w9nu0kjj31

Mobile Friendly PMPD3 Suggestion

One of the features I liked about PMPD2 was the ability to manage/edit the PMPD settings easily from a mobile device if need be. I know some things are being changed due to Plex branding, a mobile friendly version of PMPD3 would be a suggestion that I believe would be beneficial to some users. https://i.imgur.com/hisNQPsl.png

Theme Idea (Enhancement)

An idea for a theme would be to mimic what Steam or playnite (gaming front-ends) do where they have the graphic in the background and have the poster be the focal point. It could pull from the media folder that plex creates for the background image. This would let this script to be used in different uses that just a black background.

ex. Radarr - https://prnt.sc/ve4cip

Coming Soon - Show Media: ALL - Not Displaying TV Show Posters

FYI Geoff when the Coming Soon Show Media dropdown is selected to ALL, a blank (black) poster will appear no matter whether the setting is Series or Season. If I remove the number representing my TV Shows library in the Plex Configuration, then the blank poster does not appear any longer.

Cache Images - No file extensions

Cache images do not have file extensions.

We may want to add the file extension and also do some validation on cache images.

Image validation would be good from a security perspective.

502 Bad Gateway Nginx Error

Can anyone provide as to why I'd be getting an 502 Bad Gateway Nginx 1.14.2 error message for the following pages:
Coming Soon, Now Showing, Custom Configuration, and Font Configuration?
I can access General, Security, Common, Server and Client Configuration pages without issue.
Issued seems to have occurred when I was uploading one of the custom fonts on the Font Configuration page.
Any advice would be greatly appreciated. Copying the directories and files into the /var/www/html/ did not help with the issue.

Add support for field variables in custom text settings to allow displaying media info along with custom text

Consider adding variable parsing to the custom text entry field. This will allow customizing the display. Use case I was thinking of was displaying the current series name on one line, with a single line break tag and then the episode name on a secondary line. Currently selecting the episode in advanced option will show the episode name, but the cover art will be a screen shot from the episode vs the series or season art. Would also be nice to have a sperate custom field for TV shows vs Movies.

Support Music

Adding support for music libraries.

If you add a music library to your list then when it scans that library you end up getting a blank screen.

  1. Fix how "Now Playing" handles Music
  2. Fix how when "not playing" music is handled.

When "Now Playing" the Cover Art or Artist image will display. Also looking at what info is displayed.

Skip music library when not playing music.

This support is coming 2.9.x

Enhancement: Import Config Upgrade Script

Add a function to when a config file is imported that a review and update is made so that if any fields are missing they are added and populated with the standard default value.

Add a start and end time display option for the now showing display

Add a start and end time display option to the top or bottom line, as shown here:

image

Could possibly add as an alternative display mode to the progress bar display?

Start time can be found using the timeStamp:

$mediaStartTime = "Start Time </br>" . date("g:i A", (int)$clients->TranscodeSession['timeStamp']); 

End time can be calculated using the progress % in the TranscodeSession section, along with current time:

$media_duration = "End Time</br>" . date("g:i A", (int)time() + (int)($clients->TranscodeSession['duration'] * (1-$clients->TranscodeSession['progress']/100)/1000));

Missing Posters

Hi Matt
I have the playing now working and I have the titles for the whats new... from my plex server, its pulling the title and description. However the images are missing.
I do have the display rotated at 90 - is that maybe what is the cause?

Remove Cinema trailer and Movie pre-roll Image before Now Showing poster

I have Plex Cinema Trailers and Movie pre-rolls enabled in the Plex Media Server > Extra setting.
When the trailer and pre-roll play before the movie starts, PMPD3 will display a horizontal background trailer/pre-roll image as seen in the screenshots below. Is there a way to not display those in PMPD3? In PMPD2, it would continue to show Coming Soon posters until the actual film started playing and then the Now Showing poster would display, it would not show images for trailers or movie pre-rolls.
https://i.imgur.com/A2gGxGJ.jpg
https://i.imgur.com/0UWUa6E.jpg

PHP Version Upgrade

Look at upgrading to PHP v. 8.0

There are a few enhancements that would allow for a cleaner code structure.

Enhancement: Gaussian Blur Text Background

Currently, the font color of text is configured as a static value making the outline the only way to distinguish the text from the background poster colors from a contrast ratio perspective (note white on white or black on black can be extremely unfriendly depending on the font used). Gaussian Blurs and other background blending techniques can be used to guarantee a darker/lighter background for the text to rest on always ensuring some level of contrast difference for a nice pop effect. Apple has been using this particular technique for quite some time now. Would it be possible to add the option for some guaranteed background contrast enhancer for text?

Enhancement: Full Path Logging

Add logging of media's XML Full Path (PLEX) for quicker identify data.

  • PLEX_getMovieMetadata.log
  • PLEX_getTVMetadata.log

https://:32400/library/metadata/26127?X-Plex-Token=

Enhancement: Cache Config Options

Create a config options to be used to control the config paths more.

Allow to custom change paths for individual cache types and to Enable/Disable 24hr cache cleanup.

Bug: Config values how showing correctly on Save

There is an issue with when you save the changes to config.php, the page reloads and shows the old values.

Review if the PHP config file is getting to large and if its a timing issue.

Possible move from config.php to a xml or json config format in future release.

Refresh All Metadata for Plex Sections

So, now that I have been able to disable the 24 hr Expiration of the Cache files for Posters and Art, I noticed that the highest my cache stats would get was 1565 across the 8 sections that I have entered in the Plex Movie Sections field separated by commas. It wasn't until I did a Refresh All Metadata of each of the 8 sections, that now the stats number has increased to 1777 which is a more accurate number of the total of the 8 sections. Hope this is helpful to someone else.

Top Font Outline Size and Top Font Outline Color not working as expected

Logging an issue with the:

  • Top Font Outline Size
  • Top Font Outline Color

Any changes set to these two fields are not being applied at runtime.

Testing still needs to be done for "Bottom" as well as for the "Coming Soon" sections as well.

System still defaults to the "Yellow" as part of the "Top Font Outline Color" no matter what value is set.

Enhancement - Ratings Filter

Look at adding a ratings filter so that during certain times of the day only age appropriate posters show up.

Movies:
Rated G: General audiences – All ages admitted
Rated PG: Parental guidance suggested – Some material may not be suitable for children.
Rated PG-13: Parents strongly cautioned – Some material may be inappropriate for children under 13.
Rated R: Restricted – Under 17 requires accompanying parent or adult guardian.
Rated NC-17: Adults Only – No one 17 and under admitted.

TV Ratings
TV-Y: All Children. Intended for children ages 2 to 6 and is not designed or expected to frighten.
TV-Y7: Directed to Older Children.
TV-Y7 FV: Directed to Older Children - Fantasy Violence.
TV-G: General Audience.
TV-PG: Parental Guidance Suggested.
TV-14: Parents Strongly Cautioned.
TV-MA: Mature Audience Only.

Posters Are No Populating on Idle

I have the script (v2) working on an RPi4. If I start a video it shows the poster of that video. However, on idle I just get a blank screen.

Coming Soon I have the newest selected. I am not sure what else I would need to do.

Additionally, below is feedback from use over a few days.

  1. Allow multiple Plex Client under Plex Client IP. I could be watching something on my phone while the kids watch on the TV.
  2. Add the option for padding around the top and bottom text. Ex https://prnt.sc/ve4ayf

Enhancement: Multiple IP Clients for Now Showing

I have always hoped that one day PMPD would work with more than one Client IP address for Now Showing. It's very rare that PLEX is being used at the same time in my household. It would be great to have the ability to add multiple client IP Addresses (whether separated by comma or semicolon) so that if anyone of those devices were playing something on Plex than Now Showing would display that poster. However, if Plex were being used on multiple clients, then maybe the order of the IP addresses would control which poster is displaying on Now Showing, example: 192.168.1.100, 192.168.1.50, 192.168.1.90 are all playing Plex Movies, since .100 is 1st in the row, displays on Now Showing, once Stopped/Ended, then .50 etc....

Cache Images Enabled but Posters disappearing

I have Cache Images enabled but it seems that posters automatically get removed after 24 hours. I noticed that my poster statistics numbers sometimes go down... I don't need it to automatically remove them (64GB SD card), the clear cache button is a worthwhile option if I needed space.

Enhancement: Setup and Update scripts

Create set of scripts to Setup and Update your PMPD installation.

Process should be divided into multiple parts.

  1. System (Non RPi) - Dependencies
  2. System (RPi) - System Config, such as changing display mode, etc..
  3. Install of PMPD
  4. Advanced Setup: Install Docker and/or Ansible (Server Side)

Updates should run the update dependencies as they may be out of date.
Update should also pull the latest code prior to copy.

Allow for Upgrade and Setup to use backup files as part of deployment so that you do not need to go through and enter all your information.

Script types:

  • Python
  • Ansible

Enhancement: Marquee Borders and Lights

There is an option currently to set a background image. But I was thinking it might be better to use an image between the poster and the blurred background to replicate traditional poster marquees.

Option #1 - Faux Lights
Having worked in a movie theatre as a kid (which is why I am so passionate about this project) the movie posters used to have lights or backlight to make them pop (ex https://media.techeblog.com/images/movie_marquee.jpg). It would be cool to use a template to apply behind the poster (but in front of background image) to replicate this look.
Ex - image

Option #2 - Marquee for Coming Soon/Now Playing
Use a graphic like the one below to show old-style graphic to replicate marquees in the 1920/the 40s
http://jeffreystrausser.com/NowShowing.jpg

Option #3 - Combine both into one.
If you combine with #1 then it could have an area for the text within the frame: https://a.1stdibscdn.com/archivesE/1stdibs/120211/GustavoOlivieri/2/IMG_7885.jpg
https://i.pinimg.com/736x/8c/e3/41/8ce341258d66ea32c0218c3b286e1323.jpg

More traditional (not free) https://www.istockphoto.com/photo/empty-isolated-cinema-poster-panel-gm1217830711-355636834?utm_source=pixabay&utm_medium=affiliate&utm_campaign=SRP_image_sponsored&referrer_url=https%3A//pixabay.com/images/search/movie%2520posters/&utm_term=movie%20posters

Rough and Quick Proof of Concept
tcats
logan

Coming Soon Show Movies - Recently Added & Newest TV Show Poster/Backgrounds Issue

I tend to use ALL in the Show Movies Coming Soon Advanced dropdown menu cause Plex seems to always have the wrong info for Recently Added and Newest, old movies get mistakenly added, not sure if others have noticed this as well.
However, the issue that I'm reporting is when I tested the Recently Added and Newest dropdown choices, instead of PMPD displaying the TV Show posters, it posts random background images that I didn't select for my TV Shows... weird! Show Movies: Unwatched and All display TV Show posters correctly but the bottom 2 choices from the dropdown menu show random incorrect background images as seen in these screenshots:
https://i.imgur.com/A2gGxGJ.jpg
https://i.imgur.com/0UWUa6E.jpg
https://i.imgur.com/35ka0UL.jpg

Enhancement: Options for transitions between Now Playing/Coming Soon/Custom

As my media area is also a living room it would be great to use custom Configuration as a sort of screen saver. It is actively showing art, then when I start playing media it switches to Now Showing then when I stop media it switches to Coming soon. Then after another period of time it goes back to art.

  • Toggle for Now showing to interrupt Custom Configuration
  • Toggle option for what function occurs after Media stops
  • Toggle and timer for transition to Custom after a period of time in Coming soon

TV Show Support

Look at adding support for TV Shows.

Currently if you define a TV library the poster shows blank.

If using a "custom" top or bottom string they will still show.

Plex Movie Sections

Add support for "Text" defined sections.

https://support.plex.tv/articles/201638786-plex-media-server-url-commands/
plex.direct:32400/library/sections?X-Plex-Token=
key="1" title="TV Shows"

Allow for cross reference name and capture other information.

Rename field from "Plex Movie Sections" to "Plex Media Libraries"

Future; Possible Pre-read and Mulit select (dropdown?) of libraries for availability?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.