HaveAGitGat / Tdarr_Plugins

Tdarr Plugins
GNU General Public License v3.0
135 stars 151 forks source link

Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng not working with Sonarr V4 #401

Open hlugt opened 1 year ago

hlugt commented 1 year ago

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

supersnellehenk commented 1 year ago

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.

hlugt commented 1 year ago

That would be great!

hlugt commented 1 year ago

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:axios@0.27.2 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:axios@0.27.2 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.

hlugt commented 1 year ago

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?

lukjod commented 1 year ago

Still no go for Sonarr v4

supersnellehenk commented 1 year ago

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

lukjod commented 1 year ago

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

oliverhoerberg commented 1 year ago

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.

7hr08ik commented 1 year ago

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