Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Plex export to Radarr (Keeping org. Plex movie folder naming --> path) #448

Closed
casperse opened this issue Nov 23, 2021 · 35 comments · Fixed by #465
Closed
Assignees
Labels
enhancement New feature or request status:added-to-develop Feature Request or Bug Fix is in Develop

Comments

@casperse
Copy link

Is your feature request related to a problem? Please describe.
First a Big thanks to Sohjiro for explaining me how PMM export/import works today

Yes importing a huge amount of movies into Radarr is a problem
Especially when the naming often changed over time, or a movie have 3 different titles
(No one have a perfect 1:1 naming of the movies - Language-Release year etc.)

Describe the solution you'd like
When movies are sent to Radarr from Plex the existing movie folder is sent with the TMDB information
That way Radarr will not end up with allot of empty folders :-)

Configuration:
root_folder_path: /movies
add_existing: true
keep_plex_path: true <---- maybe a configuration setting when enabling add_existing: true?

Describe alternatives you've considered
There isn't one, I have searched the internet

Additional context
This would save so many peoples time when moving to the *rr family with their large media collections

@casperse casperse added enhancement New feature or request status:not-yet-viewed I haven't reviewed the Feature or Bug yet labels Nov 23, 2021
@casperse
Copy link
Author

Just found that it only import movies missing from any Collection search!

I would like to include a request to just add all the Plex movies to Radarr (Radarr would skip any movie already there!)
Doing this would mean that you could import any Plex collection to Radarr and get it sorted/renamed and organized easily
There isn't any tool today that can do this...this would be the only one!

@meisnate12
Copy link
Member

You can add all Movies to radarr using the radarr_add_all library operation

@snickers2k
Copy link

snickers2k commented Nov 24, 2021

hey.
@meisnate12 i was the initial request for this - and you ended up with that "radarr_add_all" solution. which is maybe a usecase for some. but the actual usecase is just like @casperse described; the actual path is not send to radarr/sonarr. Which makes the whole thing kinda absolete - because Radarr thinks most of them are missing, if not named 100% according to radarr/sonarr naming scheme.

In Plex i have everything pretty much correct (which was a work over years). But upon a certain amound of movies, it's a pain in the ass to add them to radarr manually at once.

@meisnate12
Copy link
Member

so i just added this to develop check it out! I also added a print out of whats happening. My next goal is to cache whats been added to radarr so you only have to add whats not there

@meisnate12
Copy link
Member

i also added radarr_path and plex_path as options under radarr (Sonarr also has these but with sonarr_path) you can use the attributes to map the file systems since they might not look the same for example:

  radarr_path: /media
  plex_path: /share/CACHEDEV1_DATA/Multimedia

@meisnate12
Copy link
Member

all items added must at least be in the root folder specified the name of the folder doesn't matter as long as plex knows what the item is.

@snickers2k
Copy link

@meisnate12 you are absolutely awesome 👍 🥳
thanks

@meisnate12 meisnate12 added status:added-to-develop Feature Request or Bug Fix is in Develop and removed status:not-yet-viewed I haven't reviewed the Feature or Bug yet labels Nov 28, 2021
@casperse
Copy link
Author

Yes great work! - I am pretty sure many people will use this function Thanks!

@snickers2k
Copy link

snickers2k commented Dec 1, 2021

just tested this and it gives the following error for both sonarr and radarr.

int() argument must be a string, a bytes-like object or a number, not 'tuple'

in 1.13.0 radarr/sonarr_add_all worked (without it adding the path of course).

should i open a bug-issue or is it better here?

@meisnate12
Copy link
Member

I need the erred trace from the log file

@snickers2k
Copy link

snickers2k commented Dec 1, 2021

of course, sorry
meta-log.zip

@snickers2k
Copy link

so after fixing these mistakes, it worked really awesome.

now i thought if it's even possible to tell radarr/sonarr the quality and language given by plex? so arr's doesn't have to check everything again?

thanks

@meisnate12
Copy link
Member

just tell it not to search when adding

@snickers2k
Copy link

snickers2k commented Dec 5, 2021

okay. my bad. it was not the quality, but the language which got wrong. but because of dual-lang and messed up filenames - and radarr can only handle single-language. so maybe a option for "default" language would be great.

but anyway - the bigger problem with this is, i just realized that there are still like 70% of the items not added to both, radarr and sonarr.
last log:

thanks

@meisnate12
Copy link
Member

can you switch to the latest develop and see if you have the same error

@snickers2k
Copy link

snickers2k commented Dec 5, 2021

yes, just did that and it still gives the following error at the end of "library operations"


old

@snickers2k
Copy link

snickers2k commented Dec 9, 2021

latest version (1.13.2) still crashes

old

@meisnate12
Copy link
Member

ok can you try the newest develop i think i know the issue some paths had / on the end and some didnt so im just striping out any trailing / or \ so the compare should work better let me know if it works

@meisnate12
Copy link
Member

Can you send me your meta.log file

@thel1988
Copy link

thel1988 commented Dec 13, 2021

Hi Snickers2k, i got the exact same error as you do, even though the sonarr have series type defined in the config.
| Sonarr Error: Invalid Series Type: '[2413:How I Met Your Father]' Options: ['standard', 'daily', 'anime']

sonarr: ******* quality_profile: HD - All language_profile: English series_type: standard

@meisnate12
Copy link
Member

This should be fixed in develop

@snickers2k
Copy link

now it's not giving that error anymore, but still not working.
meta.log

@snickers2k
Copy link

@thel1988 could you please delete the link to my log thx

@meisnate12
Copy link
Member

now it's not giving that error anymore, but still not working.

can you narrow down what I'm looking for here

@snickers2k
Copy link

snickers2k commented Dec 14, 2021

don't know really, but this one is the last entry below "series library operations"
and sonarr is still missing around 20% - so there needs to be .. something^^

[2021-12-13 23:37:47,493] [sonarr.py:90]              [DEBUG]    | {}                                                                                                 |
[2021-12-14 00:22:44,772] [util.py:152]               [DEBUG]    | Traceback (most recent call last):                                                                 |
                                                                 |   File "./plex_meta_manager.py", line 274, in update_libraries
                                                                 |     library_operations(config, library)
                                                                 |   File "./plex_meta_manager.py", line 530, in library_operations
                                                                 |     library.Sonarr.add_tvdb(sonarr_adds)
                                                                 |   File "/opt/Plex-Meta-Manager/modules/sonarr.py", line 129, in add_tvdb
                                                                 |     _a, _e, _i = self.api.add_multiple_series(shows, folder, quality_profile, language_profile, monitor,
                                                                 |   File "/home/snikay/.local/lib/python3.8/site-packages/arrapi/apis/sonarr.py", line 328, in add_multiple_series
                                                                 |     series.extend([Series(self, data=s) for s in self._raw.post_series_import(json[i:i+per_request])])
                                                                 |   File "/home/snikay/.local/lib/python3.8/site-packages/arrapi/raws/sonarr.py", line 26, in post_series_import
                                                                 |     return self._post("series/import", json=json)
                                                                 |   File "/home/snikay/.local/lib/python3.8/site-packages/arrapi/raws/base.py", line 40, in _post
                                                                 |     return self._request("post", path, json=json, **kwargs)
                                                                 |   File "/home/snikay/.local/lib/python3.8/site-packages/arrapi/raws/base.py", line 81, in _request
                                                                 |     raise ArrException(f"({response.status_code} [{response.reason}]) {response_json[0]['errorMessage']}")
                                                                 | arrapi.exceptions.ArrException: (400 [Bad Request]) Path is already configured for another series
                                                                 | 
[2021-12-14 00:22:44,773] [util.py:148]               [CRITICAL] | (400 [Bad Request]) Path is already configured for another series
[2021-12-14 00:22:44,794] [plex_meta_manager.py:199]  [INFO]     | 
[2021-12-14 00:22:44,795] [util.py:199]               [INFO]     |

@snickers2k
Copy link

snickers2k commented Dec 14, 2021

did you changed anything in latest dev? somehow the last run was successful....

(i starting to think that i need to restart my server after new python requirements... but not sure)

closed for good now

thank you again.

@palla89
Copy link

palla89 commented Dec 15, 2021

Hi @meisnate12 , I tried develop version because on master I couldn't import my movies In Radarr.

this is my config.yml's radarr part:

radarr:                                        
  url: ##
  token: #
  add: false
  root_folder_path: /movies
  monitor: true
  availability: released
  quality_profile: HD-1080p
  tag: pmm
  search: false
  add_existing: false
  radarr_add_all: true

When I try importing my movies (about 240) the error is this:

Screenshot 2021-12-16 at 00 17 23

So, I tried as instructed here adding these two params:

 plex_path: /volume1/Media/Film
 radarr_path: /movies

Unfortunately, even if I see progress (I can see from logs attached that new path is not /volume1/Media/Film anymore (the Plex one) but is the radarr correct one ( / movies),I get a strange error with these params:

Screenshot 2021-12-16 at 00 18 42

What should I do? Am I doing something wrong?

Thank you!!

@snickers2k
Copy link

snickers2k commented Dec 16, 2021

@palla89 try to point all to the same path. worked for me.
where is your difference between those paths? are you running docker or something weird? if there is only "/volume1/Media/Film" , point it there.


@meisnate12
another request to this feature is options;

  • "default language"* aswell as "multi-language"
    If there is no language in (messed up) titles - for dual-language movies, radarr automatically takes english only.
    maybe with something like radarr_language_order: de, en (to set german first and also inform about multi-language if existing - otherwise fall back to the next) ?

  • "quality to exclude", like 4K - this way we could even tell two different radarr's which version to take - and i could finally cleanup that 1080p/4k mess aswell :D (by reordering the 4k-radarr to the 4k-folder)

  • also please add Audio and Video Codec's while adding to radarr.

thank you.

@meisnate12
Copy link
Member

meisnate12 commented Dec 16, 2021

So @palla89 from the looks of your log I'm guessing that you have some movie files directly in the /volume1/Media/Film folder ie /volume1/Media/Film/movie.mp4 this is why you're getting (106646, '/volume1/Media/Film') and (106646, '/movies') radarr can only have only movie per folder so what you need to do is make sure your movie directory is correct ie each movie needs its own folder see here for more.

@meisnate12
Copy link
Member

"default language"* aswell as "multi-language" If there is no language in (messed up) titles - for dual-language movies, radarr automatically takes english only. maybe with something like radarr_language_order: de, en (to set german first and also inform about multi-language if existing otherwise fall back to the next) ?

So when you add a movie to Radarr in the UI do you have a setting for either "default language" or "multi-language"?

this is what i have when adding a movie and i have no options like you ask for the same is true for the edit screen.

image

"quality to exclude", like 4K - this way we could even tell two different radarr's which version to take - and i could finally cleanup that 1080p/4k mess aswell :D (by reordering the 4k-radarr to the 4k-folder)

So you want me to use plex search to find out if some are 4k and if some are not and add those to the right radarr? If so this can already be done now. but you would have to have it run on two separate runs if this is what you wanna do open a discussion and ill explain it there so more people can find it.

also please add Audio and Video Codec's while adding to radarr.

not really sure what you mean here

@snickers2k
Copy link

snickers2k commented Dec 16, 2021

don't know if this is possible via API
but for "manual import", there is the option to choose multiple languages:

Bildschirmfoto 2021-12-16 um 05 34 06

Bildschirmfoto 2021-12-16 um 05 34 51

Bildschirmfoto 2021-12-16 um 05 35 04

for the 4K... never mind... i simply have to use Filebot to filter out the 4K Versions and place it in another folder.

@meisnate12
Copy link
Member

ah ive never used manual import before. This deals with individual movie files vs the Radarr Movie Object which can have multiple files. Theres no documentation on how theses are imported and in general I'm not trying to have pmm do that much into radarr with files

@palla89
Copy link

palla89 commented Dec 16, 2021

So @palla89 from the looks of your log I'm guessing that you have some movie files directly in the /volume1/Media/Film folder ie /volume1/Media/Film/movie.mp4 this is why you're getting (106646, '/volume1/Media/Film') and (106646, '/movies') radarr can only have only movie per folder so what you need to do is make sure your movie directory is correct ie each movie needs its own folder see here for more.

Hi mate! Thank you for your answer! I think the problem could be exactly that: I have movies not always in their own folders, sometimes they are still with the downloaded naming (so not clean) and just in the main folder '/volume1/Media/Film'

So I should reorganise them manually before importing, correct?

@meisnate12
Copy link
Member

Yes you want to make sure each movie has its own folder for radarr to work properly

@snickers2k
Copy link

another request to this feature; would be awesome if pmm could update the path in case it has changed. i just did run plex_dupefinder and now have to delete everything basically to get the new paths :(

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status:added-to-develop Feature Request or Bug Fix is in Develop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants