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

Bulk Import 'could'nt map movie (.' #1951

Closed
MangaValk opened this issue Aug 17, 2017 · 4 comments
Closed

Bulk Import 'could'nt map movie (.' #1951

MangaValk opened this issue Aug 17, 2017 · 4 comments
Labels
Area: Parser Issue is related to parsing infrastructure. Type: Bug Issue is a bug
Milestone

Comments

@MangaValk
Copy link
Contributor

Description:

When trying to do a bulk import it doesn't find any movies but gives a page of warnings in log.
movies folder names (year) name/name (year) quality.mkv

when i manually add the movie it does find the files and adds them correctly.

Radarr Version:
0.2.0.778

Logs:

17-8-17 09:51:56.2|Warn|SkyHookProxy|Couldn't map movie (. to a movie on The Movie DB. It will not be added :(
17-8-17 09:51:56.9|Warn|SkyHookProxy|Couldn't map movie (. to a movie on The Movie DB. It will not be added :(
17-8-17 09:51:57.6|Warn|SkyHookProxy|Couldn't map movie (. to a movie on The Movie DB. It will not be added :(
17-8-17 09:51:58.3|Warn|SkyHookProxy|Couldn't map movie (. to a movie on The Movie DB. It will not be added :(

this repeats for around 60 lines
movie folder contains around 700 folders/movies

@galli-leo
Copy link
Contributor

Hmm. Can you try changing your folder names to "name (year)"?

@MangaValk
Copy link
Contributor Author

i tried a separate directory with only 1 movie, when i use "name (year)" it finds the movie.
but when i use "(year) name" it doesn't find it and gives the same error in log.

@galli-leo galli-leo added Type: Bug Issue is a bug Area: Parser Issue is related to parsing infrastructure. labels Aug 17, 2017
@galli-leo galli-leo added this to the 0.2 milestone Aug 17, 2017
@MangaValk
Copy link
Contributor Author

i'l try debug the code some, glad its in c# :)
i checked the regex for matching the "(year) name" and that's correct.
going to build the source and debug trace trough and see what happens.

@MangaValk
Copy link
Contributor Author

Found the problem, it matches on this regex ^(?<title>.+?)?(?:(?:[-_\W](?<![)\[!]))*(?<year>(19|20)\d{2}(?!p|i|\d+|\]|\W\d+)))+(\W+|_|$)(?!\\)
but then the title 'matchCollection[0].Groups["title"].Value' contains only "(".

see > https://github.com/Radarr/Radarr/blob/develop/src/NzbDrone.Core/Parser/Parser.cs#L432
and > https://github.com/Radarr/Radarr/blob/develop/src/NzbDrone.Core/Parser/Parser.cs#L857

this regex breaks at paser.cs line 427 > https://github.com/Radarr/Radarr/blob/develop/src/NzbDrone.Core/Parser/Parser.cs#L41

to hotfix this i changed line 851 of Parser.cs to this if (!matchCollection[0].Groups["title"].Success || matchCollection[0].Groups["title"].Value == "(")

hope it helps, if you want i can make a pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: Parser Issue is related to parsing infrastructure. Type: Bug Issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants