Tailslide 0 Posted December 21, 2021 Posted December 21, 2021 I find I'm having to do a lot of manually renaming files and folders to get emby to recognize them. For example this is not recognized: Movie.Name.1925 But this is recognized: Movie.Name.(1925) So I can save myself some grief by parsing and renaming automatically but just wondering if someone already has made a script for this?
rodainas 191 Posted December 22, 2021 Posted December 22, 2021 Programs like filebot or tiny media manager can help with this. 1
Tailslide 0 Posted December 22, 2021 Author Posted December 22, 2021 Hmm $40 USD seems like a lot to put parenthesis around the years on my files I might just roll my own thanks for the suggestion though I might still go that way eventually.
GrimReaper 4740 Posted December 22, 2021 Posted December 22, 2021 7 minutes ago, Tailslide said: $40 USD seems like a lot What's that 40?
Tailslide 0 Posted December 22, 2021 Author Posted December 22, 2021 Just now, GrimReaper said: What's that 40? Filebot is no longer free.. the original free open source version is kind of broken and the developer charges $40 for the (closed source) software now.
GrimReaper 4740 Posted December 22, 2021 Posted December 22, 2021 You can get a year for 6 bucks. And TMM v4 free tier will get you a powerful renamer also.
Spaceboy 2573 Posted December 22, 2021 Posted December 22, 2021 bulk rename utility would be able to do that simple task for you too. for free
rodainas 191 Posted December 22, 2021 Posted December 22, 2021 Tiny media manager 3 is free There is the free last version of filebot before going paid. Advanced remamer is free too
Tailslide 0 Posted December 22, 2021 Author Posted December 22, 2021 Thanks for all the suggestions.. I need something on an ongoing basis I can use in a shell script (not on windows) I'm attaching my quick and dirty python script in case anyone needs it #!/usr/bin/python import sys import re from datetime import datetime fname = sys.argv[1] tokens = re.split('(\W)', fname) newname="" parencount=0 for token in tokens: tokenoutput=False if token == '(': parencount += 1 if token == ')': parencount -= 1 if token.isnumeric() and int(token) > 1900 and int(token) <= (datetime.now().year+1): if parencount == 0: newname = newname + '(' + token + ')' tokenoutput=True if not tokenoutput: newname = newname + token print (newname)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now