Issue 77: Wrong renamed file
Status:  Accepted
Owner:
Project Member Reported by login...@gmail.com, Dec 22, 2012
Wrong renamed file inside a directory:
Renaming Twilight.2008.iTALiAN.DVDRip.XviD-Republic.CD1.avi to Twilight 2008 Republic Cd1.avi

It should be Twilight 2008 Cd1.avi

Dec 23, 2012
Project Member #1 addicted...@gmail.com
This is not a bug, it's a feature (I love that expression)
When there are multiple files in a directory, those files are not renamed. Renaming them would mess with part number, disc number or whatever naming schema the uploader used. Only the directory is renamed.
The only exception is series pack.
So far I've never come across any viable solution
Dec 23, 2012
Project Member #2 login...@gmail.com
Thanks, but the files were renamed! I'm confused...
The directory was Twilight.2008.iTALiAN.DVDRip.XviD-Republic
Dec 23, 2012
Project Member #3 addicted...@gmail.com
I'll need more info on this
Original name of the directory
Were these rar archives ? If so, what is the name of the files in the archive ?
If the files were not in an archive, what were the files names ?

The expected result is :
- Single file : file is renamed
- Multiple files : directory is renamed (created if necessary), files are untouched
- One movie file and a sample : sample is removed and movie is renamed
- TV series : always renamed, even in directory
Dec 23, 2012
Project Member #4 login...@gmail.com
Twilight.2008.iTALiAN.DVDRip.XviD-Republic/
    Subs/Twilight.2008.iTALiAN.DVDRip.XviD-Republic.CD1.idx
    Subs/Twilight.2008.iTALiAN.DVDRip.XviD-Republic.CD1.sub
    Subs/rpb-twlghtb.idx
    Subs/rpb-twlghtb.sub
  Twilight.2008.iTALiAN.DVDRip.XviD-Republic.CD1.avi
  Twilight.2008.iTALiAN.DVDRip.XviD-Republic.CD2.avi
Dec 23, 2012
Project Member #5 login...@gmail.com
This is original directory structure, there are not any archives
Dec 23, 2012
Project Member #6 addicted...@gmail.com
You're right, I forgot about something :

The expected result is :
- Single file : file is renamed
     -> quality/scene tag will be removed, all other info after these tags will be removed
- Multiple files : directory is renamed like a single file (created if necessary), files are renamed partially :
     -> quality/scene tag will be removed, all other info after these tags will be kept
- One movie file and a sample : sample is removed and movie is renamed :
    -> quality/scene tag will be removed, all other info after these tags will be removed
- TV series : always renamed, even in directory
    -> Series SxxExx

That way I could cleanup filenames without removing disc number.

I added republic to the list of scene patterns ; It will be available on my next commit.
By the way, you can add whatever pattern you like to your torrentexpander_settings.ini by editing user_defined_scene_patterns key.