kierse / mediarover

Automated media download scheduler and catalogue maintainer
GNU General Public License v3.0
12 stars 1 forks source link

add "ignore_metadata" for season folders #21

Closed krog closed 14 years ago

krog commented 14 years ago

As the "ignore_metadata" feature works for series folders, add it to seasons.

I add metadata like "720p" or available languages to my season foldernames. MR should simply ignore everything between the brackets (as with the series name).

Example: D:\series\\S01 (720p EN)\ D:\series\\S02 (EN)\ D:\series\\S03 (DE EN)\ D:\series\\S04 (720p DE EN)\

krog commented 14 years ago

I guess I understood your code here... finding the right season is done in:

file: \mediarover\utils\filesystem.py def __find_season_path(series, season):

now: line 225: "number = re.sub("[^\d]", "", dir2)" takes out everything, but numbers. so in my case the "720" will stay in "numer".

I changed it to: metadata_regex = re.compile("\s*(.+?)") dir2 = metadata_regex.sub("", dir) number = re.sub("[^\d]", "", dir2)

It's very ugly, but I hope it might save you some time searching for the right place. Working for me now.

kierse commented 14 years ago

Thanks for the help Krog. I've patched the necessary files and released the changes. Let me know if you run into any problems