-
Notifications
You must be signed in to change notification settings - Fork 176
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
Reversed filename, is this possible? #385
Comments
We already reverese the QoQ releases. and there is a reverse script (for TV shows) that can be used with NZBGet that can be found here https://github.com/Prinz23/nzbget-pp-reverse/blob/master/reverse_name.py That said, I'm keen to implement this, so can you give some examples of releases and the file names? Does your script only work with TV series, or will this also match movies that are reversed? |
i use that script also but i can't always use it. but groups that use the reverse names also use random letters/numbers for there nzb-name, so i requested at the guy who made the reverse name script if he also could rename the directory to the reverse name of the filename, going to ask on the videosort topic if they are willing to add the reverse name in there script. |
That script should also work for most Movies, since it looks for specific reversed patterns that are in most release names. |
Thanks @Prinz23 |
Hopefully this now identifies most reversed filenames. If running in NZBGet with Prinz23's reverse_name script I have checked and this shouldn't do anything (i.e it won't reverse again) |
My regex simply check for the reverse pattern of: .sxxexx. , .720p. , .1080p. , .1080i. , .bluray. , and so on.... If such a pattern in reverse is found the Name is reversed, it's very unlikely that a normal release has such a pattern in it. And if the reverse of .sxxexx. is found there is an additional function that removes on word letters within words, since QoQ has all words with starting capital letter and sometimes it puts points in the middle of the word to prevent autoindexing. |
so does this mean that i don't need to use @Prinz23 script anymore ? |
There was a typo in the last RegEx in my script. |
Okay just need to find a way to solve the random filename releases, |
I believe this is solved....
Let me know if it still causes issues, but essentially this looks for any (media) filename that is just letters/numbers without any spaces, unser-scores, hyphens, periods etc, then checks if any known regex matches for "meta" info (e.g. 720p 1080p bluray br-rip dvd-rip etc...) in the release name and the directory name. if it finds a valid release name it will replace the filename with that release name.... e.g Directory name: The.Big.Bang.Theory.S09E18.720p.WEB-DL.DD5.1.H.264-EC this will be renamed to The.Big.Bang.Theory.S09E18.720p.WEB-DL.DD5.1.H.264-EC/The.Big.Bang.Theory.S09E18.720p.WEB-DL.DD5.1.H.264-EC.mkv |
please let me know if this is not the case.... @Prinz23 please feel free to use this in your script... and test/improve my regex (only just started playing with this)... no doubt there is room for improvement... |
Oh cool I will disable videosort, |
Yes I'm just extending the regex list now, because it was not intended for Movie use, so it has many pattern missing for Movies. |
Cool... I'll watch your edits and add here too... Hope you don't mind me borrowing your code, but I don't like reinventing the wheel, and. SABnzbd doesn't allow for multiple scripts the same way NZBGet does. |
There a 2 pattern you can use for your media_list , but can't be used for the reverse detection because they are the exact reverse of each other. (They would reverse any file with divx or xvid in the name forth and back again every time - LOL ) r"\bdivx\b", r"\bxvid\b" |
thanks... added all those tags and 2 extras r".pal.", r".secam." (reverse = r".lap.", r".maces.") |
I didn't add .lap. since this is a english word and can be in titles. This would reverse Titles with this word in it. I also didn't add .mac. for that reason. |
Good catch...thanks. |
this is still on going. for example. The.Tomorrow.People.S01E09.Death's.Door.720p.WEB-DL.DD5.1.H.264-ECI-NZBgeek was downloaded with a resulting file name of 21a17666c57a4695bebe9c2a2c5d4c4f.mkv. no processing was done and therefore nothing was sent to NZBdrone to move or whatnot.
[10:45:17] [INFO]::MAIN: Checking database structure... |
Added/Changed a few more Regex's in my script and added a garbage filename renamer like here. |
@Prolesious |
the fact that the script gave the error you posted shows that the script identified that renaming was required... so hopefully this logging fix will resolve these issues now. please try again. |
You added a typo: r"\.[pi]p084\." should be: r"\.[pi]084\." |
thanks again. |
Hey Devs,
Some releasegroups "hide" the filename of a movie by reversing it without a repair par.
Is it possible after a failed idbm lookup to try to reverse the filename and do another lookup?
I am no dev and don't know how to implement it. But it would fix for me at least a lot of pp errors.
jimi
The text was updated successfully, but these errors were encountered: