jkwill87 / mnamer

media file renaming and organizing tool
https://pypi.org/project/mnamer
MIT License
801 stars 67 forks source link

support for folders #28

Closed ssbarnea closed 5 years ago

ssbarnea commented 5 years ago

movies come wiht multiple auxiliary files like subtitles, artwork, nfo files.

jkwill87 commented 5 years ago

I appreciate the suggestion but this is currently outside the scope of this project.

robert-corlett commented 4 years ago

Yes it is possible, but you will lose anything specific in the file name that might be important - for example, "movie name.eng.sub" will become "movie name.sub".

In your .mnamer-v2.json file, update the mask section with the following, adding any other extensions that you might also want. Then ensure you are using the recurse (-r) option and all detected matching files in a folder should be processed and kept together in the new folder.

"mask": [
    ".avi",
    ".m4v",
    ".mp4",
    ".m4p",
    ".mkv",
    ".ts",
    ".wmv",
    ".mpeg",
    ".mpg",
    ".mov",
    ".qt",
    ".mts",
    ".m2ts",
    ".webm",
    ".flv",
    ".f4v",
    ".f4p",
    ".f4a",
    ".f4b",
    ".vob",
    ".gifv",
    ".yuv",
    ".3gp",
    ".3g2",
    ".ogg",
    ".ogv",
    ".oga",
    ".ogx",
    ".ogm",
    ".spx",
    ".opus",
    ".divx",
    ".gif",
    ".heif",
    ".heic",
    ".jpeg",
    ".jpg",
    ".png",
    ".bmp",
    ".webp",
    ".srt",
    ".sub",
    ".idx",
    ".iso"
]
jkwill87 commented 4 years ago

Yes it is possible, but you will lose anything specific in the file name that might be important - for example, "movie name.eng.sub" will become "movie name.sub".

In turn, this may also overwrite subtitle files if there are multiple, e.g. if using --batch without --no-overwrite.

I'm hesitant to suggest this approach because my overall goal with mnamer is that it might not always do the right thing, but at least it won't do the wrong thing. If you are use mnamer manually and are careful to skip ones that you aren't interested in this could be a valid workaround, so thank you for the suggestion!

I've come around to the idea of a proper implementation along with multi-language support but its more of a long-term goal at the moment.