Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Config {
- // path to sickbeard db. it lives in sickbeard's root dir, wherever you installed sickbeard.
- public static $db = '/home/lachlan/.sickbeard/sickbeard.db';
- /* where to put downloaded files.
- - set this the same as sickbeard's config->post-processing->tv download dir
- - untick keep original and move associated, tick rename and scan & process
- - ensure sickbeard user can write to the tv download dir and that this script
- is executed as the user sickbeard runs as
- - ideally should to be on same filesystem as sickbeard's main storage, if not then
- set $useWorkDir = true below.
- */
- public static $outDir = '/home/downloads/complete/tv';
- // how 2 downloaded file??
- public static $indexURL = 'http://movingaway.lol-lol.org/tv/';
- // whether or not to automatically update the script when an update is available
- public static $autoUpdate = true;
- // download via RPC (aria2 running as daemon) - if this is set to true, $downloadCmd, $outDir etc are ignored.
- public static $downloadRPC = false;
- // if $downloadRPC is enabled, then specify these options too.
- public static $rpc = array(
- 'host' => 'localhost',
- 'port' => 6800,
- 'token' => '' // if you run aria2 with the --rpc-secret=blah option -- otherwise, leave empty
- );
- /* if $downloadRPC == false, this is the program to call to do the download. specify the absolute path
- to ensure it'll work with cron.
- variables:
- - $OUTDIR will be substituted with the value of Config::$outDir
- - $URL (the url to download)
- - $LOGFILE (Config::$logFile)
- */
- public static $downloadCmd = '/usr/bin/aria2c --split 16 -j 16 -x 16 -l $LOGFILE -d $OUTDIR $URL';
- // optional log file ($LOGFILE above)
- public static $logFile = '/home/lachlan/.dickbeard/aria.log';
- // if log file reaches this size it is cleared
- public static $logMaxSize = 10000000; // in bytes - 10M
- /* for shows with inconsistent titles between sickbeard and the download index, you can
- set up static matchers here. don't worry about order - the matchers work both ways.
- formatting doesn't matter too much either - for comparison purposes, dickbeard will convert
- titles to lower case and remove all punctuation, with the exception of ._- which are replaced with spaces.
- (e.g. "Scandal (2012)" becomes "scandal 2012", "Marvels.Agents.of.S.H.I.E.L.D" becomes "marvels agents of s h i e l d")
- */
- public static $matchers = array(
- 'Scandal (US)' => 'Scandal (2012)',
- 'Legit (US)' => 'Legit (2013)',
- 'Cosmos a spacetime odyssey' => 'Cosmos a space time odyssey',
- 'Revolution' => 'Revolution (2012)',
- 'Nashville' => 'Nashville (2012)',
- 'Chicago PD' => 'Chicago P.D.',
- 'Will and Grace' => 'Will & Grace',
- 'The Grand Tour' => 'The Grand Tour (2016)'
- );
- /* if this is set to true, files are downloaded to a staging directory until completed, upon which they are moved to $outDir
- you only need this if outDir and sb's main storage dir (where it moves the episode to from its post-processing dir) are
- on separate filesystems.
- */
- public static $useWorkDir = true;
- // staging directory
- public static $workDir = '/home/lachlan/downloads';
- // whether or not to put a hardlink to the staging file in $outDir (requires $useWorkDir=true)
- public static $hardLink = false;
- // increases verbosity. good to keep on while testing, but switch off for production.
- public static $debug = true;
- // how 2 parsed filename? don't change this unless you know whats up.
- public static $filenameRegexes = array(
- '/^(.*?)\.[sS]([\d]+)[eE]([\d]+)/', // s01e10 or S01E10
- '/^(.*?)\.([\d]+)x([\d]+)/', // 1x10
- '/^(.*?)\.([\d]{1,2})([\d]{2})/' // 0110 or 110
- );
- // where to stick our lock file (just prevents multiple instances of dickbeard from running simultaneously and downloading the same episodes)
- public static $lockfile = '/tmp/dickbeard.lock';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement