Casvt / Plex-scripts

Plex, the arr's and tautulli scripts coming from user requests
GNU General Public License v3.0
338 stars 30 forks source link

filename_to_title.py has some bugs I guess #148

Closed gitttt54 closed 5 months ago

gitttt54 commented 2 years ago

I'd like to thank you for that script and here is my bug report ;-)

In which file is the bug? https://github.com/Casvt/Plex-scripts/blob/main/changing_settings/filename_to_title.py

Describe the setup (arguments and their values, how it was run, etc.): I run the script with parameter -i

mappings = {
    #'filename string': 'plex title string'
    '(OmU)'        : '(OmU)',
    'HARDSUBBED'   : '(OmU)',
    '(Koloriert)'  : '(Farbfassung)',
    '(Colorized)'  : '(Farbfassung)',
    '(Farbfassung)': '(Farbfassung)',
    'Farbversion'  : '(Farbfassung)',
    '(Farbe)'      : '(Farbfassung)'
}

Describe what the bug is: 1) is sometimes removes the (OmU) from titles. (maybe only for episode titles)

Output shows:

Der Fall des schweigsamen Tischlers (OmU) to Der Fall des schweigsamen Tischlers
Der Fall der tödlichen Prophezeiung (OmU) to Der Fall der tödlichen Prophezeiung
Der Fall des Weihnachtspuddings (OmU) to Der Fall des Weihnachtspuddings

2) after some runs, no output is shown. The script starts, works some time, stops (or ends, I can not tell, because no output)

3) only the first line of the mapping seems to be replaced. In my case only (OmU) is suffixed to the title. No title is suffixed with (Farbfassung) but I have a lot of movies/episodes with suitable filenames. (maybe I have a mistake in my mappings?)

Describe what should be happening:

1) don't remove suffixes from, only add suffixes

2) show output (what changed) on every run. please add status info on scripts end, maybe like: craweld X movies, suffixed Y movies with mapping "(OmU)" craweld X movies, suffixed Y movies with mapping "(Farbfassung)" craweld X episodes, suffixed Y episodes ... took N seconds maybe prefix each output line with "movie: " and "episode: " so see what kind it is

3) replace all mappings (or show me my mistake in the mappings) ;-D