DoctorD1501 / JAVMovieScraper

Scrape XBMC and Kodi movie metadeta and automatically rename files for Japanese Adult Videos (JAV), American Adult DVDs, and American Adult Webcontent
GNU General Public License v2.0
748 stars 162 forks source link

Folder and file renaming settings #305

Open cantelope opened 4 years ago

cantelope commented 4 years ago
  1. I have my unsorted files like this:
    /unsorted
    /ABC-123.mp4
    /DEF-123/file.mp4

    and I would preferably like them to be renamed as:

    /unsorted
    /(ABC-123) Title - Actors/ABC-123.mp4
    /(DEF-123) Title - Actors/file.mp4

    Can this be done when I select the file/folder directly under /unsorted to be scraped and renamed?

If I set

folder rename string: <BASEDIRECTORY><PATHSEPERATOR>(<ID>) <TITLE> - <ACTORS><PATHSEPERATOR>
file rename string: <ID>

then I get something like /(ABC-123) Title - Actors/ABC-123.mp4 but also get (DEF-123) Title - Actors/DEF-123/file.mp4

If I set

folder rename string: <BASEDIRECTORY><PATHSEPERATOR>(<ID>) <TITLE> - <ACTORS>
file rename string: 

then I get something like (DEF-123) Title - Actors/file.mp4 but also get (ABC-123) Title - Actors.mp4

  1. I notice that JAVMovieScraper tries to avoid strings that exceed maximum directory length. Can it also avoid/remap illegal characters in windows/file shares/samba? According to https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names, these are illegal chars:

    < (less than)
    > (greater than)
    : (colon - sometimes works, but is actually NTFS Alternate Data Streams)
    " (double quote)
    / (forward slash)
    \ (backslash)
    | (vertical bar or pipe)
    ? (question mark)
    * (asterisk)
  2. Can the cmdline -scrape option amulgamate the results of scraping the JAV Censored Group or American Adult DVD group, instead of specific websites, and subsequently to rename as per above?

cantelope commented 4 years ago

Regarding folders with illegal characters in them, I took a look at the function that sanitizes folder and filenames in src/main/java/moviescraper/doctord/controller/Renamer.java

It doesn't actually seem to be sanitizing folder names. I figure that the best place to sanitize them is within the replace function, by applying getSanitizedString to each of the metadata that we have pulled. But I can't figure out how to compile this and tell if it works. Submitted the dfif anyway, hopefully this is useful for you.

Renamer-diffs.txt