Tdarr_Plugins icon indicating copy to clipboard operation
Tdarr_Plugins copied to clipboard

Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng not working with Sonarr V4

Open hlugt opened this issue 1 year ago • 9 comments

Is this plugin working with Sonarr 4 or maybe only version 3?

Saw issue #381 from @siopoa and I was about to ask whether this plugin is supposed to work for TV Shows with Sonarr at all. When configuring "priority" with "sonarr" or without, and setting the "sonarr_api_key" and "sonarr_url", the transcode job always fails with a 404 error.

I am running the docker haveagitgat/tdarr: latest container on arm64 with this plugin. For movie libraries and radarr it works (although I need to leave the sonarr fields empty ánd priority empty...).

The error also occurs with TMDB API key empty.

I presume therefore in my case it is the sonarr call that throws the error. @siopoa : how does your config look like, so that it does work/get this far? On mine, SonarrV4 and RadarrV4 are on a different server (docker) btw.

2023-04-10T22:03:00.080Z UqRR3-pQl:Node[tdarr-internal]:Worker[near-nag]:Plugin: Y0Gjkt5B_: Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng 2023-04-10T22:03:00.080Z UqRR3-pQl:Node[tdarr-internal]:Worker[near-nag]:[1/5] Reading plugin 2023-04-10T22:03:00.081Z UqRR3-pQl:Node[tdarr-internal]:Worker[near-nag]:[2/5] Plugin read 2023-04-10T22:03:00.081Z UqRR3-pQl:Node[tdarr-internal]:Worker[near-nag]:[3/5] Installing dependencies 2023-04-10T22:03:02.084Z UqRR3-pQl:Node[tdarr-internal]:Worker[near-nag]:[4/5] Running plugin 2023-04-10T22:03:02.085Z UqRR3-pQl:Node[tdarr-internal]:Worker[near-nag]:{"pluginInputs":{"user_langs":"dut","priority":"sonarr","api_key":"##############","radarr_api_key":"","radarr_url":"","sonarr_api_key":"#########","sonarr_url":"###.###.###.###:8989"}} 2023-04-10T22:03:02.086Z UqRR3-pQl:Node[tdarr-internal]:Worker[near-nag]:Error AxiosError: Request failed with status code 404

hlugt avatar Apr 11 '23 06:04 hlugt

Yeah I think they changed the api specs with v4, I do have a version that I was testing that should work on both. Need to check that in though.

supersnellehenk avatar Apr 11 '23 06:04 supersnellehenk

That would be great!

hlugt avatar Apr 11 '23 10:04 hlugt

BTW: my tdarr_node log keeps saying: [2023-04-11T14:04:07.692] [INFO] Tdarr_Node - The following external module needs to be installed for a plugin:[email protected] I run the internal node of the tdarr docker... My docker container log says: [2023-04-11T14:09:54.291] [INFO] Tdarr_Node - The following external module needs to be installed for a plugin:[email protected] npm WARN saveError ENOENT: no such file or directory, open '/app/Tdarr_Node/assets/app/plugins/package.json' npm WARN enoent ENOENT: no such file or directory, open '/app/Tdarr_Node/assets/app/plugins/package.json' npm WARN plugins No description npm WARN plugins No repository field. npm WARN plugins No README data npm WARN plugins No license field.

  • [email protected] updated 1 package and audited 21 packages in 1.303s 2 packages are looking for funding run npm fund for details ` So it seems the package does not stick or something??

hlugt avatar Apr 11 '23 12:04 hlugt

Is it correct that the sonarr api call only misses the v3 as inbetween folder? First tests seem to go fine with that squeezed in. Need to find some obscure files to do some more extensive tests with...

Edit: Looks good so far. Wonder if for Sonarr V3 the api call should not include v3 as well... API library seems synced as far as I can tell? In other words: is the plugin now not broken for both sonarr versions?

hlugt avatar Apr 15 '23 19:04 hlugt

Still no go for Sonarr v4

lukjod avatar Apr 19 '23 21:04 lukjod

Fix proposed in #333 , waiting on a merge. Can copy it to a local plugin and try it.

supersnellehenk avatar Apr 19 '23 21:04 supersnellehenk

The version from #333 does not work at all and doesn't get id from Radarr or Sonarr. Last plugindownloaded to local and edited with add v3 into sonarr api works well but omly im movies im series it doesmt work amd gives error

Pre-processing - Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng☒Plugin error! AxiosError: Request failed with status code 401

lukjod avatar Apr 20 '23 05:04 lukjod

I just copied the plugin to local and changed line 270 to

await axios.get(http://${inputs.sonarr_url}/api/v3/series?apikey=${inputs.sonarr_api_key})

which seems to work fine. I'm not getting any errors and looking through the logs, the plugin is getting the series language and processing the files correctly.

oliverhoerberg avatar Jun 05 '23 04:06 oliverhoerberg

As the script has a "last resort" to check the folder names for IMDb tags....would it be possible to also check for tvdb tags in the folders?

I have my TV folders setup as so, and this would help get things working with sonarr v4

7hr08ik avatar Aug 16 '23 21:08 7hr08ik