mdhiggins / sonarr-sma

Sonarr docker based on linuxserver/sonarr with SMA built in using python3
MIT License
37 stars 18 forks source link

Plex Notifications Not working #58

Closed Muckoma closed 3 weeks ago

Muckoma commented 2 months ago

Hi, It doesn't seem like the Plex refresh is working. I have it set to the default. Do I need to add Plex as one of the options in connect? This was working in an older version so unsure what's changed.

mdhiggins commented 2 months ago

Logs

check your configuration. Nothing has changed in a while for Plex

Muckoma commented 2 months ago

Sorry for lack of logs. I was writing this up and computer died :)

Hmm it seems like something else has broke along the way. I'm seeing this in logs now..

2024-05-09T15:01:50.524106982Z,stdout,  so:libtinyxml2.so.10 (no such package):

2024-05-09T15:01:50.524051347Z,stdout,               py3-filelock-3.12.4-r0[python3~3.11]

2024-05-09T15:01:50.524006502Z,stdout,               py3-filelock-3.12.4-r0[python3]

2024-05-09T15:01:50.523937802Z,stdout,               py3-virtualenv-20.24.6-r0[python3~3.11]

2024-05-09T15:01:50.523877639Z,stdout,               py3-platformdirs-4.0.0-r0[python3~3.11]

2024-05-09T15:01:50.523832821Z,stdout,               py3-packaging-23.2-r0[python3~3.11]

2024-05-09T15:01:50.523775168Z,stdout,               py3-packaging-23.2-r0[python3]

2024-05-09T15:01:50.523659701Z,stdout,               py3-parsing-3.1.1-r0[python3~3.11]

2024-05-09T15:01:50.523479005Z,stdout,               py3-parsing-3.1.1-r0[python3]

2024-05-09T15:01:50.523432167Z,stdout,               py3-setuptools-68.2.2-r0[python3~3.11]

2024-05-09T15:01:50.523363216Z,stdout,               py3-setuptools-68.2.2-r0[python3]

2024-05-09T15:01:50.523306453Z,stdout,               py3-distlib-0.3.7-r2[python3~3.11]

2024-05-09T15:01:50.523246774Z,stdout,               py3-distlib-0.3.7-r2[python3]

2024-05-09T15:01:50.523186744Z,stdout,               py3-pip-23.3.1-r0[python3~3.11]

2024-05-09T15:01:50.523117678Z,stdout,               py3-pip-23.3.1-r0[python3]

2024-05-09T15:01:50.523069851Z,stdout,               python3-3.11.6-r1[python3~3.11]

2024-05-09T15:01:50.522930263Z,stdout,    satisfies: world[python3]

2024-05-09T15:01:50.519439559Z,stdout,    breaks: py3-pymediainfo-6.1.0-r1[python3~3.12]

2024-05-09T15:01:50.516902996Z,stdout,  python3-3.11.6-r1:

2024-05-09T15:01:50.497307592Z,stdout,ERROR: unable to select packages:

2024-05-09T15:01:48.126185404Z,stdout,    required by: world[py3-virutalenv]

2024-05-09T15:01:48.126001938Z,stdout,  py3-virutalenv (no such package):

2024-05-09T15:01:48.124517210Z,stdout,ERROR: unable to select packages:

2024-05-09T15:01:44.763834829Z,stdout,"crond[158]: crond (busybox 1.36.1) started, log level 5
"
2024-05-09T15:01:44.743766462Z,stdout,"[custom-init] No custom files found, skipping...

Which in turn is causing import request to fail.

Here is also the docker config.

{ "CapAdd" : [], "CapDrop" : [], "cmd" : "", "cpu_priority" : 50, "enable_publish_all_ports" : false, "enable_restart_policy" : true, "enable_service_portal" : null, "enabled" : false, "env_variables" : [ { "key" : "PATH", "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }, { "key" : "HOME", "value" : "/root" }, { "key" : "LANGUAGE", "value" : "en_US.UTF-8" }, { "key" : "LANG", "value" : "en_US.UTF-8" }, { "key" : "TERM", "value" : "xterm" }, { "key" : "S6_CMD_WAIT_FOR_SERVICES_MAXTIME", "value" : "0" }, { "key" : "S6_VERBOSITY", "value" : "1" }, { "key" : "S6_STAGE2_HOOK", "value" : "/docker-mods" }, { "key" : "VIRTUAL_ENV", "value" : "/lsiopy" }, { "key" : "LSIO_FIRST_PARTY", "value" : "true" }, { "key" : "XDG_CONFIG_HOME", "value" : "/config/xdg" }, { "key" : "SONARR_BRANCH", "value" : "main" }, { "key" : "LIBVA_DRIVERS_PATH", "value" : "/usr/local/lib/x86_64-linux-gnu/dri" }, { "key" : "LD_LIBRARY_PATH", "value" : "/usr/local/lib" }, { "key" : "NVIDIA_DRIVER_CAPABILITIES", "value" : "compute,video,utility" }, { "key" : "NVIDIA_VISIBLE_DEVICES", "value" : "all" }, { "key" : "SMA_PATH", "value" : "/usr/local/sma" }, { "key" : "SMA_RS", "value" : "Sonarr" }, { "key" : "SMA_UPDATE", "value" : "true" }, { "key" : "SMA_FFMPEG_URL", "value" : "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" }, { "key" : "PUID", "value" : "xx" }, { "key" : "PGID", "value" : "xx" }, { "key" : "TZ", "value" : "America/Chicago" } ], "exporting" : false, "id" : "bd9b69ebaa86c45231e53168569e4801b5d76c43d66ed36d5ecff07dba2e5b9e", "image" : "mdhiggins/sonarr-sma:latest", "is_ddsm" : false, "is_package" : false, "links" : [], "memory_limit" : 0, "name" : "Sonarr", "network" : [ { "driver" : "bridge", "name" : "bridge" } ], "network_mode" : "bridge", "port_bindings" : [ { "container_port" : xx, "host_port" : xx, "type" : "tcp" } ], "privileged" : true, "shortcut" : { "enable_shortcut" : false, "enable_status_page" : false, "enable_web_page" : false, "web_page_url" : "" }, "use_host_network" : false, "volume_bindings" : [ { "host_volume_file" : "/docker/sonarr_v3/sma", "mount_point" : "/usr/local/sma/config", "type" : "rw" }, { "host_volume_file" : "/docker/sonarr_v3/sma/autoProcess.ini", "mount_point" : "/usr/local/sma/config/autoProcess.ini", "type" : "rw" }, { "host_volume_file" : "/docker/sonarr_v3/config", "mount_point" : "/config", "type" : "rw" }, { "host_volume_file" : "/data/downloads/completed", "mount_point" : "/downloads", "type" : "rw" }, { "host_volume_file" : "/Media/TVShows", "mount_point" : "/tv", "type" : "rw" } ] }

mdhiggins commented 2 months ago

You might want to do a fresh container pull and see if that fixes things not sure what those errors are or where in the stack they're being triggered

Muckoma commented 1 month ago

Okay all done and here are the latest log. This is basically the last line I see but no refresh actually happens.

2024-05-15 05:00:07 - resources.mediaprocessor - INFO - Ripping eng subtitle from source stream 2 into external file.
2024-05-15 05:00:08 - resources.mediaprocessor - INFO - /tv/Young Sheldon/Season 07/Young Sheldon - S07E11 - A Little Snip and Teaching Old Dogs.eng.srt created.
2024-05-15 05:00:08 - resources.mediaprocessor - INFO - Starting conversion.
2024-05-15 05:00:08 - resources.mediaprocessor - INFO - FFmpeg command:
2024-05-15 05:00:08 - resources.mediaprocessor - INFO - ======================
2024-05-15 05:00:08 - resources.mediaprocessor - INFO - /usr/local/bin/ffmpeg -i "/tv/Young Sheldon/Season 07/Young Sheldon - S07E11 - A Little Snip and Teaching Old Dogs.mkv" -vcodec copy -map 0:0 -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -c:a:0 ac3 -map 0:1 -ac:a:0 6 -b:a:0 768k -metadata:s:a:0 BPS=768000 -metadata:s:a:0 BPS-eng=768000 -metadata:s:a:0 "title=5.1 Channel" -metadata:s:a:0 "handler_name=5.1 Channel" -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:a:1 aac -map 0:1 -ac:a:1 2 -b:a:1 256k -metadata:s:a:1 BPS=256000 -metadata:s:a:1 BPS-eng=256000 -filter:a:1 "pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE" -metadata:s:a:1 title=Stereo -metadata:s:a:1 handler_name=Stereo -metadata:s:a:1 language=eng -disposition:a:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y "/tv/Young Sheldon/Season 07/Young Sheldon - S07E11 - A Little Snip and Teaching Old Dogs.mp4"
2024-05-15 05:00:08 - resources.mediaprocessor - INFO - ======================
2024-05-15 05:03:18 - resources.mediaprocessor - INFO - /tv/Young Sheldon/Season 07/Young Sheldon - S07E11 - A Little Snip and Teaching Old Dogs.mp4 created.
2024-05-15 05:03:20 - resources.mediaprocessor - INFO - Relocating MOOV atom to start of file.
2024-05-15 05:03:20 - qtfaststart - INFO - Removing free atom at 36 (8 bytes)
2024-05-15 05:03:20 - qtfaststart - INFO - Patching stco with 26961 entries
2024-05-15 05:03:20 - qtfaststart - INFO - Patching stco with 35143 entries
2024-05-15 05:03:20 - qtfaststart - INFO - Patching stco with 43988 entries
2024-05-15 05:03:20 - qtfaststart - INFO - Writing output...
2024-05-15 05:03:34 - SonarrPostProcess - INFO - Sonarr response from RescanSeries command: ID 3368894 started.
2024-05-15 05:03:54 - SonarrPostProcess - INFO - Rescan command completed.
2024-05-15 05:03:54 - SonarrPostProcess - INFO - Sonarr monitoring information updated for episode A Little Snip and Teaching Old Dogs.
2024-05-15 05:03:55 - SonarrPostProcess - INFO - Sonarr response from Rename command: ID 3368895 queued.
2024-05-15 05:04:56 - resources.mediaprocessor - INFO - Starting Plex refresh.
2024-05-15 05:04:56 - resources.mediaprocessor - INFO - Connecting to Plex server...
2024-05-15 05:04:56 - resources.mediaprocessor - INFO - Connected to Plex server Bobflix using server settings.
2024-05-15 05:04:56 - resources.mediaprocessor - INFO - Checking if any sections contain the path /tv/Young Sheldon/Season 07.
Muckoma commented 1 month ago

Any idea @mdhiggins ?

mdhiggins commented 1 month ago

Assuming that's the end of the logs everything looks like its running how its supposed to but its not finding a section with your path /tv/Young Sheldon/Season 07 coming from querying your plex server

Depending on your relative paths throughout your docker containers if the path inside the Plex container doesn't match then this will fail and you need to configure your path-mapping settings under the plex settings in autoProcess.ini

For example, sonarr sees the path as /tv/Young Sheldon/Season 07 but if inside the Plex container your path is something like /media/tv/Young Sheldon/Season 07 that will fail unless you providing path mapping

Debug logging will display information about path mapping calculations as well if you need help

Muckoma commented 1 month ago

Assuming that's the end of the logs everything looks like its running how its supposed to but its not finding a section with your path /tv/Young Sheldon/Season 07 coming from querying your plex server

Depending on your relative paths throughout your docker containers if the path inside the Plex container doesn't match then this will fail and you need to configure your path-mapping settings under the plex settings in autoProcess.ini

For example, sonarr sees the path as /tv/Young Sheldon/Season 07 but if inside the Plex container your path is something like /media/tv/Young Sheldon/Season 07 that will fail unless you providing path mapping

Debug logging will display information about path mapping calculations as well if you need help

Sorry, how do I enable debugging logs?

I looked in my autoProcess.ini and the path mapping is empty. I do have docker configured to map the TV shows.

image

But I left this value null in autoProcess.ini [Plex] host = 192.168.xx port = xx refresh = True token = xxxxxx username = password = servername = ssl = False ignore-certs = True path-mapping =

In Plex this is the config to the libary:

image
mdhiggins commented 1 month ago

Yeah so the issue is the discrepancy between the two containers and you need to set path mapping to provide map between the difference

I suspect something like this this should get things working

[Plex]
...
path-mapping = /tv=/volume1/Media/TVShows
Muckoma commented 3 weeks ago

Awesome! This seemed to resolve my issue. Thanks a lot.

Muckoma commented 3 weeks ago

One other odd question @mdhiggins - Do you keep the original files around? The only downside with converting everything to mp4 is the dual files.

mdhiggins commented 3 weeks ago

Nope. I pretty much only remux to mp4 so no quality loss and no need to keep around the mkv