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

DMM scraper cannot process DMM standard naming convention #339

Open redraiderj opened 3 years ago

redraiderj commented 3 years ago

DMM has its own naming convention for video files purchased and downloaded from their website. For example, instead of IPX-043, it could be ipx00043hhb or ipx00043mhb based on your bitrate selection.

Here is a list for filenames based on different bitrate: 300K: ipx00043sm 1000K: ipx00043dm 2000K: ipx00043mmb 3000K: ipx00043mhb 4000K: ipx00043hmb 6000K: ipx00043hhb

Also there are other video files which have prefix, for example h_286stm00030mhb, 1havd00779mhb, 60xv00675mhb and 53dv00959mhb. So I would suggest using regex to process them.

In DmmParsingProfile.createSearchString() function, you can add below code fragment before URLCodec codec = new URLCodec();

    Pattern patternID = Pattern.compile("(h?_?[0-9]*[a-z]+[0-9]+)");
    Matcher matcher = patternID.matcher(fileNameNoExtension);
    while (matcher.find()) {
        fileNameNoExtension = matcher.group(1);
    }

In Movie.scrapeMovie() function, when you construct string idFromMovieFileToMatch, you might need to replace the postfix I mentioned above, like sm, dm, mmb, mhb, hmb and hhb.