Page 1 of 1

[Enhancement] AMC script movie vs tv forcing through path name

Posted: 25 Dec 2016, 00:41
by SAKUJ0
Sup

Code: Select all

def forceMovie(f) {
	label =~ /^(?i:Movie|Film|Concert|UFC)/ || f.dir.listPath().any{ it.name ==~ /(?i:Movies)/ } || f.isMovie()
}

def forceSeries(f) {
	label =~ /^(?i:TV|Show|Series|Documentary)/ || f.dir.listPath().any{ it.name ==~ /(?i:TV.Shows)/ } || f.path =~ /(?<=\b|_)(?i:tv[sp]-|Season\D?\d{1,2}|\d{4}.S\d{2})(?=\b|_)/ || parseEpisodeNumber(f.path, true) || parseDate(f.path)
}
I ask that you make at the very least the folder name check for movies case-insensitive. If any directory in the download-directory's path is named exactly "movies" or "movie", then it is very obvious it must indeed be a movie. The TV check seems sophisticated enough (I don't know groovy and I figured I don't try to go through the entire line).

Ideally, you could make the tv forcing more sophisticated, too. It will not recognize having a directory named "tv" in its path.

If one of the directories in the path list is indeed "movie", "tv" or "movies" and not "atvlover38" or "movieatrix", then we know for a fact that we are matching a tv show (or a movie). There is no point catering to people that would put their tv show downloads under D:\Downloads\movies\Hahanotmovies.

With all that in mind, I think it would be a strict enhancement if that line were to be changed into detecting whether the download path contains a directory named exactly "movie", "movies" or "tv".

It's not a personal issue, as the script can easily be forked and customized. It just seemed weird that we would perform a case-senstivie check for "Movies" when checking for "movies" seems to be superior in every way.


Cheers!

Re: [Enhancement] AMC script movie vs tv forcing through path name

Posted: 25 Dec 2016, 04:12
by rednoah
Most of what you're asking for is already there. It does check for certain parent folder names and everything is case-insensitiv.

Just the "Movie" and "TV" folders need to be named according to Plex standards instead. Otherwise auto-detection will kick in to sort out what's what.