ninthwalker / nowshowing Goto Github PK
View Code? Open in Web Editor NEWGenerates an email and web page of Plex recently added content
License: MIT License
Generates an email and web page of Plex recently added content
License: MIT License
I don't want to send emails out to every single one of my users. Is this possible?
I thought I could change it in advances.yaml by setting:
plex_user_emails: 'no'
recipients: ['user1', 'user2']
But this still sends to everyone.
You need to change
6878:6789
in option 2, to 6878:6878
I have multiple newly added (within last 7 days) unwatched episodes for the same show but NowShowing only displays the latest unwatched episode. Is this by design or a bug? It would be nice to get all of the unwatched new (within last 7 days) episodes.
Update correct permissions and users/groups for config and www dir's.
More base type functionality is needed in the dockerfile.
ie: s6-overlay, user permissions, tzdata & shadow.
Consider making this permanent into our own FROM :base, or using lsio:base-alpine.
Curtain background turns black on some Mobile displays
Unable to load the web page for NowShowing. Doesn't look like the httpd is started within the docker.
I'm having issue when sending emails. It's telling me the authentication failed, and I can notice the same thing on my mail server logs, clearly it's trying to log in with the wrong info. I'm pretty confident in the settings I'm using since I use the exact same on the same machine from Thunderbird and it's working fine. Since I may or may not have double quotes in my password (and also the username contains an '@' char), I'm wondering if those 2 infos are properly handled / escaped ? Thanks.
Not strictly an issue but just to let you know that I've tested this against Office365 email instead of Gmail and confirm that it definitely doesn't work with this service (doesn't like the port / security combo).
Cheers
Mark
Desired config change: Swap the EMAIL_USERNAME & EMAIL_PASSWORD Display Order on the docker template so it reads
SMTP_SERVER
EMAIL_USERNAME
EMAIL_PASSWORD
On v1 I've been using an edited version of the CSS file to change some colours to fit with my custom logos. If I use the admin interface (which is a nice addition btw!) if I make any changes then they'll automatically get overwritten if I save anything through the UI, correct?
Is this also true if I pull the latest version of the app through Docker each time?
Is there any way to 'protect' my custom changes?
Have inside docker match host for cron.
Remove the httpd logging to console as its unneeded and will fill it up.
May need to create a services script to start httpd with more commands than are possible using the dockerfile CMD directive.
I don't have the statisitics tab? Anything special needing to be done for it?
Possible renames of files like email_body.erb for better user understanding
Seems that NowShowing doesn't handle 404 errors from theTVDB very well:
D, [2017-11-18T15:21:38.394907 #70] DEBUG -- : Response from thetvdb for query series/329367/all/en.xml: Code: 404.
E, [2017-11-18T15:21:38.395176 #70] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
D, [2017-11-18T15:22:08.395416 #70] DEBUG -- : Retry attempt: 1 for query series/329367/all/en.xml
D, [2017-11-18T15:22:08.811694 #70] DEBUG -- : Response from thetvdb for query series/329367/all/en.xml: Code: 404.
E, [2017-11-18T15:22:08.811903 #70] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
D, [2017-11-18T15:22:38.812429 #70] DEBUG -- : Retry attempt: 2 for query series/329367/all/en.xml
D, [2017-11-18T15:22:39.130871 #70] DEBUG -- : Response from thetvdb for query series/329367/all/en.xml: Code: 404.
E, [2017-11-18T15:22:39.131184 #70] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
It's looking for Marvel's The Punisher w/ seriesID 329367, which is wrong. The correct ID is 331980. Not sure whether it gets the ID from Plex, which would be weird because Plex has all the right metadata, or just from a search, but it shouldn't just repeatedly fail on a 404. It should retry X times and then move on.
i'd like to put this behind a reverse proxy but i dont see anywhere to set a base url.
location /nowshowing/ {
proxy_pass http://172.18.0.1:6878;
add_header X-Frame-Options "SAMEORIGIN";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
nice app, would use it if the user could click on a plex item and be taken right to the item in plex, like {plexurl} notification tag in plexpy.
I'm trying to get this working with Office 365 email (Exchange Online). Here is Microsoft's documentation on getting SMTP running:
When I replicate this in NowShowing (Port 587 and smtp.office365.com), I get the following error:
root@NAS01:~# docker exec nowshowing combinedreport -t
/usr/lib/ruby/2.3.0/net/smtp.rb:977:in `check_auth_response': 504 5.7.4 Unrecognized authentication type [redacted.namprd20.prod.outlook.com] (Net::SMTPAuthenticationError)
from /usr/lib/ruby/2.3.0/net/smtp.rb:741:in `auth_plain'
from /usr/lib/ruby/2.3.0/net/smtp.rb:733:in `authenticate'
from /usr/lib/ruby/2.3.0/net/smtp.rb:568:in `do_start'
from /usr/lib/ruby/2.3.0/net/smtp.rb:521:in `start'
from /usr/lib/ruby/gems/2.3.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
from /usr/lib/ruby/gems/2.3.0/gems/mail-2.6.3/lib/mail/message.rb:252:in `deliver!'
from /var/lib/nowshowing/mailReport.rb:98:in `block in sendMail'
from /var/lib/nowshowing/mailReport.rb:89:in `each'
from /var/lib/nowshowing/mailReport.rb:89:in `sendMail'
from /usr/local/sbin/combinedreport:386:in `main'
from /usr/local/sbin/combinedreport:394:in `<main>'
Platform: Docker running on UnRAID 6.3.3 using latest image of NowShowing.
When I was using PlexEmail back in the day, disabling SSL was the solution for this issue, but that doesn't seem to be an option here. Any thoughts? Anything I can pull for you to help troubleshoot?
My application hasn't sent out an email or updated the now showing area since early December.
when I run the command "docker exec nowshowing webreport"
/usr/local/sbin/webreport: end of file reached (EOFError)
docker exec nowshowing emailreport -d -t
/usr/local/sbin/emailreport: end of file reached (EOFError)
Email
Web
Both
Allow the user to decide if they want to report on movies and tv shows, or just one or the other.
Would users want or use separate web/email polling periods?
How does one enable debugging on the ninthwalker/nowshowing docker image?
I'm having issues where I see the following in my logs:
E, [2018-01-12T12:21:12.025291 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:21:42.143100 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:22:12.437362 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:22:42.556812 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:23:12.677897 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:23:42.781722 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:24:12.897743 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:24:43.027459 #808] ERROR -- : Could not connect to thetvdb.com. Will retry in 30 seconds
E, [2018-01-12T12:24:49.907260 #808] ERROR -- : Something failed. If you are seeing this, please turn on debugging and open an issue.
Any way to do this without docker?
Hi, it's been a while since I last tried to configure NowShowing (v1). I updated the docker image, and tried to access serverip:port/admin but to no avail:
Not Found
`/admin' not found.
WEBrick/1.3.1 (Ruby/2.3.7/2018-03-28)
How can I (re)set this up properly again?
I'm running this on unraid, and I'm trying this command: docker exec nowshowing emailreport -d -t
But I'm getting this:
/usr/local/sbin/emailreport:128:in `block in getMovies': undefined method `each' for nil:NilClass (NoMethodError)
from /usr/local/sbin/emailreport:106:in `each'
from /usr/local/sbin/emailreport:106:in `getMovies'
from /usr/local/sbin/emailreport:377:in `main'
from /usr/local/sbin/emailreport:397:in `<main>'
I also tried docker exec nowshowing combinedreport -t
and it's giving me similar error:
/usr/local/sbin/combinedreport:128:in `block in getMovies': undefined method `each' for nil:NilClass (NoMethodError)
from /usr/local/sbin/combinedreport:106:in `each'
from /usr/local/sbin/combinedreport:106:in `getMovies'
from /usr/local/sbin/combinedreport:377:in `main'
from /usr/local/sbin/combinedreport:402:in `<main>'
This is my current advanced.yaml, I basically changed only plex_user_emails
to no
(because I'm still testing and don't want it to auto run the cron job) and adding my own email under recipients_email
email:
title: 'New This Week'
image: 'http://i.imgur.com/LNTSbFl.png'
footer: 'Thanks for watching!'
language: 'en'
web:
title_image: 'img/nowshowing.png'
logo: 'img/logo.png'
headline_title: 'Just added:'
headliners: 'Laughs, Screams, Thrills, Entertainment'
footer: 'Thanks for watching!'
language: 'en'
plex:
plex_user_emails: 'no'
mail:
from: 'Plex Server'
subject: 'Now Showing'
recipients_email: ['[email protected]']
recipients: ['PLEX_USER']
report:
interval: 7
report_type: 'both'
email_report_time: '47 17 * * 6'
web_report_time: '47 17 * * *'
extra_details: 'no'
test: 'disable'
Reviewed code to see if we can allow for user-selectable polling of recently added items. Seems do-able but requires time to be entered in seconds. This will require a method of updating the config file so it adds the new line in the event the file already exists. I'll handle the user-selectable polling rate, once complete, an enhancement request will be opened and assigned to ninthwalker for assistance with forcing config update.
Please note that I am using the Dev branch as you applied the fixes for failed lookups not failing and moving on.
Looks like having an empty Library in Plex locks up NowShowing. Running with -vvv records this last and it just sits there:
D, [2018-01-16T13:49:21.844444 #855] DEBUG -- : Debug info for plexmediaserver connection D, [2018-01-16T13:49:21.844552 #855] DEBUG -- : 200 D, [2018-01-16T13:49:21.844648 #855] DEBUG -- : #<HTTParty::Request:0x000055e4619b60e0 @http_method=Net::HTTP::Get, @path=#<URI::Generic /library/sections/28/all>, @options={:limit=>5, :assume_utf16_is_big_endian=>true, :default_params=>{}, :follow_redirects=>true, :parser=>HTTParty::Parser, :connection_adapter=>HTTParty::ConnectionAdapter, :base_uri=>"http://192.168.1.4:32400", :format=>:xml, :headers=>{"X-Plen-Token"=>"KB4PPvVy2isVepnqBCyz", "X-Plex-Token"=>"KB4PPvVy2isVepnqBCyz"}}, @last_uri=#<URI::HTTP http://192.168.1.4:32400/library/sections/28/all>, @raw_request=#<Net::HTTP::Get GET>, @last_response=#<Net::HTTPOK 200 OK readbody=true>> D, [2018-01-16T13:49:21.844891 #855] DEBUG -- : #<HTTParty::Response:0x55e4619e4580 parsed_response={"MediaContainer"=>{"size"=>"0", "allowSync"=>"1", "art"=>"/:/resources/movie-fanart.jpg", "identifier"=>"com.plexapp.plugins.library", "librarySectionID"=>"28", "librarySectionTitle"=>"UHD Movies", "librarySectionUUID"=>"b1977f90-c7c6-4430-ba6d-2a141b7b7b38", "mediaTagPrefix"=>"/system/bundle/media/flags/", "mediaTagVersion"=>"1514426390", "sortAsc"=>"1", "thumb"=>"/:/resources/movie.png", "title1"=>"UHD Movies", "title2"=>"All UHD Movies", "viewGroup"=>"movie", "viewMode"=>"131122", "__content__"=>"\n"}}, @response=#<Net::HTTPOK 200 OK readbody=true>, @headers={"content-type"=>["text/xml;charset=utf-8"], "content-length"=>["484"], "connection"=>["close"], "x-plex-protocol"=>["1.0"], "cache-control"=>["no-cache"], "date"=>["Tue, 16 Jan 2018 18:49:21 GMT"]}>
After removing the empty Library from Plex, I ran it again and it completed, with the TVDB API issues that they've been having, but it completed. Looks like some logic for an empty Library may need to be applied. I understand that this is most likely an edge case as most users won't have an empty Library, but I had it created waiting for me to find the appropriate content that I wanted to include in it.
I am testing and enabled statistics for the e-mail. I noticed that my listing for Movie and TV are swapped.
Most Watched Movie: | Paw Patrol
Most Watched TV Show: | Bolt
We'll need to add a favicon.ico to avoid this error message.
Updating the docker template to change information will not update the config.yaml file if it already exists. This needs to be changed so that the config.yaml file will be updated in the event someone wants to change their configuration.
We will need to add every possible option to the docker template in order to facilitate this.
If the EMAIL_BODY_DISPLAY_TITLE is left blank, it will auto populate with Now Showing on Plex. This should be changed to reflect the desire to leave the section blank while still outputting the section in the config.yaml due to a requirement of the code.
Current:
email:
title: Now Showing on Plex
Desired:
email:
title:
Add options to v2.0 interface to allow flexibility on email encryption.
Options to be added:
None
SSL
TLS
Note: This is a low priority
Hi,
I have this installed on my synology running docker. After I added all the variables listed, and go to localhost:6878
I see this
Default NowShowing Page
This will be replaced after you run your first report
How do I force the first report?
Rework of email body.
Including user editable header/footer/image
I get the following error on first run of the container, double checked permissions in the appdata
directory I have set.
[cont-init.d] 20-setup: executing...
/usr/local/sbin/config-setup:63:in `setServer': undefined method `empty?' for nil:NilClass (NoMethodError)
from /usr/local/sbin/config-setup:85:in `start'
from /usr/local/sbin/config-setup:94:in `<main>'
Any common stuff for me to try first?
Currently 1-7 reporting time is working.
Allow greater than 7 days.
I'm attempting to run just the web report. This initially was working. I just noticed the other day when I check on it, that the web report stopped updating on the 30th. I am running the Docker container version and as mentioned had it all working. Now I'm getting the following trying to run the command line manual creation:
/usr/lib/ruby/2.3.0/psych.rb:379:in `parse': (/config/advanced.yaml): did not find expected key while parsing a block mapping at line 22 column 3 (Psych::SyntaxError)
from /usr/lib/ruby/2.3.0/psych.rb:379:in `parse_stream'
from /usr/lib/ruby/2.3.0/psych.rb:327:in `parse'
from /usr/lib/ruby/2.3.0/psych.rb:254:in `load'
from /usr/lib/ruby/2.3.0/psych.rb:475:in `block in load_file'
from /usr/lib/ruby/2.3.0/psych.rb:474:in `open'
from /usr/lib/ruby/2.3.0/psych.rb:474:in `load_file'
from /usr/local/sbin/webreport:67:in `initialize'
from /usr/local/sbin/webreport:370:in `new'
from /usr/local/sbin/webreport:370:in `main'
from /usr/local/sbin/webreport:398:in `<main>'
This is the content of the file:
---
email:
title: 'New This Week'
image: 'http://i.imgur.com/LNTSbFl.png'
footer: 'Thanks for watching!'
language: 'en'
web:
title_image: 'img/nowshowing.png'
logo: 'img/logo.png'
headline_title: 'Just added:'
headliners: 'Laughs, Screams, Thrills, Entertainment'
footer: 'Thanks for watching!'
language: 'en'
plex:
plex_user_emails: 'no'
mail:
from: 'Plex Server'
subject: 'Now Showing'
recipients_email: ['']
recipients: ['']
report:
interval: 7
report_type: 'webonly'
email_report_time: ''
web_report_time: '30 23 * * *''
extra_details: 'yes'
test: 'disable'
I think I may be confusing myself here, but my first emailreport ran this morning, and no emails were sent out. I'm starting to wonder how I should have my advanced.yaml
file set up. Here's what it looks like now:
plex:
plex_user_emails: 'no'
mail:
from: 'me'
subject: 'New This Week on Plex!'
recipients_email: ['']
recipients: ['myusername', 'username1', 'username2']
It was my understanding that by selecting no
for plex_user_emails
, I could specify exact users to send to using the recipients
field, instead of sending to every user I'm friends with. Is that the case? When the report ran (and I know it ran because the logs show it collecting things at the proper time), no emails were generated.
Can I have some guidance on how to set this up? do I need plex_user_emails
set to yes
? When I ran the report manually using docker exec nowshowing emailreport
, it worked as expected, though.
Thanks!
Preface - using Cloudbox install.
installed nowshowing via Docker create
docker create --name=nowshowing \
-e PLEX_SERVER_IP=172.17.0.11 \
-e PLEX_TOKEN=XXXXXXXXXXXXXXXX \
-e SMTP_SERVER=smtp.gmail.com \
-e SMTP_PORT=587 \
-e PUID=1001 \
-e PGID=1001 \
-e VIRTUAL_HOST=nowshowing.XXXXXX.com \
-e VIRTUAL_PORT=6878 \
-e LETSENCRYPT_HOST=nowshowing.XXXXXXX.com \
-e [email protected] \
-e [email protected] \
-e EMAIL_PASSWORD=XXXXXXXX \
-p 6878:6878/tcp \
-v /opt/nowshowing:/config:rw \
-v /etc/localtime:/etc/localtime:ro \
--restart=always \
--net=cloudbox \
ninthwalker/nowshowing`
(It's also on the Bridge network but not during creation)
I am able to access the Default webpage just fine, however when attempting to send test email or combined email&webpage I get the following timeout error:
docker exec -it nowshowing emailreport -d -t
[sudo] password for XXXXXX:
/usr/lib/ruby/2.3.0/net/http.rb:880:in `initialize': execution expired (Net::OpenTimeout)
from /usr/lib/ruby/2.3.0/net/http.rb:880:in `open'
from /usr/lib/ruby/2.3.0/net/http.rb:880:in `block in connect'
from /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /usr/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /usr/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /usr/lib/ruby/2.3.0/net/http.rb:1384:in `request'
from /usr/lib/ruby/gems/2.3.0/gems/httparty-0.13.1/lib/httparty/request.rb:93:in `perform'
from /usr/lib/ruby/gems/2.3.0/gems/httparty-0.13.1/lib/httparty.rb:521:in `perform_request'
from /usr/lib/ruby/gems/2.3.0/gems/httparty-0.13.1/lib/httparty.rb:457:in `get'
from /var/lib/nowshowing/plex.rb:29:in `get'
from /usr/local/sbin/emailreport:104:in `getMovies'
from /usr/local/sbin/emailreport:377:in `main'
from /usr/local/sbin/emailreport:397:in `<main>'
I've also set the normal report to run and obv it timed out as well. All the log files are empty because no report was run. Tried a few users on discord and they suggested an Open Ticket here. Thanks for your time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.