pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.78k stars 276 forks source link

Emby notification not working #6985

Open jm1tchell opened 5 years ago

jm1tchell commented 5 years ago

Describe the bug Medusa successfully sends the update notification to Emby, but nothing happens on the Emby side.

To Reproduce Steps to reproduce the behavior:

  1. Turn on Emby notifications
  2. Run a manual update or wait for automatic post processing to happen.

Expected behavior Emby library is updated after Medusa post processes file.

Medusa (please complete the following information):

Debug logs (at least 50 lines): General > Advanced Settings > Enable debug

019-07-27 09:10:08 DEBUG MAIN :: [74c3f12] Started updating network timezones 2019-07-27 09:10:08 DEBUG CHECKVERSION :: [74c3f12] git symbolic-ref -q HEAD : returned successful 2019-07-27 09:10:08 DEBUG CHECKVERSION :: [74c3f12] Executing git ls-remote --heads origin with your shell in /usr/local/share/medusa 2019-07-27 09:10:08 DEBUG MAIN :: [74c3f12] GET URL: https://cdn.pymedusa.com/sb_network_timezones/network_timezones.txt [Status: 200] 2019-07-27 09:10:08 DEBUG MAIN :: [74c3f12] User-Agent: Medusa/0.3.4 (FreeBSD; 11.2-STABLE; dac5db78-b06f-11e9-b4d1-02ff604a0941) 2019-07-27 09:10:08 DEBUG MAIN :: [74c3f12] Finished updating network timezones 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] git ls-remote --heads origin : returned successful 2019-07-27 09:10:09 INFO CHECKVERSION :: [74c3f12] Checking for updates using GitHub Updater 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] Executing git symbolic-ref -q HEAD with your shell in /usr/local/share/medusa 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] git symbolic-ref -q HEAD : returned successful 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] Executing git rev-parse HEAD with your shell in /usr/local/share/medusa 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] git rev-parse HEAD : returned successful 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] Executing git config remote.origin.url https://github.com/pymedusa/Medusa with your shell in /usr/local/share/medusa 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] git config remote.origin.url https://github.com/pymedusa/Medusa : returned successful 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] Executing git config remote.origin.pushurl https://github.com/pymedusa/Medusa with your shell in /usr/local/share/medusa 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] git config remote.origin.pushurl https://github.com/pymedusa/Medusa : returned successful 2019-07-27 09:10:09 DEBUG CHECKVERSION :: [74c3f12] Executing git fetch --prune origin with your shell in /usr/local/share/medusa 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] git fetch --prune origin : returned successful 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] Executing git rev-parse --verify --quiet "@{upstream}" with your shell in /usr/local/share/medusa 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] git rev-parse --verify --quiet "@{upstream}" : returned successful 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] Executing git rev-list --left-right "@{upstream}"...HEAD with your shell in /usr/local/share/medusa 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] git rev-list --left-right "@{upstream}"...HEAD : returned successful 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] cur_commit = 74c3f124fb599ad923e23f46fc320778b8b4217c, newest_commit = 74c3f124fb599ad923e23f46fc320778b8b4217c, num_commits_behind = 0, num_commits_ahead = 0 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] Checking GitHub for latest news. 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] GET URL: https://cdn.pymedusa.com/news/news.md [Status: 200] 2019-07-27 09:10:10 DEBUG CHECKVERSION :: [74c3f12] User-Agent: Medusa/0.3.4 (FreeBSD; 11.2-STABLE; dac5db78-b06f-11e9-b4d1-02ff604a0941) 2019-07-27 09:10:37 DEBUG Thread_1 :: [74c3f12] POST URL: http://10.0.1.50:8096/emby/Notifications/Admin [Status: 204] 2019-07-27 09:10:37 DEBUG Thread_1 :: [74c3f12] User-Agent: Medusa/0.3.4 (FreeBSD; 11.2-STABLE; dac5db78-b06f-11e9-b4d1-02ff604a0941) 2019-07-27 09:10:37 DEBUG Thread_1 :: [74c3f12] With post data: {"ImageUrl": "https://cdn.pymedusa.com/images/ico/favicon-64.png", "Name": "Medusa", "Description": "This is a test notification from Medusa"} 2019-07-27 09:10:37 INFO Thread_1 :: [74c3f12] EMBY: Successfully sent a test notification. 2019-07-27 09:11:00 DEBUG Thread_0 :: [74c3f12] POST URL: http://10.0.1.50:8096/emby/Library/Series/Updated [Status: 204] 2019-07-27 09:11:00 DEBUG Thread_0 :: [74c3f12] User-Agent: Medusa/0.3.4 (FreeBSD; 11.2-STABLE; dac5db78-b06f-11e9-b4d1-02ff604a0941) 2019-07-27 09:11:00 INFO Thread_0 :: [74c3f12] EMBY: Successfully sent a "Series Library Updated" command.

Additional context It appears Emby have depreciated the /Library/Series/Updated API call and replaced it with /Library/Media/Updated. I can update Emby from the command line from the Medusa jail with the command /usr/local/bin/curl -X POST "http://10.0.1.50:8096/emby/Library/Refresh?api_key=<my API key>" -d ""

nstephenh commented 1 year ago

Just wanted to check on the status of this. I think this was working for me for a while on medusa, but it appears to not be working as of recently (past 6 months). My logs show the error is connecting to/emby/Notifications/Admin

2023-04-13 12:48:22 WARNING Thread_0 :: [6b37ad0] EMBY: Warning: Unable to contact Emby at http://10.0.1.40:8096/emby/Notifications/Admin: Error: MaxRetryError("HTTPConnectionPool(host='10.0.1.40', port=8096): Max retries exceeded with url: /emby/Notifications/Admin (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x8106cd650>: Failed to establish a new connection: [Errno 61] Connection refused'))")

nstephenh commented 1 year ago

My issue appears to be also a networking issue as I changed my server to be behind NAT instead of directly on the network, so can probably be disregarded.