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

Config file not loaded #55

Closed
SweetthD3ViL opened this issue Feb 14, 2020 · 4 comments
Closed

Config file not loaded #55

SweetthD3ViL opened this issue Feb 14, 2020 · 4 comments

Comments

@SweetthD3ViL
Copy link

Right, installed mnamer on my NAS running Archlinux ARM using pip3 command.

Dump the config file and made the necessary changes and saved it as ~/.mnamer-V2.json (see config file below)

When I run the command line, all show are detected, renamed (not as setup on the config file) and also not moved as the config file.

python -m mnamer -bv /mnt/hd/Download/

p.s. I had to install it using sudo pip3 install mnamer as it was complaining of some right issue.

{ "api_key_omdb": null, "api_key_tmdb": null, "api_key_tvdb": null, "api_key_tvmaze": null, "batch": false, "episode_api": "tvmaze", "episode_directory": "/mnt/hd/Show/{series}", "episode_format": "{series} - {season:02}x{episode:02} - {title}{extension}", "hits": 5, "ignore": [ ".*sample.*", "^RARBG.*" ], "lower": false, "mask": [ ".avi", ".m4v", ".mp4", ".mkv", ".ts", ".wmv" ], "movie_api": "tmdb", "movie_directory": "/mnt/hd/Movie/{name} ({year})", "movie_format": "{name} ({year}){extension}", "no_cache": false, "no_guess": false, "no_replace": false, "no_style": false, "recurse": false, "replacements": { "&": "and", ":": "", ";": ",", "@": "at" }, "scene": false, "verbose": false }

@jkwill87
Copy link
Owner

Hey, thanks for trying out mnamer. The first thing I would want to confirm is that the v in ~/.mnamer-V2.json is lowercase, e.g. ~/.mnamer-v2.json. If not that could be your problem.

As far as the installation permission issue is concerned thats probably you're using system Python, the one installed with Arch. Installing mnamer as root isn't usually recommended. It can conflict with other Python packages installed by pacman.

There's a couple of ways to install mnamer without root-level permissions. The easiest is pip install mnamer -U --user. Another alternative that I would recommend is pipx.

Anyway, let me know if that works for you.

@SweetthD3ViL
Copy link
Author

SweetthD3ViL commented Feb 14, 2020

Perfect! renaming the config worked. Thank you for your prompt reply and excellent work.

Excellent, now another question.

How to deal with accent in file name? Is it possible to remove them automatically? i.e. â to be a, é to be e.
And also to remove any !,? etc that stop filename to be readable?

Just had a look at the config file after a show was rename and move missing the & by an extra space. & doesn't stop the filename to be readable on linux, however looking at the config file it is supposed to be replaced by and - and that did not work?

@jkwill87
Copy link
Owner

Yep, it looks like this is an actual bug with the replacements setting. I'll look into getting that sorted, thanks!

@jkwill87
Copy link
Owner

jkwill87 commented Feb 24, 2020

The & being replaced with two spaces bug should be fixed in the next release.

As for your other questions--

  • Regarding accents, mnamer currently has no way to remove diacritical marks. This might be something that is added in the future. You could get this to work by manually in the meantime by specifying these transformations using the replace_after configuration but this would probably be tedious.
  • Regarding ! and ? characters. Question marks, as with other troublesome characters (e.g. <>:"|?*&%=+@#`^ are currently being stripped. Exclamation points should be readable by all modern operating systems. Either way, now that replacements are working using replace_after you could likewise strip it by adding `"!": "".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants