mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 00:38:52 -05:00
* add file.dir.path rules to AMC to separate Movies/TV.Shows/Anime by folder names
This commit is contained in:
parent
d8751ea088
commit
beacccdeeb
@ -11,7 +11,7 @@ import java.util.regex.Pattern
|
||||
File.metaClass.getAt = { Range range -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(range).join(File.separator) }
|
||||
File.metaClass.getAt = { int index -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(index) }
|
||||
File.metaClass.getRoot = { listPath(delegate)[0] }
|
||||
File.metaClass.listPath = { listPath(delegate) }
|
||||
File.metaClass.listPath = { int tailSize = 100, boolean reversePath = false -> listPathTail(delegate, tailSize, reversePath) }
|
||||
File.metaClass.getDiskSpace = { listPath(delegate).reverse().find{ it.exists() }?.usableSpace ?: 0 }
|
||||
|
||||
|
||||
|
@ -572,6 +572,7 @@ DEFiNiTiON
|
||||
DEFUSED
|
||||
DEiTY
|
||||
DELiCiOUS
|
||||
DEMAND
|
||||
DEPRAViTY
|
||||
DEPRiVED
|
||||
dEr
|
||||
|
@ -50,19 +50,19 @@ def format = [
|
||||
|
||||
// force movie/series/anime logic
|
||||
def forceMovie(f) {
|
||||
tryQuietly{ ut_label } =~ /^(?i:Movie|Couch.Potato)/ || f.path =~ /(?<=tt)\\d{7}/ || tryQuietly{ f.metadata?.object?.class.name =~ /Movie/ }
|
||||
tryQuietly{ ut_label } =~ /^(?i:Movie|Couch.Potato)/ || f.dir.path =~ /(?i:Movies)/ || f.path =~ /(?<=tt)\\d{7}/ || tryQuietly{ f.metadata?.object?.class.name =~ /Movie/ }
|
||||
}
|
||||
|
||||
def forceSeries(f) {
|
||||
tryQuietly{ ut_label } =~ /^(?i:TV|Kids.Shows)/ || parseEpisodeNumber(f.path) || parseDate(f.path) || f.path =~ /(?i:Season)\D?[0-9]{1,2}\D/ || tryQuietly{ f.metadata?.object?.class.name =~ /Episode/ }
|
||||
tryQuietly{ ut_label } =~ /^(?i:TV|Kids.Shows)/ || f.dir.path =~ /(?i:TV.Shows)/ || parseEpisodeNumber(f.path) || parseDate(f.path) || f.path =~ /(?i:Season)\D?[0-9]{1,2}\D/ || tryQuietly{ f.metadata?.object?.class.name =~ /Episode/ }
|
||||
}
|
||||
|
||||
def forceAnime(f) {
|
||||
tryQuietly{ ut_label } =~ /^(?i:Anime)/ || (f.isVideo() && (f.name =~ "[\\(\\[]\\p{XDigit}{8}[\\]\\)]" || getMediaInfo(file:f, format:'''{media.AudioLanguageList} {media.TextCodecList}''').tokenize().containsAll(['Japanese', 'ASS'])))
|
||||
tryQuietly{ ut_label } =~ /^(?i:Anime)/ || f.dir.path =~ /(?i:Anime)/ || (f.isVideo() && (f.name =~ "[\\(\\[]\\p{XDigit}{8}[\\]\\)]" || getMediaInfo(file:f, format:'''{media.AudioLanguageList} {media.TextCodecList}''').tokenize().containsAll(['Japanese', 'ASS'])))
|
||||
}
|
||||
|
||||
def forceIgnore(f) {
|
||||
tryQuietly{ ut_label } =~ /^(?i:ebook|other|ignore)/ || f.path =~ tryQuietly{ ignore }
|
||||
tryQuietly{ ut_label } =~ /^(?i:ebook|other|ignore)/ || f.dir.path =~ /(?i:other)/ || f.path =~ tryQuietly{ ignore }
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user