Filebot Version: 4.7.8
Command used to call the script: filebot -script F:\Media\ProcessSeriesFolder.groovy "<Directory>"
Greetings,
I wanted to ask a quick question regarding the rename method. I have this pretty simple script that renames and copies series to an external drive and then fetches the subtitles, if any, from opensubtitles.
Since the last update I noticed the script stopped copying and started moving the files to the destination folder. Here is what the log reads
Code: Select all
Rename episodes using [TheTVDB]
Fetching episode data for [The Flash (2014)]
[MOVE] From [C:\Downloads\Completed\The.Flash.2014.S03E13.720p.HDTV.X264-DIMENSI
ON[rarbg]\The Flash (2014) - 3x13.mkv] to [F:\Media\Series\The Flash (2014)\Seas
on 3\The Flash (2014) - 3x13 - Attack on Gorilla City (1).mkv]
Processed 1 files
Code: Select all
rename (file:videos, action:'copy', output:destinationFolder, db:'TheTVDB', query:series, strict:false)
Code: Select all
args.eachMediaFolder{ dir ->
def mediaFolder = "F:\\Media\\Series"
def videos = dir.listFiles{ it.isVideo() }
def query = _args.query ?: detectSeriesName(videos)
def sxe = videos.findResult{ parseEpisodeNumber(it) }
if (query == null) {
query = dir.dir.hasFile{ it.name =~ /Season/ && it.isDirectory() } ? dir.dir.name : dir.name
}
println "$dir => Search by $query"
def options = TheTVDB.search(query, Locale.ENGLISH)
if (options.isEmpty()) {
println "TV Series not found: $query"
return
}
// sort by relevance
options = options.sortBySimilarity(query, { it.name })
// auto-select series
def series = options[0]
// auto-detect season
def season = sxe && sxe.season > 0 ? sxe.season : 1
def destinationFolder = "$mediaFolder\\$series\\Season $season"
rename (file:videos, action:'copy', output:destinationFolder, db:'TheTVDB', query:series, strict:false)
getSubtitles(folder:destinationFolder,db:'opensubtitles',query:'series',lang:'English')
}
Thanks!