Watcher help please

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
spacedog
Posts: 7
Joined: 04 Jan 2015, 17:49

Watcher help please

Post by spacedog »

Good afternoon!
I just got my first seedbox. I've always used utorrent locally before that, and had it run the following code which worked PERFECTLY after downloads completed:

filebot -script fn:amc --output "d:\output" --log-file amc.log --action copy --conflict override -non-strict --def "seriesFormat=d:\tv shows\{n}\Season {s.pad(2)}\{n} - {s00e00} - {t}" "movieFormat=C:/Movies/{n} {y}/{fn}" music=y subtitles=en artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"

But now that I am ftp'ing from my seedbox to a local folder, I am having the hardest time getting the same functionality without using utorrent! I have been trying for hours to set up a way for filebot to automatically monitor my local folder and organize my newly downloaded tvshows and movies the exact same way utorrent used to do it.

I've searched the forums and can't find anything, so I'm sorry if the answer is out there plain as day, but I just can't find it. Can anyone help?
Thanks!
User avatar
rednoah
The Source
Posts: 23066
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Watcher help please

Post by rednoah »

There's many many ways to achieve monitoring. If you're using the amc script it's best to just repeatedly run it on the same folder repeatedly (with excludeList set!!!) or only for newly added files (the exact monitoring solution is up to you).

Though if you're running a server with rTorrent you're probably looking for this:
viewtopic.php?f=4&t=215#p5316
:idea: Please read the FAQ and How to Request Help.
spacedog
Posts: 7
Joined: 04 Jan 2015, 17:49

Re: Watcher help please

Post by spacedog »

Thanks Rednoah. I appreciate the help, but the amc script is kinda confusing for someone like me with limited scripting knowledge. Is there a tutorial out there or a document that shows which variables need to be changed to get it to work on my machine?
spacedog
Posts: 7
Joined: 04 Jan 2015, 17:49

Re: Watcher help please

Post by spacedog »

Or better still, is there a way to turn the utorrent command into a batch file for a local folder instead of utorrent?
User avatar
rednoah
The Source
Posts: 23066
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Watcher help please

Post by rednoah »

That use-case is well documented in the Run from cmdline section and by generally reading and understanding the docs.

It's quite easy if you have a basic understanding of cmd and how cmdline tools work. I'm sure you'll figure it out if play with it a little while.

And make absolutely sure you don't always reprocess everything if you call it repeatedly on the same folder.
:idea: Please read the FAQ and How to Request Help.
spacedog
Posts: 7
Joined: 04 Jan 2015, 17:49

Re: Watcher help please

Post by spacedog »

Thanks, I'll keep trying :)
spacedog
Posts: 7
Joined: 04 Jan 2015, 17:49

Re: Watcher help please

Post by spacedog »

OK I got it working, but it will ONLY move the formatted files to one directory. I need to set it up so that it sends movies to C:/movies and TV Shows to d:/tvshows. Two different drives. Can someone tell me where to put this argument in? I can't for the life of me find a place to put separate output directories for movies and tv shows.
User avatar
rednoah
The Source
Posts: 23066
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Watcher help please

Post by rednoah »

Change how files will be organized and renamed:
Relative paths will be resolved against --output and you can use absolute paths if you want to use multiple drives.
@see viewtopic.php?f=4&t=215
:idea: Please read the FAQ and How to Request Help.
spacedog
Posts: 7
Joined: 04 Jan 2015, 17:49

Re: Watcher help please

Post by spacedog »

It Just Ignores my drive and puts the renamed file in the source folder. See below:

// filebot -script "fn:amc" --action copy --conflict override


// log input parameters
_def.each{ n, v -> log.finer('Parameter: ' + [n, n =~ /pushover|pushbullet|mail|myepisodes/ ? '*****' : v].join(' = ')) }
args.each{ log.finer("Argument: $it") }


// initialize variables
def input = []
def failOnError = (_args.conflict == 'fail')

// enable/disable features as specified via --def parameters
def unsorted = tryQuietly{ unsorted.toBoolean() }
def music = tryQuietly{ music.toBoolean() }
def subtitles = tryQuietly{ subtitles.split(/\W+/) as List }
def artwork = tryQuietly{ artwork.toBoolean() && !'TEST'.equalsIgnoreCase(_args.action) }
def extras = tryQuietly{ extras.toBoolean() }
def clean = tryQuietly{ clean.toBoolean() }
def exec = tryQuietly{ exec.toString() }

// array of xbmc/plex hosts
def xbmc = tryQuietly{ xbmc.split(/[ ,|]+/) }
def plex = tryQuietly{ plex.split(/[ ,|]+/)*.split(/:/).collect{ it.length >= 2 ? [host:it[0], token:it[1]] : [host:it[0]] } }

// extra options, myepisodes updates and email notifications
def storeReport = tryQuietly{ storeReport.toBoolean() }
def skipExtract = tryQuietly{ skipExtract.toBoolean() }
def deleteAfterExtract = tryQuietly{ deleteAfterExtract.toBoolean() }
def excludeList = tryQuietly{ (excludeList as File).isAbsolute() ? (excludeList as File) : new File(_args.output ?: '.', excludeList).getCanonicalFile() }
def myepisodes = tryQuietly{ myepisodes.split(':', 2) }
def gmail = tryQuietly{ gmail.split(':', 2) }
def mail = tryQuietly{ mail.split(':', 3) }
def pushover = tryQuietly{ pushover.toString() }
def pushbullet = tryQuietly{ pushbullet.toString() }
def reportError = tryQuietly{ reportError.toBoolean() }

// user-defined filters
def label = tryQuietly{ ut_label } ?: null
def ignore = tryQuietly{ ignore } ?: null
def minFileSize = tryQuietly{ minFileSize.toLong() }; if (minFileSize == null) { minFileSize = 50 * 1000L * 1000L }
def minLengthMS = tryQuietly{ minLengthMS.toLong() }; if (minLengthMS == null) { minLengthMS = 10 * 60 * 1000L }

// series/anime/movie format expressions
def "seriesFormat=D:/TV Shows/{n}/{'S'+s}/{fn}" "animeFormat=X:/Anime/{n}/{fn}" "movieFormat=C:/Movies/{n} {y}/{fn}" "musicFormat=Z:/Music/{n}/{fn}"


// force movie/series/anime logic
def forceMovie = { f ->
label =~ /^(?i:Movie|Couch.Potato)/ || f.dir.listPath().any{ it.name ==~ /(?i:Movies)/ } || f.path =~ /(?<=tt)\\d{7}/
}

def forceSeries = { f ->
label =~ /^(?i:TV|Kids.Shows)/ || f.dir.listPath().any{ it.name ==~ /(?i:TV.Shows)/ } || parseEpisodeNumber(f.path) || parseDate(f.path) || f.path =~ /(?i:tvs-|tvp-|EP[0-9]{2,3}|Season\D?[0-9]{1,2}\D|(19|20)\d{2}.S\d{2})/
}

def forceAnime = { f ->
label =~ /^(?i:Anime)/ || f.dir.listPath().any{ it.name ==~ /(?i:Anime)/ } || (f.isVideo() && (f.name =~ /(?i:HorribleSubs)/ || f.name =~ "[\\(\\[]\\p{XDigit}{8}[\\]\\)]" || (getMediaInfo(file:f, format:'''{media.AudioLanguageList} {media.TextCodecList}''').tokenize().containsAll(['Japanese', 'ASS']) && (parseEpisodeNumber(f.name, false) != null || getMediaInfo(file:f, format:'{minutes}').toInteger() < 60))))
}

def forceAudio = { f ->
label =~ /^(?i:audio|music|music.video)/ || (f.isAudio() && !f.isVideo())
}

def forceIgnore = { f ->
label =~ /^(?i:games|ebook|other|ignore|seeding)/ || f.path.findMatch(ignore) != null
}

--def "seriesFormat=D:/TV Shows/{n}/{'S'+s}/{fn}" "animeFormat=X:/Anime/{n}/{fn}" "movieFormat=C:/Movies/{n} {y}/{fn}" "musicFormat=Z:/Music/{n}/{fn}"

// include artwork/nfo, pushover/pushbullet and ant utilities as required
if (artwork || xbmc || plex) { include('lib/htpc') }
if (pushover || pushbullet ) { include('lib/web') }
if (gmail || mail) { include('lib/ant') }
User avatar
rednoah
The Source
Posts: 23066
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Watcher help please

Post by rednoah »

I have no idea what you're doing. Did you just copy & paste a few cmdline arguments into a copy of the amc script????

You cannot edit the amc script. The manual clearly shows you how you can add additional arguments to the amc script cmdline call to override the default format expression with your own absolute path.

I recommend that you use the GUI. If you want to use the CLI you will need to learn a few basics first. ;)
:idea: Please read the FAQ and How to Request Help.
spacedog
Posts: 7
Joined: 04 Jan 2015, 17:49

Re: Watcher help please

Post by spacedog »

OK. I started over and everything is fine. I have been unable to find this "manual" you've been speaking of. Thanks for your help. Its a great piece of software!
User avatar
rednoah
The Source
Posts: 23066
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Watcher help please

Post by rednoah »

The manual / tutorial / guide / documentation should be all you need:
viewtopic.php?f=4&t=215
:idea: Please read the FAQ and How to Request Help.
Post Reply