ninthwalker / NowShowing

Generates an email and web page of Plex recently added content
MIT License
73 stars 8 forks source link

Issue sending email or generating report #53

Closed CyberMew closed 6 years ago

CyberMew commented 6 years ago

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: ['MyEmail@gmail.com']
  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'
ninthwalker commented 6 years ago

See the Wiki FAQ This can usually happen if you have an empty library. Try removing that Library and run again and let me know. Thanks.

CyberMew commented 6 years ago

Ah I see, seems to be working now. Is it possible to code it to skip empty libraries? It shouldn't crash and should fail gracefully even if they are empty. Also, I tested with combined report and I'm getting this:

/usr/lib/ruby/2.3.0/net/smtp.rb:986:in `check_auth_response': 504 5.7.4 Unrecognized authentication type [SG2PR0601CA0023.apcprd06.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:394:in `main'
    from /usr/local/sbin/combinedreport:402:in `<main>'

It is because I'm using hotmail provider? But I have removed my email in the recipients_email: [''] so it shouldn't be calling anything email related right? I also set test to enable just in case.

Also, any idea why hotmail is not supported? Ombi works fine (though custom name is not supported) for hotmail accounts though

Thank you for your help!

ninthwalker commented 6 years ago

The coding to check for an empty library is pretty hard to do and haven't found an easy way to do it yet. I probably won't be implementing a check for it because of that.

As for the second error, that is related to your email provider using a different auth method than other providers such as gmail and the like. That also would require additional code that I may add some day to be able to support more email providers.

CyberMew commented 6 years ago

I understand if the email provider doesn't work but in my current case I am not using the email portion of the feature at all (even though my credentials are filled in), so not sure why it's breaking for me. Any ideas how to resolve that?

ninthwalker commented 6 years ago

Change report type in advanced config to 'webonly' and it shouldn't try to do any email auth.

ninthwalker commented 6 years ago

Closing. Library Filtering is now available in the dev branch and will soon be released with the new NowShowing 2.0 overhaul. This cab be used to skip empty libraries or any other libraries you dont want to report on.

Additional email providers will also be available in 2.0.