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

Plex Home support #29

Closed
bstascavage opened this issue Dec 20, 2014 · 19 comments · Fixed by #38
Closed

Plex Home support #29

bstascavage opened this issue Dec 20, 2014 · 19 comments · Fixed by #38

Comments

@bstascavage
Copy link
Owner

No description provided.

@smdion
Copy link

smdion commented Jan 17, 2015

+1 for this.

@dalcombright
Copy link

+1 as well for this, would love to try this tool out.

@bonyboy
Copy link

bonyboy commented Jan 20, 2015

Does this mean that if I have Plex Home setup that I am unable to use plexReport?

@joey102
Copy link

joey102 commented Jan 21, 2015

+1

@bonyboy: yes

@elRadix
Copy link

elRadix commented Jan 21, 2015

+1 for support for Plex Home

is this the corresponding error?

/opt/plexReport/bin/plexReport.rb -t -v
/opt/plexReport/bin/plexReport.rb:92:in `getMovies': undefined method `[]' for nil:NilClass (NoMethodError)
    from /opt/plexReport/bin/plexReport.rb:321:in `main'
    from /opt/plexReport/bin/plexReport.rb:340:in `<main>'

@bstascavage
Copy link
Owner Author

I just enabled Plex Home on my system, and everything works fine. Plex Home specifically should not be breaking this, as far as I can tell.

I suspect the issue here isn't Plex Home, but that users are using the wrong 'token' (which is my fault, since my instructions could be clearer). For people getting the following error:

/opt/plexReport/bin/plexReport.rb -t -v /opt/plexReport/bin/plexReport.rb:92:ingetMovies': undefined method []' for nil:NilClass (NoMethodError) from /opt/plexReport/bin/plexReport.rb:321:inmain'
from /opt/plexReport/bin/plexReport.rb:340:in <main>'

Can you please try the following:

  1. Verify that you have the right API token in your config file. Go to: https://plex.tv/devices.xml and send me the output, along with the output of your config file, so I can verify it.

@joey102
Copy link

joey102 commented Jan 29, 2015

I've emailed you on brian@stascavage.com with the requested files. I've verified using the correct tokens, as far as I am aware.

@smdion
Copy link

smdion commented Jan 29, 2015

I'm 99% sure I'm using the correct token as well. Its the one specific to the unRAID server.

@bstascavage
Copy link
Owner Author

I was able to reproduce the issue. To help me verify, I created a new branch with Plex Home code.

To test, in your plexReport directory, run

git checkout -b plexhome origin/plexhome

After that, give the script a try.

To switch back to the old code, you can run:

git checkout master

@ersw1187
Copy link
Contributor

When I run this command I get the following message:
fatal: Cannot update paths and switch to branch 'plexhome' at the same time.
Did you intend to checkout 'origin/plexhome' which can not be resolved as commit?

@ersw1187
Copy link
Contributor

I then ran: git checkout -b plexhome

This resulted in the following
M .gitignore
M Gemfile
M Gemfile.lock
M README.md
M etc/config.yaml.example
M etc/email_body.erb
M images/plex.png
Switched to a new branch 'plexhome'

I subsequently ran: bin/plexReport.rb -v

I still get the same result:
/opt/plexReport/bin/plexReport.rb:92:in getMovies': undefined method[]' for nil:NilClass (NoMethodError)
from /opt/plexReport/bin/plexReport.rb:321:in main' from /opt/plexReport/bin/plexReport.rb:340:in

'

@bstascavage
Copy link
Owner Author

Clone the repo to a different folder, and then try my steps (make sure you copy your config over)

@ersw1187
Copy link
Contributor

Managed to run it with option -v. Created a log of about 112MB.

At the end the terminal screen shows the following error

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/smtp.rb:541:in initialize': execution expired (Net::OpenTimeout) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/smtp.rb:541:inopen'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/smtp.rb:541:in tcp_socket' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/smtp.rb:551:inblock in do_start'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/smtp.rb:550:in do_start' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/smtp.rb:520:instart'
from /Library/Ruby/Gems/2.0.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in deliver!' from /Library/Ruby/Gems/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:252:indeliver!'
from /Users/ersw1187/plexReport/bin/mailReport.rb:89:in block in sendMail' from /Users/ersw1187/plexReport/bin/mailReport.rb:80:ineach'
from /Users/ersw1187/plexReport/bin/mailReport.rb:80:in sendMail' from bin/plexReport.rb:338:inmain'
from bin/plexReport.rb:342:in `

'

@ersw1187
Copy link
Contributor

ersw1187 commented Feb 1, 2015

After rereading the Plex Forum I switched from using my hosted mail provider to Gmail (ensuring that I had set the security settings to the 'lesssecureapps' setting) and I set the SMTP port to 587 (TLS) and not to 465 (SSL)

Low and behold, the report appeared. Maybe a good addition to the installation guide to mention that people should use for example Gmail instead of a hosted mail provider

@bstascavage
Copy link
Owner Author

Good call, thanks!

bstascavage added a commit that referenced this issue Feb 2, 2015
Initial code for Plex Home support.  Fixes #29
@dalcombright
Copy link

still getting same error on unRAID with latest changes.

/opt/plexReport/bin/plexReport.rb:92:in getMovies': undefined method[]' for nil:NilClass (NoMethodError)
from /opt/plexReport/bin/plexReport.rb:321:in main' from /opt/plexReport/bin/plexReport.rb:340:in

'

On Mon, Feb 2, 2015 at 10:20 AM, Brian notifications@github.com wrote:

Closed #29 #29 via #38
#38.


Reply to this email directly or view it on GitHub
#29 (comment).

@bstascavage
Copy link
Owner Author

What is your plexWatch.log look like?

@dalcombright
Copy link

Logfile created on 2015-02-02 11:01:13 -0500 by logger.rb/31641

I, [2015-02-02T11:01:13.594004 #20] INFO -- : Starting up PlexReport
I, [2015-02-02T11:01:19.532068 #31] INFO -- : Starting up PlexReport
I, [2015-02-02T11:02:06.282538 #44] INFO -- : Starting up PlexReport
I, [2015-02-02T11:02:49.250978 #56] INFO -- : Starting up PlexReport
I, [2015-02-02T12:40:47.281106 #74] INFO -- : Starting up PlexReport
I, [2015-02-02T12:42:15.302176 #86] INFO -- : Starting up PlexReport

looks clean

On Mon, Feb 2, 2015 at 1:10 PM, Brian notifications@github.com wrote:

What is your plexWatch.log look like?


Reply to this email directly or view it on GitHub
#29 (comment)
.

@bstascavage
Copy link
Owner Author

I don't think you actually updated the code then. The newest code would log an error if it cannot connect to the Plex server. You can see that on line 32 of bin/plex.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants