-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.html
1380 lines (1304 loc) · 68.2 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style>
html,body{color:black}*{margin:0;padding:0}body{font:13.34px helvetica,arial,freesans,clean,sans-serif;-webkit-font-smoothing:subpixel-antialiased;line-height:1.4;padding:3px;background:#fff;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}p{margin:1em 0}a{color:#4183c4;text-decoration:none}#wgfmrapper{background-color:#fff;padding:30px;font-size:14px;line-height:1.6;width:900px;margin:15px auto;}@media screen{#wrapper{box-shadow:0 0 0 1px #cacaca,0 0 0 4px #eee}}#wrapper>*:first-child{margin-top:0!important}#wrapper>*:last-child{margin-bottom:0!important}h1,h2,h3,h4,h5,h6{margin:20px 0 10px;padding:0;font-weight:bold;-webkit-font-smoothing:subpixel-antialiased;cursor:text}h1{font-size:28px;color:#000}h2{font-size:24px;border-bottom:1px solid #ccc;color:#000}h3{font-size:18px;color:#333}h4{font-size:16px;color:#333}h5{font-size:14px;color:#333}h6{color:#777;font-size:14px}p,blockquote,ul,ol,dl,table,pre{margin:15px 0}ul,ol{padding-left:30px}hr{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;border:0 none;color:#ccc;height:4px;padding:0}#wrapper>h2:first-child,#wrapper>h1:first-child,#wrapper>h1:first-child+h2,#wrapper>h3:first-child,#wrapper>h4:first-child,#wrapper>h5:first-child,#wrapper>h6:first-child{margin-top:0;padding-top:0}a:first-child h1,a:first-child h2,a:first-child h3,a:first-child h4,a:first-child h5,a:first-child h6{margin-top:0;padding-top:0}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p{margin-top:0}ul li>:first-child,ol li>:first-child{margin-top:0}dl{padding:0}dl dt{font-size:14px;font-weight:bold;font-style:italic;padding:0;margin:15px 0 5px}dl dt:first-child{padding:0}dl dt>:first-child{margin-top:0}dl dt>:last-child{margin-bottom:0}dl dd{margin:0 0 15px;padding:0 15px}dl dd>:first-child{margin-top:0}dl dd>:last-child{margin-bottom:0}blockquote{border-left:4px solid #DDD;padding:0 15px;color:#777}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}table{border-collapse:collapse;border-spacing:0;font-size:100%;font:inherit}table th{font-weight:bold}table th,table td{border:1px solid #ccc;padding:6px 13px}table tr{border-top:1px solid #ccc;background-color:#fff}table tr:nth-child(2n){background-color:#f8f8f8}img{max-width:100%}code,tt{margin:0 2px;padding:0 5px;white-space:nowrap;border:1px solid #eaeaea;background-color:#f8f8f8;border-radius:3px}pre>code{margin:0;padding:0;white-space:pre;border:0;background:transparent}.highlight pre,pre{background-color:#f8f8f8;border:1px solid #ccc;font-size:13px;line-height:19px;overflow:auto;padding:6px 10px;border-radius:3px}pre code,pre tt{background-color:transparent;border:0}.poetry pre{font-family:Georgia,Garamond,serif!important;font-style:italic;font-size:110%!important;line-height:1.6em;display:block;margin-left:1em}.poetry pre code{font-family:Georgia,Garamond,serif!important;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;white-space:pre-wrap}sup,sub,a.footnote{font-size:1.4ex;height:0;line-height:1;vertical-align:super;position:relative}sub{vertical-align:sub;top:-1px}@media print{body{background:#fff}img,pre,blockquote,table,figure{page-break-inside:avoid}#wrapper{background:#fff;border:0}code{background-color:#fff;color:#444!important;padding:0 .2em;border:1px solid #dedede}pre code{background-color:#fff!important;overflow:visible}pre{background:#fff}}@media screen{body.inverted,.inverted #wrapper,.inverted hr .inverted p,.inverted td,.inverted li,.inverted h1,.inverted h2,.inverted h3,.inverted h4,.inverted h5,.inverted h6,.inverted th,.inverted .math,.inverted caption,.inverted dd,.inverted dt,.inverted blockquote{color:#eee!important;border-color:#555}.inverted td,.inverted th{background:#333}.inverted pre,.inverted code,.inverted tt{background:#444!important}.inverted h2{border-color:#555}.inverted hr{border-color:#777;border-width:1px!important}::selection{background:rgba(157,193,200,.5)}h1::selection{background-color:rgba(45,156,208,.3)}h2::selection{background-color:rgba(90,182,224,.3)}h3::selection,h4::selection,h5::selection,h6::selection,li::selection,ol::selection{background-color:rgba(133,201,232,.3)}code::selection{background-color:rgba(0,0,0,.7);color:#eee}code span::selection{background-color:rgba(0,0,0,.7)!important;color:#eee!important}a::selection{background-color:rgba(255,230,102,.2)}.inverted a::selection{background-color:rgba(255,230,102,.6)}td::selection,th::selection,caption::selection{background-color:rgba(180,237,95,.5)}.inverted{background:#0b2531}.inverted #wrapper,.inverted{background:rgba(37,42,42,1)}.inverted a{color:rgba(172,209,213,1)}}.highlight .c{color:#998;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{font-weight:bold}.highlight .o{font-weight:bold}.highlight .cm{color:#998;font-style:italic}.highlight .cp{color:#999;font-weight:bold}.highlight .c1{color:#998;font-style:italic}.highlight .cs{color:#999;font-weight:bold;font-style:italic}.highlight .gd{color:#000;background-color:#fdd}.highlight .gd .x{color:#000;background-color:#faa}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#999}.highlight .gi{color:#000;background-color:#dfd}.highlight .gi .x{color:#000;background-color:#afa}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:bold}.highlight .gu{color:#800080;font-weight:bold}.highlight .gt{color:#a00}.highlight .kc{font-weight:bold}.highlight .kd{font-weight:bold}.highlight .kn{font-weight:bold}.highlight .kp{font-weight:bold}.highlight .kr{font-weight:bold}.highlight .kt{color:#458;font-weight:bold}.highlight .m{color:#099}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .nb{color:#0086b3}.highlight .nc{color:#458;font-weight:bold}.highlight .no{color:#008080}.highlight .ni{color:#800080}.highlight .ne{color:#900;font-weight:bold}.highlight .nf{color:#900;font-weight:bold}.highlight .nn{color:#555}.highlight .nt{color:#000080}.highlight .nv{color:#008080}.highlight .ow{font-weight:bold}.highlight .w{color:#bbb}.highlight .mf{color:#099}.highlight .mh{color:#099}.highlight .mi{color:#099}.highlight .mo{color:#099}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .bp{color:#999}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .il{color:#099}.highlight .gc{color:#999;background-color:#eaf2f5}.type-csharp .highlight .k{color:#00F}.type-csharp .highlight .kt{color:#00F}.type-csharp .highlight .nf{color:#000;font-weight:normal}.type-csharp .highlight .nc{color:#2b91af}.type-csharp .highlight .nn{color:#000}.type-csharp .highlight .s{color:#a31515}.type-csharp .highlight .sc{color:#a31515}
</style>
</head>
<body>
<div id="wrapper">
<h1>
<a id="user-content-tget-573---torrent-get" class="anchor" href="#tget-573---torrent-get" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>tget 5.7.3 - torrent get</h1>
<p><em>tget</em> is a suite of programs: <em>tget</em> and <em>plexfix</em>.</p>
<p><em>tget</em> grew out of my dissatisfaction with <a href="http://flexget.com/" title="FlexGet" rel="nofollow">FlexGet</a>'s behavior and
configuration. Don't get me wrong, <a href="http://flexget.com/" title="FlexGet" rel="nofollow">FlexGet</a> is an amazing program in
its own right, but there were some things I couldn't get it to do.
And configuration is clumsy, at best. Coming from the Lisp world,
YAML just sucks. Go ahead and compare <em>tget</em>'s example configuration
file to that of <a href="http://flexget.com/" title="FlexGet" rel="nofollow">FlexGet</a>. The power and flexibility of Lisp make the
comparison a shutout. Of course, that assumes <em>tget</em> does what you want
it to do.</p>
<p>The main limitation I wanted to overcome by writing <em>tget</em>, though, was
to set the download quality based on time: wait 6 hours (from
publication date), then download the x264 SD version, but if after 12
hours after that a version isn't available, then download the x264
720p version, and if either of those aren't available for 2 days then
download the XviD SD version. The latter is really my last choice,
because the quality can be pretty crappy. What I just described is
not possible in <a href="http://flexget.com/" title="FlexGet" rel="nofollow">FlexGet</a>. <em>tget</em> makes this pretty easy.</p>
<p><em>tget</em> isn't nearly as functional as <a href="http://flexget.com/" title="FlexGet" rel="nofollow">FlexGet</a>, though, and the feed
parsing only works (currently) with two sites (TvT and BTN).
I'm always looking to add more.</p>
<p><em>plexfix</em> works around deficiencies in Plex, which doesn't recognize
certain filename formats. For example, <code>Foo-612.mp4</code> would not be
recognized by Plex, perhaps because the naming convention is
ambiguous--is it season 6 and espisode 12 or the June 12th episode of
<em>Foo</em>? Plex punts of filenames like this. <em>plexfix</em> creates symbolic
links so that Plex can see the correct season and episode.</p>
<h3>
<a id="user-content-table-of-contents" class="anchor" href="#table-of-contents" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Table of Contents</h3>
<p><strong><a href="#how-it-works">How it works</a></strong><br>
<strong><a href="#installation">Installation</a></strong><br>
<strong><a href="#getting-started">Getting started</a></strong><br>
<strong><a href="#configuration">Configuration</a></strong><br>
<strong><a href="#maintenance-tasks">Maintenance tasks</a></strong><br>
<strong><a href="#cleanup">Cleanup</a></strong><br>
<strong><a href="#plexfix">plexfix</a></strong><br>
<strong><a href="#usage">Usage</a></strong><br>
<strong><a href="#example-configuration-file">Example configuration file</a></strong></p>
<h2>
<a id="user-content-how-it-works" class="anchor" href="#how-it-works" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>How it works</h2>
<p><em>tget</em> has these basic phases:</p>
<ul>
<li>
<p>parsing the configuration file,</p>
</li>
<li>
<p>fetching the RSS feeds defined by the configuration file, and</p>
</li>
<li>
<p>downloading torrent files for episodes never seen before, which meet
the criteria defined by the configuration file.</p>
</li>
</ul>
<p>To accomplish the above, <em>tget</em> maintains a database of series and
episodes, with various data about them.</p>
<p>Here are some details about the above phases:</p>
<ul>
<li>
<p>The configuration file defines which series to monitor. When the
configuration file is read, entries are created in the database for
each series. You can examine this stored information with command
line arguments to <em>tget</em>.</p>
</li>
<li>
<p>When an RSS feed is fetched, any episodes related to series defined
by the configuration file, and thus in the database, are stored in
the database, but marked as <em>not downloaded</em>.</p>
</li>
<li>
<p>Each series in the database has a <code>complete-to</code> slot. This tells
<em>tget</em> what episode number the series is completed to, and <em>tget</em> will
never download anything at or before this episode.</p>
<p>Say you've downloaded all the episodes of <em>Breaking Bad</em> up to
S05E08. Any episodes which appear in the RSS feed at or before this
episode will be ignored and never downloaded.</p>
<p>There are command line arguments, which start with <code>--catch-up</code>,
which can be used to manipulate the <code>complete-to</code> slot of a series.</p>
</li>
<li>
<p>Episodes are sometimes downloaded out of order. You will not miss
an episode of a series if it appears in the RSS feed out of order.</p>
<p>Say the <code>complete-to</code> for a series is S05E08, and episode S05E10
appears on one invocation of <em>tget</em> and S05E09 appears in a later
invocation. Both episodes will be downloaded and the <code>complete-to</code>
will not be updated to S05E10 until after episode S05E09 is
downloaded.</p>
</li>
<li>
<p>When the torrent file is downloaded, the resulting file can be given
to <em>transmission-remote</em> for processing (<em>transmission-remote</em> is a
command line tool used to control <a href="http://www.transmissionbt.com/" title="Transmission" rel="nofollow">Transmission</a>, the
cross-platform BitTorrent client) or put in a specific directory
watched by your BitTorrent client. See the example configuration
file for information on how to use either of these methods.</p>
</li>
</ul>
<h2>
<a id="user-content-installation" class="anchor" href="#installation" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Installation</h2>
<p><em>tget</em> has been tested on Linux and Mac OS X and depends on two other
software packages:</p>
<p><em>transmission-remote</em> -- [OPTIONAL] a program that can communicate to a local or
remote instance of Transmission. <em>tget</em> uses it to download the actual
episodes . I run <a href="http://www.transmissionbt.com/" title="Transmission" rel="nofollow">Transmission</a> on Mac OS X, on the same local
area network. <em>transmission-remote</em> makes this easy. On CentOS and
Fedora, install the <code>transmission-common</code> rpm. On a Mac, I suggest
looking to <a href="http://www.macports.org/" title="MacPorts" rel="nofollow">MacPorts</a>.</p>
<p><em>Allegro Common Lisp</em> -- For now, at least, no binary packages of <em>tget</em>
are available and you need Allegro Common Lisp to build it.</p>
<p>After cloning the repo, build <em>tget</em>:</p>
<pre><code>$ make
</code></pre>
<p>That should produce a directory <code>tget/</code>, which can be installed with:</p>
<pre><code>$ make install
</code></pre>
<p>You can make a <code>Makefile.local</code> to override features of the GNU Make
file.</p>
<h2>
<a id="user-content-getting-started" class="anchor" href="#getting-started" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Getting started</h2>
<p>After installing the software, the next thing you need is a
configuration file. See the next section for information on
configuration, and the section at the end for an example configuration
file, which you can edit for your needs.</p>
<p>The database used by <em>tget</em> is stored in <code>$HOME/.tget.d</code>. You can
change this location with the <code>--root</code> command line argument.</p>
<p>Next, you probably want to create a new database which has everything
you care about marked as <em>already downloaded</em>. The following command
will start from scratch and, assuming the RSS feed you are using
supports it, mark 6 months of episodes as already downloaded:</p>
<pre><code>$ tget --reset --learn --feed-interval 180
</code></pre>
<p>Next, you'll want to set up <em>cron</em> to periodically run <em>tget</em>, perhaps
every day at 3AM:</p>
<pre><code>0 3 * * * source $HOME/.bashrc; MAILTO=username@domain /usr/local/bin/tget --cron
</code></pre>
<p>Running more often is fine, but you need to be careful not to run
afoul of the site rules for how often you can download their RSS feed.
You can use the <code>MAILTO</code> environment variable to change the user that
receives the output of <em>tget</em>. <code>$HOME/.bashrc</code> is sourced to pick up
some environment variables used by the example configuration file.
You can omit this part if you do not need any environment variables.</p>
<h2>
<a id="user-content-configuration" class="anchor" href="#configuration" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Configuration</h2>
<p>At the highest level, the configuration file defines these entities:</p>
<ul>
<li>
<p><em>transmission-remote settings</em> - in the config example below I pull
items from the environment, mainly because I don't want to share
that private information in this documentation. You can store yours
in the configuration file directly.</p>
</li>
<li>
<p><em>RSS feeds</em> - this is where <em>tget</em> gets the information on what is
available to download. Each feed is site specific and possibly user
specific.</p>
</li>
<li>
<p><em>quality settings</em> - these define the quality of the files you want
to download. It's a very important aspect of the configuration, as
it will directly affect your viewing pleasure.</p>
</li>
<li>
<p><em>download groups</em> - if you have multiple people that are watching
episodes, or multiple sites from which you are downloading, then you
likely will want to use different groups with differing options for
each group. Each group might, for example, have different download
locations.</p>
</li>
<li>
<p><em>TV shows you care about</em> - the <code>defseries</code> macro defines the shows
you want to download. A series is associated with a group, at a
minimum, and can override the quality of what you want to download.
For example, you may want to download <em>720p</em> versions of <em>Top Gear</em>,
but would accept a lower resolution of other shows.</p>
</li>
</ul>
<p>That's the big picture. There is an example configuration file below.
It is fully annotated and is a good place to start.</p>
<h3>
<a id="user-content-set-torrent-handler-handler" class="anchor" href="#set-torrent-handler-handler" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a><code>set-torrent-handler handler</code>
</h3>
<p>Define how <em>.torrent</em> files will be handled. There are two choices:
have <em>transmission-remote</em> handle them or define a directory in which
the <em>.torrent</em> files are placed. For the latter, the configuration
file option would be:</p>
<pre><code>(set-torrent-handler (pathname "~/Downloads/"))
</code></pre>
<p>This would cause <em>tget</em> to store all downloaded <em>.torrent</em> files in
the directory <code>~/Downloads/</code>.</p>
<p>The second choice is to use <code>make-tranmission-remote-handler</code> to
define how to communicate with <em>transmission-remote</em>.</p>
<h3>
<a id="user-content-make-transmission-remote-handler-options" class="anchor" href="#make-transmission-remote-handler-options" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a><code>make-transmission-remote-handler ...options...</code>
</h3>
<p>The values for each option have direct correspondence to
<em>transmission-remote</em> command line arguments, given by the table
below. Each <em>keyword</em> given in the table must be paired with a value,
like this:</p>
<pre><code>:host "download.example.com"
</code></pre>
<p>The <code>:host</code> part must come before the value.</p>
<table>
<thead>
<tr>
<th align="center">keyword(s)</th>
<th align="center">
<em>transmission-remote</em> argument</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">
<code>:host</code> & <code>:port</code>
</td>
<td align="center"><em>host:port</em></td>
</tr>
<tr>
<td align="center">
<code>:username</code> & <code>:password</code>
</td>
<td align="center">
<code>--auth</code> <em>username:password</em>
</td>
</tr>
<tr>
<td align="center"><code>:add-paused t</code></td>
<td align="center"><code>--start-paused</code></td>
</tr>
<tr>
<td align="center"><code>:add-paused nil</code></td>
<td align="center"><code>--no-start-paused</code></td>
</tr>
<tr>
<td align="center"><code>:trash-torrent-file t</code></td>
<td align="center"><code>--trash-torrent</code></td>
</tr>
<tr>
<td align="center"><code>:ratio</code></td>
<td align="center">
<code>-sr</code> <em>ratio</em>
</td>
</tr>
<tr>
<td align="center"><code>:download-path</code></td>
<td align="center">
<code>--download-dir</code> <em>path</em>
</td>
</tr>
<tr>
<td align="center"><code>:docker-container-name</code></td>
<td align="center">See below</td>
</tr>
<tr>
<td align="center"><code>:docker-user</code></td>
<td align="center">See below</td>
</tr>
<tr>
<td align="center"><code>:ssh-user</code></td>
<td align="center">See below</td>
</tr>
<tr>
<td align="center"><code>:ssh-identity</code></td>
<td align="center">See below</td>
</tr>
</tbody>
</table>
<p>When a subdirectory is specified by defseries, <em>tget</em> must ensure it
exists before telling <em>transmission</em> to download into it. There are
two methods for <em>tget</em> communicating with <em>transmission</em>: via <em>docker</em>
or SSH.</p>
<p>You may specify one of the group of arguments, <code>:docker-*</code> or
<code>:ssh-*</code>, but not both.</p>
<p><code>:docker-container-name</code> and <code>:docker-user</code> are the container's name
and user inside the container (for <code>su</code>) to create directories.</p>
<p><code>:ssh-user</code> and <code>:ssh-identity</code> are the user and identity file to
create directories.</p>
<p>SSH example:</p>
<pre><code>(set-torrent-handler
(make-transmission-remote-handler
:host (sys:getenv "TRANSMISSION_HOST")
:port (sys:getenv "TRANSMISSION_PORT")
:username (sys:getenv "TRANSMISSION_USER")
:password (sys:getenv "TRANSMISSION_PASS")
:ssh-user (sys:getenv "TRANSMISSION_SSH_USER")
:ssh-identity (sys:getenv "TRANSMISSION_SSH_IDENTITY")
:add-paused nil
:trash-torrent-file t
:ratio "1.04"))
</code></pre>
<p>In this example, the values for <code>:host</code> and other options are being
pulled from the environment with <code>sys:getenv</code>.</p>
<p>Docker example:</p>
<pre><code>(set-torrent-handler
(make-transmission-remote-handler
...
:docker-container-name "transmission"
:docker-user (sys:getenv "USER")
...))
</code></pre>
<h3>
<a id="user-content-defquality-key-priority-container-source-codec-resolution" class="anchor" href="#defquality-key-priority-container-source-codec-resolution" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a><code>defquality &key priority container source codec resolution</code>
</h3>
<p>The valid values for each keyword option (the names after <em>&key</em>) are:</p>
<p><code>:priority</code> -- any positive integer from 1 to 100. The higher the
number the higher the priority the that has this quality will be given
if there are multiple matching episodes.</p>
<p><code>:container</code> -- the acceptable containers for the quality. A container
is, essentially, the file type of the downloaded file (e.g. <em>mp4</em>).
Valid values:</p>
<pre><code>:avi, :mkv, :vob, :mpeg, :mp4, :iso, :wmv, :ts, :m4v, :m2ts
</code></pre>
<p><code>:source</code> -- the acceptable source for the quality. The source is where
the stream originated. <em>:hdtv</em> is a common source. Valid values:</p>
<pre><code>:pdtv, :hdtv, :dsr, :dvdrip, :tvrip, :vhsrip, :bluray, :bdrip, :brrip, :dvd5, :dvd9, :hddvd, :web-dl
</code></pre>
<p><code>:codec</code> -- the codec used to encode the original source (e.g. <em>XviD</em> or
<em>x264</em>, aka <em>h.264</em>). Valid values:</p>
<pre><code>:x264, :h.264, :xvid, :mpeg2, :divx, :dvdr, :vc-1, :wmv, :bd
</code></pre>
<p><code>:resolution</code> -- the resolution of the encoded image (e.g. <em>720p</em>).
Valid values:</p>
<pre><code>:sd, :720p, :1080p, :1080i
</code></pre>
<h3>
<a id="user-content-deftracker-name-key-url-debug-feed-public-download-delay-disabled-ratio-upload-limit" class="anchor" href="#deftracker-name-key-url-debug-feed-public-download-delay-disabled-ratio-upload-limit" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a><code>deftracker name &key url debug-feed public download-delay disabled ratio upload-limit</code>
</h3>
<p><code>name</code> -- the name of the tracker, a keyword (e.g. :eztv).</p>
<p><code>url</code> -- the URL that points to an RSS feed for this tracker. If you
require a password to access the tracker's RSS feed, it would need to
be contained in the URL.</p>
<p><code>debug-feed</code> -- a filename which is to be substituted for the actual
URL, for debugging purposes.</p>
<p><code>public</code> -- a boolean which indicates if this tracker is public or
not.</p>
<p><code>download-delay</code> -- the delay imposed on downloads for this tracker.
This option allows you to give priority to different trackers, based
of time.</p>
<p><code>disabled</code> -- a boolean indicating if the tracker has been disabled.
It is useful when trackers go offline for extended periods of time.</p>
<p><code>ratio</code> -- the ratio to be applied to this specific tracker. It takes
precedence over the global ratio specified for Transmission, if that
is used.</p>
<p><code>upload-limit</code> -- set the upload limit for this tracker. This is
useful for when the tracker unreliably gives you upload credit for
what you upload (I'm looking at you TvT!). Sometimes, if you upload
too fast the tracker will not count a significant amount of your upload
data.</p>
<h3>
<a id="user-content-defgroup-name-key-rss-url-trackers-delay-ratio-quality-download-path" class="anchor" href="#defgroup-name-key-rss-url-trackers-delay-ratio-quality-download-path" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a><code>defgroup name &key rss-url trackers delay ratio quality download-path</code>
</h3>
<p><code>name</code> -- the name of the group, a keyword (e.g. :bruce).</p>
<p><code>:trackers</code> -- a list of trackers which apply to this group.</p>
<p><code>:rss-url</code> -- the URL of the RSS feed. <strong>This option has been
deprecated in favor of the <code>:trackers</code> option.</strong></p>
<p><code>:delay</code> -- nil or a positive integer, which represents the delay, in
hours, that episodes should be delayed from download. <strong>NOTE:</strong> this
is distinct from any site-specific delay that might be available in
the RSS feed.</p>
<p><code>ratio</code> -- the share ratio given to all downloads for this group.
It's a string not a floating point number, so we don't have to worry
about the printed representation of floats. It no ratio is given,
then the default in Transmission is used. A ratio of "-1" means seed
forever.</p>
<p><code>:quality</code> -- a user-defined quality symbol. See <code>defquality</code>.</p>
<p><code>:download-path</code> -- The path used by <em>transmission-remote</em> to store
the downloaded file for this group. Because the path can be remote,
no checking on the validity of the path is done.</p>
<h3>
<a id="user-content-defseries-name-group-key-private-delay-quality-catch-up-subdir-date-based-aliases" class="anchor" href="#defseries-name-group-key-private-delay-quality-catch-up-subdir-date-based-aliases" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a><code>defseries name group &key private delay quality catch-up subdir date-based aliases</code>
</h3>
<p>Required arguments:</p>
<p><code>name</code> -- the name of the series. Case is not significant, and single
quotes are removed in parsing.</p>
<p><code>private</code> -- a boolean indicating this series should only be
downloaded from a tracker listed as private.</p>
<p><code>group</code> -- the group to which this series belongs.</p>
<p>Optional arguments:</p>
<p><code>:delay</code> -- this allows the group delay to be overriden.</p>
<p><code>:quality</code> -- this allows the group quality to be overriden.</p>
<p><code>:catch-up</code> -- do not download any episodes of this series at or
before this season and episode. An example value is <code>S05E08</code>. Case
differences are ignored (e.g., you can use <code>s</code> or <code>S</code>).</p>
<p><code>:subdir</code> -- put episodes of this series into a subdirectory of the
group download path. This is a workaround for limitations in Plex
Media Server, which will not recognize episodes of shows with dates in
their names instead of episode numbers. <em>The Daily Show</em> and
<em>The Colbert Report</em> are two examples of these types of shows.</p>
<p><code>:date-based</code> -- indicate this series is date based and turn off the
accounting for complete seasons. This is useful for shows like
<em>The Daily Show</em> and <em>The Colbert Report</em>, which don't have seasons
and the episodes for these are ordered by date.</p>
<p><code>:aliases</code> -- a list of aliases for <code>name</code>. This feature exists
because many sites use different names for series, <code>The Daily Show with Jon Stewart</code> vs. <code>The Daily Show</code>.
Here's how you specify it:</p>
<pre><code>:aliases ("The Daily Show")
</code></pre>
<h3>
<a id="user-content-configuration-options" class="anchor" href="#configuration-options" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Configuration options</h3>
<p><code>*repack-window-seconds*</code> -- the number of seconds within the download
of an original file that a repack will be downloaded. The default
value is:</p>
<pre><code>86400
</code></pre>
<p>This value is the number of seconds after an episode is downloaded
that we will download a <em>repack</em> of that episode. A repack is a
re-release of an episode to fix problems in the original.</p>
<h2>
<a id="user-content-maintenance-tasks" class="anchor" href="#maintenance-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maintenance tasks</h2>
<h2>
<a id="user-content-maintenance-task-making-the-database-smaller" class="anchor" href="#maintenance-task-making-the-database-smaller" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maintenance task: making the database smaller</h2>
<p>After some time, <em>tget</em> can slow down due to the database growing. It
has to do with how <em>tget</em> operates, temporarily storing episodes while
it is deciding what to download. These temporarily-stored episodes
are deleted almost immediately, but they leave <em>holes</em> in the
database. To clean them out, you can</p>
<pre><code>$ tget --compact-database
</code></pre>
<p>This will backup the current database and then compact it to make it
more efficient. It will usually dramatically decrease the size of the
database, if it's been in use for a month or more.</p>
<h2>
<a id="user-content-maintenance-task-adding-a-new-series" class="anchor" href="#maintenance-task-adding-a-new-series" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maintenance task: adding a new series</h2>
<p>The easiest way to add a new series is to add it to the configuration
file, like this:</p>
<pre><code>(defseries "New Series" :group1)
</code></pre>
<p>However, sometimes you might want to add it in a caught up state.
That would be:</p>
<pre><code>(defseries "New Series" :group1 :catch-up "S05E08")
</code></pre>
<p>Which would cause episodes from <code>S05E09</code> and later to be downloaded,
and nothing before it.</p>
<h2>
<a id="user-content-maintenance-task-removing-a-series" class="anchor" href="#maintenance-task-removing-a-series" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maintenance task: removing a series</h2>
<p>There are two ways you can remove a series.</p>
<p>The first method entails removing it from the configuration file
and then running <em>tget</em> to remove it from the database. The removing
from the database part would be:</p>
<pre><code>$ tget --delete-series "True Blood"
</code></pre>
<p>The second method entails changing the configuration file to note this
series should be removed:</p>
<pre><code>(defseries "Series Name" :group1 :remove t)
</code></pre>
<p>You can remove this entry in the configuration file after <em>tget</em> has
been run once.</p>
<h2>
<a id="user-content-maintenance-task-removing-an-episode-or-episodes" class="anchor" href="#maintenance-task-removing-an-episode-or-episodes" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maintenance task: removing an episode or episodes</h2>
<p>You may remove a single episode or episodes.</p>
<p>Let's say someone uploaded pre-release versions of some really
popular show, in SD with a really crappy frame rate. Say it was the
first 4 episodes of the new Season 5 of the show. <em>tget</em> downloaded
them and you want to delete them:</p>
<pre><code>$ tget --delete-episode "Game of Bones S05E01"
$ tget --delete-episode "Game of Bones S05E02"
$ tget --delete-episode "Game of Bones S05E03"
$ tget --delete-episode "Game of Bones S05E04"
$ tget --catch-up-series "Game of Bones S04"
</code></pre>
<p>The last command was to make sure you get them in the future, but also
make sure to upgrade your config file so that only high quality
episodes will be downloaded in the future:</p>
<pre><code>(defseries "Game of Bones :me :private t :delay 0 :quality :720p)
</code></pre>
<h2>
<a id="user-content-cleanup" class="anchor" href="#cleanup" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Cleanup</h2>
<p>This is a mode of <em>tget</em>, when the <code>--cleanup</code> or <code>-c</code> arguments are
given. It is intended to be run manually or from cron. I recommend
that you run it manually for a while, since it will take a while to
tune the configuration so that you do not receive hit and runs from
any tracker.</p>
<p>With no optional arguments, nothing is removed. <em>tget</em> prints the
status of torrents and videos:</p>
<pre><code>$ tget -c
These torrents are complete:
T name %done ratio seeded left
F at midnight 2015.06.10 100% 1.22 1d 15:45:19
F the daily show 2015.06.09 100% 0.64 3d 01:45:17
F at midnight 2015.06.08 100% 1.02 3d 18:37:16
These torrents are incomplete:
T name %done ratio seeded left
F the daily show 2015.06.10 100% 0.60 2d 00:45:26 23:14:34
B the daily show 2015.06.11 100% 0.22 23:45:30 2d 00:14:30
B the nightly show with larry wilmore 2015 100% 0.22 19:43:26 2d 04:16:34
F the graham norton show S17E10 100% 1.10 14:31:43 2d 09:28:17
B the nightly show with larry wilmore 2015 100% 0.24 1d 19:37:36 1d 04:22:24
F hannibal S03E02 100% 1.10 1d 10:41:49 1d 13:18:11
F at midnight 2015.06.09 100% 1.01 2d 18:44:23 05:15:37
F at midnight 2015.06.11 100% 0.88 15:42:07 2d 08:17:53
F the ultimate fighter S21E08 100% 0.49 2d 09:36:32 14:23:28
B the nightly show with larry wilmore 2015 100% 0.23 1d 19:37:09 1d 04:22:51
B the nightly show with larry wilmore 2015 100% 0.29 1d 19:37:22 1d 04:22:38
B ridiculousness S06E29 100% 0.24 10:45:16 2d 13:14:44
F childrens hospital us S06E13 100% 0.62 09:36:38 2d 14:23:22
TV:Adrian+Kevin:
NO seeding:ridiculousness.S06E29.mp4
TV:Kevin:
NO 68h<72h:Last.Week.Tonight.With.John.Oliver.S02E16.HDTV.x264-BATV.mp4
NO seeding:the.daily.show.2015.06.09.nick.offerman.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.10.colin.quinn.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.11.mark.ruffalo.hdtv.x264-crooks.mp4
NO 68h<72h:the.daily.show.2015.06.08.nicola.sturgeon.hdtv.x264-crooks.mp4
NO seeding:at.midnight.2015.06.08.mp4
NO seeding:at.midnight.2015.06.11.mp4
NO seeding:The.Graham.Norton.Show.S17E10.720p.HDTV.x264-FTP.mkv
NO seeding:The.Ultimate.Fighter.S21E08.HDTV.x264-KOENiG.mp4
</code></pre>
<p>To remove the completed torrents, use <code>--remove</code>:</p>
<pre><code>$ tget -c --remove
These torrents were removed:
T name %done ratio seeded left
F at midnight 2015.06.10 100% 1.22 1d 15:45:47
F the daily show 2015.06.09 100% 0.64 3d 01:45:45
F at midnight 2015.06.08 100% 1.02 3d 18:37:44
These torrents are incomplete:
T name %done ratio seeded left
F the daily show 2015.06.10 100% 0.60 2d 00:45:54 23:14:06
B the daily show 2015.06.11 100% 0.22 23:45:58 2d 00:14:02
B the nightly show with larry wilmore 2015 100% 0.22 19:43:54 2d 04:16:06
F the graham norton show S17E10 100% 1.10 14:32:11 2d 09:27:49
B the nightly show with larry wilmore 2015 100% 0.24 1d 19:38:04 1d 04:21:56
F hannibal S03E02 100% 1.10 1d 10:42:17 1d 13:17:43
F at midnight 2015.06.09 100% 1.01 2d 18:44:51 05:15:09
F at midnight 2015.06.11 100% 0.88 15:42:35 2d 08:17:25
F the ultimate fighter S21E08 100% 0.49 2d 09:37:00 14:23:00
B the nightly show with larry wilmore 2015 100% 0.23 1d 19:37:37 1d 04:22:23
B the nightly show with larry wilmore 2015 100% 0.29 1d 19:37:50 1d 04:22:10
B ridiculousness S06E29 100% 0.24 10:45:44 2d 13:14:16
F childrens hospital us S06E13 100% 0.62 09:37:06 2d 14:22:54
TV:Adrian+Kevin:
NO seeding:ridiculousness.S06E29.mp4
TV:Kevin:
NO 68h<72h:Last.Week.Tonight.With.John.Oliver.S02E16.HDTV.x264-BATV.mp4
NO 32h<72h:the.daily.show.2015.06.09.nick.offerman.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.10.colin.quinn.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.11.mark.ruffalo.hdtv.x264-crooks.mp4
NO 68h<72h:the.daily.show.2015.06.08.nicola.sturgeon.hdtv.x264-crooks.mp4
NO 10h<72h:at.midnight.2015.06.08.mp4
NO seeding:at.midnight.2015.06.11.mp4
NO seeding:The.Graham.Norton.Show.S17E10.720p.HDTV.x264-FTP.mkv
NO seeding:The.Ultimate.Fighter.S21E08.HDTV.x264-KOENiG.mp4
</code></pre>
<p>Now we have:</p>
<pre><code>$ tget -c
These torrents are incomplete:
T name %done ratio seeded left
F the daily show 2015.06.10 100% 0.60 2d 00:46:03 23:13:57
B the daily show 2015.06.11 100% 0.22 23:46:07 2d 00:13:53
B the nightly show with larry wilmore 2015 100% 0.22 19:44:03 2d 04:15:57
F the graham norton show S17E10 100% 1.10 14:32:20 2d 09:27:40
B the nightly show with larry wilmore 2015 100% 0.24 1d 19:38:13 1d 04:21:47
F hannibal S03E02 100% 1.10 1d 10:42:26 1d 13:17:34
F at midnight 2015.06.09 100% 1.01 2d 18:45:00 05:15:00
F at midnight 2015.06.11 100% 0.88 15:42:44 2d 08:17:16
F the ultimate fighter S21E08 100% 0.49 2d 09:37:09 14:22:51
B the nightly show with larry wilmore 2015 100% 0.23 1d 19:37:46 1d 04:22:14
B the nightly show with larry wilmore 2015 100% 0.29 1d 19:37:59 1d 04:22:01
B ridiculousness S06E29 100% 0.24 10:45:53 2d 13:14:07
F childrens hospital us S06E13 100% 0.62 09:37:15 2d 14:22:45
TV:Adrian+Kevin:
NO seeding:ridiculousness.S06E29.mp4
TV:Kevin:
NO 68h<72h:Last.Week.Tonight.With.John.Oliver.S02E16.HDTV.x264-BATV.mp4
NO 32h<72h:the.daily.show.2015.06.09.nick.offerman.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.10.colin.quinn.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.11.mark.ruffalo.hdtv.x264-crooks.mp4
NO 68h<72h:the.daily.show.2015.06.08.nicola.sturgeon.hdtv.x264-crooks.mp4
NO 10h<72h:at.midnight.2015.06.08.mp4
NO seeding:at.midnight.2015.06.11.mp4
NO seeding:The.Graham.Norton.Show.S17E10.720p.HDTV.x264-FTP.mkv
NO seeding:The.Ultimate.Fighter.S21E08.HDTV.x264-KOENiG.mp4
</code></pre>
<p>To remove the watched torrents before the configured waiting period of
72h is up (set the waiting period to 0, for example):</p>
<pre><code>$ tget -c --remove -h0
These torrents are incomplete:
T name %done ratio seeded left
F the daily show 2015.06.10 100% 0.60 2d 00:46:16 23:13:44
B the daily show 2015.06.11 100% 0.22 23:46:20 2d 00:13:40
B the nightly show with larry wilmore 2015 100% 0.22 19:44:16 2d 04:15:44
F the graham norton show S17E10 100% 1.10 14:32:33 2d 09:27:27
B the nightly show with larry wilmore 2015 100% 0.24 1d 19:38:26 1d 04:21:34
F hannibal S03E02 100% 1.10 1d 10:42:39 1d 13:17:21
F at midnight 2015.06.09 100% 1.01 2d 18:45:13 05:14:47
F at midnight 2015.06.11 100% 0.88 15:42:57 2d 08:17:03
F the ultimate fighter S21E08 100% 0.49 2d 09:37:22 14:22:38
B the nightly show with larry wilmore 2015 100% 0.23 1d 19:37:59 1d 04:22:01
B the nightly show with larry wilmore 2015 100% 0.29 1d 19:38:12 1d 04:21:48
B ridiculousness S06E29 100% 0.24 10:46:06 2d 13:13:54
F childrens hospital us S06E13 100% 0.62 09:37:28 2d 14:22:32
TV:Adrian+Kevin:
NO seeding:ridiculousness.S06E29.mp4
TV:Kevin:
rm /me/tplex/content/videos/kevin/Last.Week.Tonight.With.John.Oliver/Last.Week.Tonight.With.John.Oliver.S02E16.HDTV.x264-BATV.mp4
rm /me/tplex/content/videos/kevin/The.Daily.Show/the.daily.show.2015.06.09.nick.offerman.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.10.colin.quinn.hdtv.x264-crooks.mp4
NO seeding:the.daily.show.2015.06.11.mark.ruffalo.hdtv.x264-crooks.mp4
rm /me/tplex/content/videos/kevin/The.Daily.Show/the.daily.show.2015.06.08.nicola.sturgeon.hdtv.x264-crooks.mp4
rm /me/tplex/content/videos/kevin/At.Midnight/at.midnight.150608-yestv.mp4
rm /me/tplex/content/videos/kevin/At.Midnight/at.midnight.2015.06.08.mp4
NO seeding:at.midnight.2015.06.11.mp4
NO seeding:The.Graham.Norton.Show.S17E10.720p.HDTV.x264-FTP.mkv
NO seeding:The.Ultimate.Fighter.S21E08.HDTV.x264-KOENiG.mp4
$
</code></pre>
<h2>
<a id="user-content-plexfix" class="anchor" href="#plexfix" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>plexfix</h2>
<p><em>plexfix</em> is a simple program run from <em>transmission</em> after a torrent
completes. <em>plexfix</em> is given no arguments. The directory and name
are passed in the environment variables <code>TR_TORRENT_DIR</code> and
<code>TR_TORRENT_NAME</code>. <em>plexfix</em> uses these to determine if Plex needs a
symlink to see the newly download torrent. To enable it, use the
<code>settings.json</code> file for <em>transmission</em>:</p>
<pre><code>"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/usr/local/lib/plexfix/plexfix",
</code></pre>
<p><code>/usr/local/lib/plexfix</code> is the default location for the installation
of <em>plexfix</em>.</p>
<p>For debugging purposes, you can also give a complete pathname to
<em>plexfix</em> on the command line, rather than setting the above
environment variables.</p>
<p><em>plexfix</em> also accepts these arguments:</p>
<p><code>-d</code> :: debug mode
<code>-m</code> :: do not send mail
<code>-n</code> :: do not execute, just say what would be done
<code>-q</code> :: be quiet, only print error messages
<code>-v</code> :: be verbose</p>
<p>An example email:</p>
<pre><code>From: layer@somewhere
To: layer@somewhere
Subject: plexfix
OLD name: /me/tplex/content/videos/adrian+kevin/ridiculousness.0629-yestv.mp4
NEW name: /me/tplex/content/videos/adrian+kevin/ridiculousness.S06E29.mp4
</code></pre>
<h2>
<a id="user-content-usage" class="anchor" href="#usage" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Usage</h2>
<p>There are two primary modes of operation: cleanup and download.
Cleanup mode is activated by using the --cleanup or -c arguments.
Download mode is activated by using the other primary behavior determining
arguments. See below.</p>
<p>Cleanup mode has two parts: removing torrents from Transmission after
they have seeded enough and removing video files watched by Plex.</p>
<p>[download] Primary behavior determining arguments (one of these must be given):</p>
<pre><code>--add file-or-directory
--catch-up
--catch-up-series series-episode-name
--check-database
--clean-database
--compact-database
--delete-episodes series-name
--delete-episode episode-description
--delete-orphans
--delete-series series-name
--dump-all
--dump-complete-to
--dump-episodes series-name
--dump-orphans
--dump-series series-name
--dump-stats
--skip series-name
</code></pre>
<p>[download] Behavior modifying arguments:</p>
<pre><code>--auto-backup condition
--config file
--cron
--db database-name
--debug
--force
--learn
--reset
--root data-directory
--verbose or -v
</code></pre>
<p>[cleanup] Behavior modifying arguments:</p>
<pre><code>-h
--remove
--remove-bad
--remove-seeded
--remove-watched
--torrent-info
--torrents-only
</code></pre>
<h3>
<a id="user-content-usage-details" class="anchor" href="#usage-details" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Usage details</h3>
<p>The tget options are below. When there is an argument naming series,
these are canonicalized by removing single quotes and converting to lower
case. However, the series names presented to you will be stored in their
original form.</p>
<ul>
<li>
<p><code>--help</code></p>
<p>Print full help text and exit.</p>
</li>
</ul>
<p>The following are arguments controlling primary behavior:</p>
<ul>
<li>
<p><code>--cleanup</code> or <code>-c</code></p>
<p>Active cleanup mode. See the cleanup options below.</p>
</li>
<li>
<p><code>--run</code></p>
<p>The primary mode of operation, whereby RSS feeds are retrieved, searched
for new episodes and those episode torrents downloaded.</p>
</li>
<li>
<p><code>--add thing</code></p>
<p>If <code>thing</code> is a file, it should be a <code>.torrent</code> file, which is
manually added. If <code>thing</code> is a directory, then all the <code>.torrent</code> files
in the directory are added. This circumvents any matching and assumes
the episodes should be downloaded. The series name,episode and
season numbers are taken directly from the file name. If the information
cannot be extracted, you can rename the files to suit <code>tget</code>.</p>
<p>If the episode has already been downloaded, then <code>--force</code> is required
to make <code>tget</code> download it again.</p>
</li>
<li>
<p><code>--catch-up</code></p>
<p>Go through the database and make the newest episode of each series the
oldest episode that will ever be downloaded for that series; this
prevents old episodes, which are released from time to time, from being
downloaded.</p>
</li>
<li>
<p><code>--catch-up-series series-ep</code></p>
<p>Catch series up to the episode given in the companion argument.
See examples below.</p>
</li>
<li>
<p><code>--check-database</code></p>
<p>Report on items in the database which can be cleaned up.</p>
</li>
<li>
<p><code>--clean-database</code></p>
<p>Remove items reported by <code>--check-database</code>.</p>
</li>
<li>
<p><code>--compact-database</code></p>
<p>This saves and restores the database, compacting it at the same time.</p>
</li>
<li>
<p><code>--delete-episodes series-name</code></p>
<p>Delete episodes with series name matching <code>series-name</code>. This is permanent!
Using this option with --auto-backup force is recommended.</p>
<p><code>--force</code> can be used if there are multiple episodes that match.</p>
</li>
<li>
<p><code>--delete-episode episode-description</code></p>
<p>Delete the episode matching <code>episode-description</code>. This is permanent!
Using this option with --auto-backup force is recommended. Example:</p>
<p>--delete-episode "I Love Lucy S05E01"</p>
</li>
<li>
<p><code>--delete-orphans</code></p>
<p>Delete orphaned series and episodes from the database. See
<code>--dump-orphans</code> for more information.</p>
</li>
<li>
<p><code>--delete-series series-name</code></p>
<p>Delete series with series name matching <code>series-name</code>. This is permanent!
Using this option with --auto-backup force is recommended.</p>
</li>
<li>
<p><code>--dump-all</code></p>
<p>Dump all <code>episode</code> objects to stdout.</p>
</li>
<li>
<p><code>--dump-complete-to</code></p>
<p>Dump a table of series and last downloaded information for all series in
the database to stdout. See --catch-up-series.</p>
</li>
<li>
<p><code>--dump-episodes series-name</code></p>
<p>Dump all episode objects matching series name <code>series-name</code> to stdout.</p>
</li>
<li>
<p><code>--dump-orphans</code></p>
<p>Dump orphaned series and episodes. Orphaned series are those which do
not appear in the config file but exist in the database. Orphaned
episodes are those are in the database but have no corresponding series
object.</p>
</li>
<li>
<p><code>--dump-series series-name</code></p>
<p>Dump all series objects matching series name <code>series-name</code> to stdout.</p>
</li>
<li>
<p><code>--dump-stats</code></p>
<p>Dump information about the database to stdout.</p>
</li>
<li>
<p><code>--skip series-name</code></p>
<p>Skip the next episode of <code>series-name</code>. It does so by using the last
downloaded episode and incrementing it by 1.</p>
<p>Note: this has no effect on date-based series. See the <code>:date-based</code>
option to <code>defseries</code>.</p>
</li>
</ul>
<p>The following options augment the options above or have the stated side
effects:</p>
<ul>
<li>
<p><code>--auto-backup {reset|program-update|schema-update|restore|force|never}</code></p>
<p>Perform a backup of the database under specific conditions given by the
companion argument:</p>
<ul>
<li>
<code>compact</code> - when the database is being compacted</li>
<li>
<code>force</code> - always</li>
<li>
<code>never</code> - never</li>
<li>
<code>program-update</code> - when the program changed since the last db update</li>
<li>
<code>reset</code> - when the database is being reset</li>
<li>
<code>schema-update</code> - when the schema changes</li>
</ul>
<p>The default is to make backups for all conditions above.</p>
</li>
<li>
<p><code>--config file</code></p>
<p>Load <code>file</code> as the configuration file instead of one of the built-in
defaults. The default list (searched in this order) is to load the first
file found in the list:</p>
<ul>
<li>
<code>config.cl</code> in the same directory as the program</li>
<li><code>$HOME/.tget.cl</code></li>
<li>
<code>config.cl</code> in the tget data directory (see the --root option)</li>
</ul>
</li>
<li>
<p><code>--cron</code></p>
<p>Quiet mode, for cron jobs.</p>
</li>
<li>
<p><code>--db database</code></p>
<p>The name of the database. The default is <code>db</code> in the tget data
directory (see the --root). This name will itself become a directory.</p>
</li>
<li>
<p><code>--debug</code></p>
<p>Run in debug mode. In this mode, torrents are not downloaded and the
debug feed defined by the configuration file is used. Also, the program
is more verbose. This is for testing and is not recommended. It implies
<code>--learn</code>.</p>
</li>
<li>
<p><code>--force</code></p>
<p>The meaning of this argument depends on the other arguments and context
in which it is given.</p>
</li>
<li>
<p><code>--learn</code></p>
<p>Mark episodes which match the configuration as <em>downloaded</em>. This is
useful when using tget for the first time. See the examples below.</p>
</li>
<li>
<p><code>--reset</code></p>
<p>Reset database before beginning operation--this removes all data
from the database. The default --auto-backup settings will cause a
backup to be performed before the reset.</p>
</li>
<li>
<p><code>--root data-directory</code></p>
<p>Change the data directory, the defaults is $HOME/.tget.d/</p>
</li>
<li>
<p><code>--verbose</code> or <code>-v</code></p>
<p>Verbose mode. For now, it makes <code>--dump-episodes</code> print detailed
information on episodes.</p>
</li>
</ul>
<p>Cleanup options:</p>
<ul>
<li>
<p><code>-h hours</code></p>
<p>Set the threshold for how long after a video is watched that it can be
considered for removal. The value of 0 can be used to remove any videos
which have been watched, for which seeding is complete.</p>
<p>The default is 72 hours, or 3 days.</p>
</li>
<li>
<p><code>--remove</code></p>
<p>Remove videos which meet the criteria for removal. This means removing
the torrent from Transmission and removing the file from disk.</p>
</li>
<li>
<p><code>--remove-bad</code></p>
<p>A special cleanup mode, which causes only unregistered torrents to be
removed from Transmission. When this argument is given, without the
other cleanup mode arguments (<code>-c</code> and <code>--cleanup</code>), it is used as a pass
before torrents are downloaded. Along with the torrent, the episode is
deleted from the database. This allows for bad torrents to be removed
and redownloaded, if they should become available again.</p>
</li>
<li>
<p><code>--remove-seeded</code></p>
<p>Only remove torrents from Transmission, if they meet the seeding criteria.</p>
</li>
<li>
<p><code>--remove-watched</code></p>
<p>Only remove watched files from disk, if they meet the criteria.</p>
</li>
<li>
<p><code>--torrent-info</code></p>
<p>List torrents torrents currently in Transmission.</p>
</li>
<li>
<p><code>--torrents-only</code></p>
<p>Clean up torrents only, not files on disk.</p>
</li>
</ul>
<p>Examples:</p>
<p>Toss current database and catch up on shows released in the last 180 days
marking them all as `downloaded'</p>
<pre><code>$ tget --reset --learn
</code></pre>
<p>The usefulness of this is highly dependent on how far the feed for the site
you are using goes back. Many sites do not have deep feeds, but some sites
have parameters that allow you to go back in time. Sadly, this feature is
rare these days, as it is expensive to support.</p>
<p>Same, but to a `temp' database in the current directory:</p>
<pre><code>$ tget --reset --learn --root $PWD --db test.db
</code></pre>
<p>Let's see what the series object for "Regular Show" looks like.
The series name is not case sensitive:</p>
<pre><code>$ tget --dump-series "regular show"
</code></pre>
<p>These all refer to the same series:</p>
<pre><code>$ tget --dump-series "james mays man lab"
$ tget --dump-series "James Mays Man Lab"
$ tget --dump-series "James May's Man Lab"
</code></pre>
<p>To see the episodes of the above, you could use any of the variations on
the names given, for example:</p>
<pre><code>$ tget --dump-episodes "James May's Man Lab"
</code></pre>
<p>Compact the database:</p>
<pre><code>$ tget --compact-database
</code></pre>
<p>Catch up series to a specific episode:</p>
<pre><code># note that episodes before s04e21 have been downloaded:
$ tget --catch-up-series "regular show s04e20"
# note that all of season 4 has been downloaded:
$ tget --catch-up-series "breaking bad s04"
</code></pre>
<h2>
<a id="user-content-example-configuration-file" class="anchor" href="#example-configuration-file" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Example configuration file</h2>
<pre><code>;; Config file for tget
(in-package :user)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; General options
;; This is now reset once per run, so it's not too much data to save,
;; and it's good for debugging feed issues.
(setq *log-rss* (merge-pathnames "rss.log" *tget-data-directory*))
(setq *log-xml* (merge-pathnames "error.xml" *tget-data-directory*))
;; A good resource to see why something is or isn't downloading
(setq *log-file* (merge-pathnames "ep.log" *tget-data-directory*))
;; Use transmission-remote to tell your torrent client to download the
;; episode:
(set-torrent-handler
(make-transmission-remote-handler
:host (sys:getenv "TRANSMISSION_HOST")
:port (sys:getenv "TRANSMISSION_PORT")
:username (sys:getenv "TRANSMISSION_USER")