Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. <?php
  2. class Config {
  3. // path to sickbeard db. it lives in sickbeard's root dir, wherever you installed sickbeard.
  4. public static $db = '/home/lachlan/.sickbeard/sickbeard.db';
  5.  
  6. /* where to put downloaded files.
  7. - set this the same as sickbeard's config->post-processing->tv download dir
  8. - untick keep original and move associated, tick rename and scan & process
  9. - ensure sickbeard user can write to the tv download dir and that this script
  10. is executed as the user sickbeard runs as
  11. - ideally should to be on same filesystem as sickbeard's main storage, if not then
  12. set $useWorkDir = true below.
  13. */
  14. public static $outDir = '/home/downloads/complete/tv';
  15.  
  16. // how 2 downloaded file??
  17. public static $indexURL = 'http://movingaway.lol-lol.org/tv/';
  18.  
  19. // whether or not to automatically update the script when an update is available
  20. public static $autoUpdate = true;
  21.  
  22. // download via RPC (aria2 running as daemon) - if this is set to true, $downloadCmd, $outDir etc are ignored.
  23. public static $downloadRPC = false;
  24. // if $downloadRPC is enabled, then specify these options too.
  25. public static $rpc = array(
  26. 'host' => 'localhost',
  27. 'port' => 6800,
  28. 'token' => '' // if you run aria2 with the --rpc-secret=blah option -- otherwise, leave empty
  29. );
  30.  
  31. /* if $downloadRPC == false, this is the program to call to do the download. specify the absolute path
  32. to ensure it'll work with cron.
  33. variables:
  34. - $OUTDIR will be substituted with the value of Config::$outDir
  35. - $URL (the url to download)
  36. - $LOGFILE (Config::$logFile)
  37. */
  38. public static $downloadCmd = '/usr/bin/aria2c --split 16 -j 16 -x 16 -l $LOGFILE -d $OUTDIR $URL';
  39. // optional log file ($LOGFILE above)
  40. public static $logFile = '/home/lachlan/.dickbeard/aria.log';
  41. // if log file reaches this size it is cleared
  42. public static $logMaxSize = 10000000; // in bytes - 10M
  43.  
  44. /* for shows with inconsistent titles between sickbeard and the download index, you can
  45. set up static matchers here. don't worry about order - the matchers work both ways.
  46. formatting doesn't matter too much either - for comparison purposes, dickbeard will convert
  47. titles to lower case and remove all punctuation, with the exception of ._- which are replaced with spaces.
  48. (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")
  49. */
  50. public static $matchers = array(
  51. 'Scandal (US)' => 'Scandal (2012)',
  52. 'Legit (US)' => 'Legit (2013)',
  53. 'Cosmos a spacetime odyssey' => 'Cosmos a space time odyssey',
  54. 'Revolution' => 'Revolution (2012)',
  55. 'Nashville' => 'Nashville (2012)',
  56. 'Chicago PD' => 'Chicago P.D.',
  57. 'Will and Grace' => 'Will & Grace',
  58. 'The Grand Tour' => 'The Grand Tour (2016)'
  59. );
  60.  
  61. /* if this is set to true, files are downloaded to a staging directory until completed, upon which they are moved to $outDir
  62. you only need this if outDir and sb's main storage dir (where it moves the episode to from its post-processing dir) are
  63. on separate filesystems.
  64. */
  65. public static $useWorkDir = true;
  66. // staging directory
  67. public static $workDir = '/home/lachlan/downloads';
  68. // whether or not to put a hardlink to the staging file in $outDir (requires $useWorkDir=true)
  69. public static $hardLink = false;
  70.  
  71. // increases verbosity. good to keep on while testing, but switch off for production.
  72. public static $debug = true;
  73.  
  74. // how 2 parsed filename? don't change this unless you know whats up.
  75. public static $filenameRegexes = array(
  76. '/^(.*?)\.[sS]([\d]+)[eE]([\d]+)/', // s01e10 or S01E10
  77. '/^(.*?)\.([\d]+)x([\d]+)/', // 1x10
  78. '/^(.*?)\.([\d]{1,2})([\d]{2})/' // 0110 or 110
  79. );
  80.  
  81. // where to stick our lock file (just prevents multiple instances of dickbeard from running simultaneously and downloading the same episodes)
  82. public static $lockfile = '/tmp/dickbeard.lock';
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement