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

Hyphen in directory tree break movie directory recognition #77

Closed
peterpiglet opened this issue Mar 26, 2024 · 9 comments
Closed

Hyphen in directory tree break movie directory recognition #77

peterpiglet opened this issue Mar 26, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@peterpiglet
Copy link

peterpiglet commented Mar 26, 2024

Hi, I have an issue where some media directories are not correctly recognized in the scan. It seems that when there is a hyphen - in the directory tree it breaks correct movie folder recognition. Example:

Structure: /media/movies-3D/moviename (year)/file.mkv

For all movies in the directory movies-3D Plex Poster Maker will create ONE directory called 3D, opposed to individual directories for each, moviename (year). Consequently, posters for all these movies cannot be placed correctly.

Interestingly, hyphens in the movie name (e.g. Spider-Man (year) are allowed. Maybe hyphens can be escaped for the whole directory tree? That would be awesome, thanks for any help. Great tool!

@peterpiglet peterpiglet changed the title Hyphen in directory tree break movie recognition Hyphen in directory tree break movie directory recognition Mar 26, 2024
@fscorrupt
Copy link
Owner

fscorrupt commented Mar 26, 2024

hey, could you please attach your "PlexLibexport.csv", i had another user with similar problem, but i could not reproduce it, i even tried same folder structure then he had in a testlib, so what i want to say is - from code site it should work without any issue when you have - in your folders.

Also, on what OS do you use PPM?

@fscorrupt fscorrupt self-assigned this Mar 26, 2024
@fscorrupt fscorrupt added the bug Something isn't working label Mar 26, 2024
@peterpiglet
Copy link
Author

peterpiglet commented Mar 26, 2024

hey, I am running PPM in a docker (1.0.40) on Unraid (6.12.8).

I have attached the "PlexLibexport.csv" for my test library where I run PPM. As you can see all four paths:

  • /media/movies/movieGRP/
  • /media/movies/movieGRP-4K/
  • /media/movies/movieGRP-3D/
  • /media/movies/movieGRP-editions/

are mapped to /media/movies/movieGRP/ and the RootFoldernames recognized as 4K, 3D and editions.

@fscorrupt
Copy link
Owner

okey please use latest 1.0.41 and also set the logLevel in config to 3
then please attach the scriptlog.

@peterpiglet
Copy link
Author

peterpiglet commented Mar 26, 2024

OK, did that. I don't know whether there already was a change in 1.0.41, but the split worked on my test library (see scriptlog). I am losing my mind...

However, If I run the same config on my main library the split does not work. There are slightly different path names and it is much larger. I see in the log, that the Lib Paths are correctly spliced, but the 2-step folder extraction seems to be the problem. First it matches the correct folder, then matches an incorrect one and takes that (see below for one example). This is true for all movies in these hyphen-subfolders. I have redacted one specific string below to xxxxxx. I can send you the log to my main lib in a DM if you need it.

[2024-03-26 13:07:26] [DEBUG] |L.3285| File Location: /media/movies/xxxxxx-editions/Captain America The First Avenger (2011)/Captain America The First Avenger (2011) {imdb-tt0458339} {edition-3D} [Remux-1080p][3D][DTS-HD MA 7.1][h264]-xxxxxx.mkv
[2024-03-26 13:07:26] [DEBUG] |L.3287| Plex Lib Paths before split: /media/movies/xxxxxx-editions,/media/movies/xxxxxx-editions-4K,/media/movies/xxxxxx-4K,/media/movies/radarr,/media/movies/xxxxxx
[2024-03-26 13:07:26] [DEBUG] |L.3288| Plex Lib Paths after split: /media/movies/xxxxxx-editions /media/movies/xxxxxx-editions-4K /media/movies/xxxxxx-4K /media/movies/radarr /media/movies/xxxxxx
[2024-03-26 13:07:26] [DEBUG] |L.3300| Matchedpath: /media/movies/xxxxxx-editions/
[2024-03-26 13:07:26] [DEBUG] |L.3301| Libpath: /media/movies/xxxxxx-editions/
[2024-03-26 13:07:26] [DEBUG] |L.3302| ExtractedFolder: Captain America The First Avenger (2011)
[2024-03-26 13:07:26] [DEBUG] |L.3300| Matchedpath: /media/movies/xxxxxx/
[2024-03-26 13:07:26] [DEBUG] |L.3301| Libpath: /media/movies/xxxxxx/
[2024-03-26 13:07:26] [DEBUG] |L.3302| ExtractedFolder: editions
[2024-03-26 13:07:26] [DEBUG] |L.3345| Found [Captain America: The First Avenger] of type movie in [Filme]
...
[2024-03-26 13:07:50] [INFO] |L.3493| Start Poster Search for: Captain America: The First Avenger
[2024-03-26 13:07:50] [INFO] |L.148 | Searching on TMDB for a movie poster
[2024-03-26 13:07:50] [INFO] |L.209 | Found Poster with Language 'en' on TMDB
[2024-03-26 13:07:50] [INFO] |L.3556| Poster url: https://image.tmdb.org/t/p/original/AqnvU0lPV3LW1XcjmjkQk3w1PxL.jpg
[2024-03-26 13:07:50] [INFO] |L.3559| Downloading Poster with Text from 'TMDB'
[2024-03-26 13:07:50] [INFO] |L.3583| Processing Poster for: "Captain America: The First Avenger"
[2024-03-26 13:07:51] [INFO] |L.3604| Resizing it
[2024-03-26 13:07:51] [INFO] |L.3632| Added: /pmm_assets\Filme\editions\poster.jpg

@fscorrupt
Copy link
Owner

hmm, very strange, i added another debug message, please readd scriptlog with latest script

@peterpiglet
Copy link
Author

peterpiglet commented Mar 26, 2024

Ran with 1.0.43 now. Here is the excerpt from the logs for the same movie (with the same string redacted to xxxxxx. The string only contains [A-Za-z] by the way):

[2024-03-26 15:07:15] [DEBUG] |L.3293| File Location: /media/movies/xxxxxx-editions/Captain America The First Avenger (2011)/Captain America The First Avenger (2011) {imdb-tt0458339} {edition-3D} [Remux-1080p][3D][DTS-HD MA 7.1][h264]-xxxxxx.mkv
[2024-03-26 15:07:15] [DEBUG] |L.3295| Plex Lib Paths before split: /media/movies/xxxxxx-editions,/media/movies/xxxxxx-editions-4K,/media/movies/xxxxxx-4K,/media/movies/radarr,/media/movies/xxxxxx
[2024-03-26 15:07:15] [DEBUG] |L.3296| Plex Lib Paths after split: /media/movies/xxxxxx-editions /media/movies/xxxxxx-editions-4K /media/movies/xxxxxx-4K /media/movies/radarr /media/movies/xxxxxx
[2024-03-26 15:07:15] [DEBUG] |L.3299| Location: /media/movies/xxxxxx-editions/Captain America The First Avenger (2011)/Captain America The First Avenger (2011) {imdb-tt0458339} {edition-3D} [Remux-1080p][3D][DTS-HD MA 7.1][h264]-xxxxxx.mkv
[2024-03-26 15:07:15] [DEBUG] |L.3300| Libpath: /media/movies/xxxxxx-editions
[2024-03-26 15:07:15] [DEBUG] |L.3310| Matchedpath: /media/movies/xxxxxx-editions/
[2024-03-26 15:07:15] [DEBUG] |L.3311| ExtractedFolder: Captain America The First Avenger (2011)
[2024-03-26 15:07:15] [DEBUG] |L.3299| Location: /media/movies/xxxxxx-editions/Captain America The First Avenger (2011)/Captain America The First Avenger (2011) {imdb-tt0458339} {edition-3D} [Remux-1080p][3D][DTS-HD MA 7.1][h264]-xxxxxx.mkv
[2024-03-26 15:07:15] [DEBUG] |L.3300| Libpath: /media/movies/xxxxxx
[2024-03-26 15:07:15] [DEBUG] |L.3310| Matchedpath: /media/movies/xxxxxx/
[2024-03-26 15:07:15] [DEBUG] |L.3311| ExtractedFolder: editions
[2024-03-26 15:07:15] [DEBUG] |L.3354| Found [Captain America: The First Avenger] of type movie in [Filme]

@fscorrupt
Copy link
Owner

Could you send me the complete log on discord?
Then i can have a look tomorrow.

User: fs.corrupt

fscorrupt referenced this issue Mar 27, 2024
- Fix plex folder extractions
- fix hashtestpath
- add debug logging
@fscorrupt
Copy link
Owner

Should be fixed with latest version v1.0.45

@peterpiglet
Copy link
Author

Just tried out v1.0.45, unfortunately it is still not working on my main lib. I see the same behavior as before in the lgos. Will discord you the full log again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants