Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
-
deaerator
- Posts: 12
- Joined: 30 Jun 2014, 00:30
Post
by deaerator » 02 Jul 2014, 00:17
Appreciate the help, finally got it solved. I had to change tv catagory destination directory to the non drone factory folder.
-
moddigi1
- Posts: 39
- Joined: 14 Apr 2013, 11:44
Post
by moddigi1 » 14 Jul 2014, 23:35
My popcorn box doesn't understand python2, so
doesn't work. If I change it to python it works,any idea why the change or how it can be permanently fixed?
Thanks!
-
moddigi1
- Posts: 39
- Joined: 14 Apr 2013, 11:44
Post
by moddigi1 » 15 Jul 2014, 23:54
Thank you clintonhall, it's working correctly now
-
TTT
- Posts: 9
- Joined: 08 Aug 2014, 18:16
Post
by TTT » 08 Aug 2014, 18:49
Clinton, I've been finding a few downloads failing to be renamed when the filenames are obfuscated. It seems to be due to the download name being space delimited, rather than . delimited. I've included an example below.
Download Name - Show Name S01E01 720p WEB-DL DD5 1 H 264-GROUP
Filename - E:\Downloads\Show Name S01E01 720p WEB-DL DD5 1 H 264-GROUP\shshh3hdhjdj37d3hhdhdh\shshh3hdhjdj37d3hhdhdh.mkv
Reason - Basename is no good (unless you go 2 levels back, but then you still have the ./space issue) and download name fails to be used as when it checks the regex patterns, it expects them to be .720p. etc, but the release name is space delimited rather than . delimited.
I've made a change locally to replace all spaces with .'s in the download name in the replace_filename function before doing the checks, which seems to resolve this. Any chance you can make the change in git?
Also is there any reason why you do the .lower() at line 139 in autoProcessTV.py "process_all_exceptions(inputName.lower(), dirName)". I've also taken that out so the renamed files contain the same case as the release name.
Thanks
TTT
-
clintonhall
- Posts: 449
- Joined: 15 Dec 2012, 01:52
- Location: Australia
-
Contact:
Post
by clintonhall » 08 Aug 2014, 22:57
Hi TTT,
Thanks for the detailed info.
Regarding the .lower. I believe this was done so that everything could be compared against simple (not case sensitive) regex. I'm not sure if it is still required, it may be there from previous checks etc... Are you saying this works for you without the .lower being passed?
Can you confirm what lines were changed to replace spaces with "."? I can certainly add this (or a variant) into the code.
-
TTT
- Posts: 9
- Joined: 08 Aug 2014, 18:16
Post
by TTT » 09 Aug 2014, 12:58
Thanks Clinton.
Yes I found the .lower() wasn't needed anymore as the regex checks were ignoring case anyway.
Had a look at the changes you made and while it will catch the invalid names, it will rename the files with the name prior to the replace. I.e. containing spaces instead of .s. Making the files not sort correctly.
Any chance you can add the replace on to the lines storing the selected name in to the newname as well?
i.e.
Code: Select all
newname = os.path.basename(dirname).replace(' ','.')
newname = name.replace(' ','.')
Cheers
TTT
-
clintonhall
- Posts: 449
- Joined: 15 Dec 2012, 01:52
- Location: Australia
-
Contact:
Post
by clintonhall » 09 Aug 2014, 21:31
Yeah, I had thought the issue was the spaces preventing the regex matches, so I just did the replace for those regex checks but assumed the spaces in the actual file name wouldn't be an issue.
What I might do is put in an option to replace spaces with '.'. This way people can set it if they want...
Is this just in the file name, or should we try to replace spaces in the directories? (Could be a big issue if the parent directories contain spaces.... Thinking specifically windows)
Who is online
Users browsing this forum: No registered users and 42 guests