-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsorttv.conf
More file actions
394 lines (332 loc) · 15.9 KB
/
sorttv.conf
File metadata and controls
394 lines (332 loc) · 15.9 KB
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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This config file is optional, but is an easy way to configure SortTV.
# Simply place it in the same directory as SortTV.
#
# The lines that start with a # are for your information, and are ignored by SortTV.
# Edit the settings in this file to suit your needs.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~
# Directories
# ~~~~~~~~~~~
# The new files to sort
# For example, set this to where completed downloads are stored
directory-to-sort=/home/cliffe/Files/Downloads/Unsorted
# A file to be sorted: this argument can be repeated to add multiple individual files to sort
#file-to-sort=
# Where to sort episodes into (dir that will contain dirs for each show)
# This directory will contain the structure (Show)/(Seasons)/(episodes)
# Alternatively set this to "KEEP_IN_SAME_DIRECTORIES" for a recursive renaming of files in directory-to-sort
tv-directory=/home/cliffe/Files/Media/TV
# Where to sort music into
# If not specified, music is not moved
#music-directory=/home/cliffe/Files/Media/Music
# Where to sort movies into
# If not specified, movies are not moved
# Enabling this feature requires Internet access to look up movie names
movie-directory=/home/cliffe/Files/Media/Movies
# OPTIONAL - where to put things that are none of the above
# If this is supplied then files and directories that SortTV does not match as episodes or music etc will be moved here
# If not specified, non-episodes are not moved
#misc-dir=/home/cliffe/Files/Downloads/Non-episodes
# ~~~~~~~~~~~~~~~~~~~
# Which files to sort
# ~~~~~~~~~~~~~~~~~~~
# OPTIONAL - Dry run mode
# No file operations will occur on the to-sort directory, some directories may be created at the destination.
#dry-run
# OPTIONAL - only sort if the file matches one of these
# uses shell-like simple pattern matches
# sort files:
whitelist=*
# sort directories:
whitelist=*/
# OPTIONAL - don't sort if the file matches one of these
ignore:*.uc!
ignore=*.uc
ignore=*.torrent
ignore=*sample*
ignore=*.part
# don't sort compressed files, their contents will be extracted and sorted
ignore=*.rar
ignore=*.zip
ignore=*.7z
ignore=*.gz
ignore=*.bz2
ignore=*.r0*
ignore=*.r1*
ignore=*.r2*
ignore=*.r3*
ignore=*.r4*
ignore=*.r5*
ignore=*.r6*
ignore=*.r7*
ignore=*.r8*
ignore=*.r9*
# OPTIONAL - delete the file from the source directory, if the file matches one of these
# Note: this is applied after an attempt has been made to extract any archives
# Remove the leading '#' to enable these:
#delete:readme
#delete:read me
#delete:*.nfo
#delete=*.rar
#delete=*.zip
# OPTIONAL - consider the file extension before treating certain files as movies or TV episodes
# Recommended: SortTV is aware of a large number of extensions, and this can avoid many false matches
# TRUE/FALSE
# if not specified, TRUE
consider-media-file-extensions=TRUE
# OPTIONAL - These extensions are NEVER movies or TV shows or music, treat them as "others" automatically
# Note: Will not run these file types through tvdb, tmdb, etc.
# Not typically required if consider-media-file-extensions=TRUE
# This argument can be repeated to add multiple extensions
#non-media-extension=jpg
# OPTIONAL - sort files which fall within these ranges. Filesizes use the MB and GB postfixes,
# such as 170MB-400MB or 1.0GB-1.2GB. If no postfix specified, MB is assumed.
# The following ranges can be enabled by removing the leading '#':
#filesize-range=170MB-400MB
#filesize-range=1.05GB-1.15GB
#filesize-range=697MB-700MB
# OPTIONAL - Sort only files or directories that are older than this number of days
# A value of zero sorts everything.
# This may be useful if you rsync your media from a remote server.
sort-only-older-than-days=0
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Output and xbmc integration
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# OPTIONAL - host:port for the old xbmc webserver, to automatically update library when media arrives
# You probably want to set this to "localhost:8080". Remember to "allow control of xbmc via HTTP", and "set the content" of your TV directory in xbmc.
# If not specified, xbmc is not updated
#xbmc-old-web-server=
# OPTIONAL - host for the new xbmc communication, to automatically update library when media arrives
# You probably want to set this to "localhost"
#xbmc-remote-control=
# OPTIONAL - log to this file
# If not specified, output goes to sorttv.log in the script directory
#log-file=
# OPTIONAL - Output verbosity. Set to show messages describing the decision making process.
# If not specified, it is disabled
#verbose
# ~~~~~~~
# Polling
# ~~~~~~~
# OPTIONAL - Tell the script to check for new files to sort every X seconds, minutes, hours, or days
# You could set the script to start on system startup with polling, rather than using scheduling to start the script.
# Valid values include "2secs", "2days", "1min", "3hrs", "30s" etc.
# If not specified, polling is disabled and the script will only sort the directory once.
#polling-time:
# ~~~~~~~~~~~~~~~
# Download images
# ~~~~~~~~~~~~~~~
# OPTIONAL - Download images for shows, seasons, and episodes from thetvdb
# Downloaded images are copied into the sort-to (destination) directory.
# NEW_SHOWS - When new shows, seasons, or episodes are created the associated images are downloaded
# FALSE - No images are downloaded
# NEW_SHOWS/FALSE
# if not specified, NEW_SHOWS
fetch-tv-images=NEW_SHOWS
# OPTIONAL - Sets the image format to use, poster or banner.
# POSTER/BANNER
# if not specified, POSTER
images-format=POSTER
# OPTIONAL - Download images for movies
# Downloaded images are copied into the sort-to (destination) directory.
# TRUE/FALSE
# if not specified, TRUE
fetch-movie-images=TRUE
# OPTIONAL - Duplicate images can be symlinked or copied. For example TV season images get placed in the main directory, and also in season subdirectories.
# The SYMLINK option is recommended. If symlinks are not available (for example, on Windows), then they will be copied.
# SYMLINK/COPY
# If not specified, SYMLINK.
duplicate-images=SYMLINK
# ~~~~~~~~~~~~~
# File renaming
# ~~~~~~~~~~~~~
# OPTIONAL - rename media to a new format when moving
# TRUE/FALSE
# If not specified, FALSE
rename-media=TRUE
# Optional - the format to use if renaming tv episodes to a new format (as specified above)
# Hint: including the Episode Title as part of the name slows the process down a bit since titles are retrieved from thetvdb.com
# The format can be made up of:
# [SHOW_NAME]: "My Show"
# [EP1]: "S01E01"
# [EP2]: "1x1"
# [EP3]: "1x01"
# [EP4]: "01" (Episode number only)
# [EP_NAME1] " - Episode Title"
# [EP_NAME2] ".Episode Title"
# [QUALITY]: " HD" (or " SD") - extracted from original file name
# If not specified the format is, "[SHOW_NAME] - [EP1][EP_NAME1]"
#
# Examples: (remove the # from the renameformat line that follows the example filename you want)
# for "My Show - S01E01 - Episode Title" (this is the default)
rename-tv-format=[SHOW_NAME] - [EP1][EP_NAME1]
# for "My Show - S01E01"
#rename-tv-format=[SHOW_NAME] - [EP1]
# for "My Show.S01E01.Episode Title"
#rename-tv-format=[SHOW_NAME].[EP1][EP_NAME2]
# for "My Show - S01E01 - Episode Title"
#rename-tv-format=[SHOW_NAME] - [EP1][EP_NAME1]
# for "My Show - 1x1 - Episode Title"
#rename-tv-format=[SHOW_NAME] - [EP2][EP_NAME1]
# for "My Show - 1x01 - Episode Title"
#rename-tv-format=[SHOW_NAME] - [EP3][EP_NAME1]
# Optional - the format to use if renaming movies
# The format can be made up of:
# [MOVIE_TITLE]: "My Movie"
# [YEAR1]: "(2011)"
# [YEAR2]: "2011"
# [QUALITY]: " HD" (or " SD") - extracted from original file name
# /: A sub-directory (folder) - movies can be in their own directories
# If not specified the format is, "[MOVIE_TITLE] [YEAR2]/[MOVIE_TITLE] [YEAR1]"
rename-movie-format=[MOVIE_TITLE] [YEAR2]/[MOVIE_TITLE] [YEAR1]
# OPTIONAL - renames episodes/movies to replace spaces with dots
# TRUE/FALSE
# If not specified, FALSE
use-dots-instead-of-spaces=FALSE
# Substitute the titles of these shows
show-name-substitute=CSI-->CSI: Crime Scene Investigation
show-name-substitute=CSI Crime Scene Investigation-->CSI: Crime Scene Investigation
show-name-substitute=Sanctuary US-->Sanctuary
show-name-substitute=Shit My Dad Says-->$#*! My Dad Says
show-name-substitute=ABC - Two and a Half Men-->Two and a Half Men
show-name-substitute=Its Always Sunny in Philadelphia-->It's Always Sunny in Philadelphia
show-name-substitute=American Dad-->American Dad!
show-name-substitute=Penn & Teller Bullshit!-->Penn & Teller: Bullshit!
show-name-substitute=Being Human UK-->Being Human
show-name-substitute=House MD-->House
show-name-substitute=House M.D.-->House
show-name-substitute=Game of Throne-->Game of Thrones
show-name-substitute=Star Trek DS9-->Star Trek Deep Space 9
show-name-substitute=Marvels Agents of S H I E L D -->Marvels Agents of S.H.I.E.L.D.
# ~~~~~~~~~~~~~~~~
# Directory naming
# ~~~~~~~~~~~~~~~~
# OPTIONAL - whether to use directories for seasons
# For example, should "Show S1E01.avi" be sorted into "Show/Season 1/" or "Show"
# If FALSE, all episodes will be put in the one show directory and season images will not be fetched
# If not specified, TRUE
use-season-directories=TRUE
# OPTIONAL - Season title (eg "Season " -> "Season 1", "Series "->"Series 1", "Season."->"Season.1")
# Note: if you want a space it needs to be included
# If not specified, "Season "
season-title=Season
# OPTIONAL - Season format padded to double digits (eg "Season 01" rather than "Season 1")
# TRUE/FALSE
# If not specified, FALSE
season-double-digits=FALSE
# ~~~~~~~~~~~~~~~~
# Matching options
# ~~~~~~~~~~~~~~~~
# OPTIONAL - The tolerated variance for year matches.
# This applies to movies and to a lesser extent TV episodes (for sorting purposes).
# For example, if a year is specified in the filename of a movie to sort, it can be off by this many years and still be considered the same movie as one in tmdb database.
# Note that when sorting TV episodes, this is only considered when identifying local directories to sort into, and if a match is not found the year is subsequently ignored.
# If not specified, 1
year-tolerance-for-error=1
# OPTIONAL - Match type. LIBERAL assumes all files are TV episodes and tries to extract season and episode number any way possible.
# Normal is probably what you want
# LIBERAL/NORMAL
# If not specified, NORMAL
match-type=NORMAL
# OPTIONAL - Attempt to sort files that are named after the episode title or air date.
# For example, "My show - My episode title.avi" or "My show - 2010-12-12.avi"
# could become "My Show - S01E01 - My episode title.avi"
# Attempts to lookup the season and episode number based on the episodes in thetvdb.com database.
# Since this involves downloading the list of episodes from the Internet, this will cause a slower sort.
# TRUE/FALSE
# If not specified, TRUE
match-files-based-on-tvdb-lookups=TRUE
# Use these tvdb IDs to lookup these shows
tvdb-id-substitute=$#*! My Dad Says-->164951
tvdb-id-substitute=$#-! My Dad Says-->164951
tvdb-id-substitute=Shit My Dad Says-->164951
tvdb-id-substitute:Brothers and Sisters-->79506
tvdb-id-substitute:Greys Anatomy-->73762
tvdb-id-substitute:David Letterman-->75088
tvdb-id-substitute:The Daily Show-->71256
tvdb-id-substitute:Conan-->194751
tvdb-id-substitute:Jay Leno-->70336
tvdb-id-substitute:Dont Trust the Bitch in Apartment 23-->248812
# Define additional extensions for music files (SortTV knows a lot already)
music-extension=mp3
# OPTIONAL - Attempt to sort entire directories that represent a movie
# The directory (and all its contents AS IS) will be sorted
# Note: Currently, this option WILL NOT rename or sort ANY of the contents of the directory,
# including the movie. The directory will just be sorted into the movie-directory.
# If not specified, FALSE
sort-movie-directories=FALSE
# ~~~~~~~~~~~~~~~
# Other Behaviour
# ~~~~~~~~~~~~~~~
# OPTIONAL - Sort by moving or copying the file. If the file already exists because it was already copied it is silently skipped.
# the MOVE-AND-LEAVE-SYMLINK-BEHIND option may be handy if you want to continue to seed after sorting, this leaves a symlink in place of the newly moved file
# PLACE-SYMLINK does not move the original file, but places a symlink in the sort-to directory (probably not what you want).
# PLACE-HARDLINK does not move the original file, but places a hardlink in the sort-to directory. This might be helpful if you use Linux and you want a sorted and unsorted version on the same partition.
# MOVE/COPY/MOVE-AND-LEAVE-SYMLINK-BEHIND/PLACE-SYMLINK/PLACE-HARDLINK
# If not specified, MOVE
sort-by=MOVE
# OPTIONAL - How to treat directories.
# AS_FILES_TO_SORT - sorts directories, moving entire directories that represents an episode, also detects and moves directories of entire seasons
# RECURSIVELY_SORT_CONTENTS - doesn't move directories, just their contents, including subdirectories
# IGNORE - ignores directories
# AS_FILES_TO_SORT/RECURSIVELY_SORT_CONTENTS/IGNORE
# If not specified, RECURSIVELY_SORT_CONTENTS
treat-directories=RECURSIVELY_SORT_CONTENTS
# OPTIONAL - Only sort into show directories that already exist
# This may be helpful if you have multiple destination directories. Just set up all the other details in the conf file,
# and specify the destination directory when invoking the script. Only episodes that match existing directories in the destination will be moved.
# If this is false, then new directories are created for shows that dont have a directory.
# TRUE/FALSE
# If not specified, FALSE
require-show-directories-already-exist=FALSE
# OPTIONAL - Delete symlinks from the directory to sort while sorting.
# This may be helpful if you want to remove all the symlinks you left behind using --sort-by=MOVE-AND-LEAVE-SYMLINK-BEHIND
# You could schedule "perl sorttv.pl --remove-symlinks=TRUE" to remove these once a week/month
# If this option is enabled and used at the same time as --sort-by=MOVE-AND-LEAVE-SYMLINK-BEHIND,
# then only the previous links will be removed, and new ones may also be created
# TRUE/FALSE
# If not specified, FALSE
remove-symlinks=FALSE
# OPTIONAL - Forces MSWindows compatible file names, even when run on other platforms such as Linux
# This may be helpful if you are writing to a Windows share from a Linux system
# If not specified, FALSE
force-windows-compatible-filenames=TRUE
# OPTIONAL - Set language for thetvdb and tmdb lookups, this effects episode titles etc
# Valid values include: it, zh, es, hu, nl, pl, sl, da, de, el, he, sv, eng, fi, no, fr, ru, cs, en, ja, hr, tr, ko, pt
# If not specified, en (English)
tv-lookup-language=en
movie-lookup-language=en
# OPTIONAL - Should non-episode files loose their directory structure?
# This option only has an effect if a non-episode directory was specified.
# If set to TRUE, they will be renamed after the directory they were in.
# Otherwise they keep their directory structure in the new non-episode-directory location.
# TRUE/FALSE
# If not specified, FALSE
flatten-non-eps=FALSE
# OPTIONAL - What to do if a file already exists in the destination
# SKIP/OVERWRITE
# If not specified, SKIP
if-file-exists=SKIP
# OPTIONAL - Only sort TV episodes if the episode name was available from thetvdb
# Note that this only applies if you include the tvdb episode name in the rename format (and have renaming enabled)
# Also note that directories may still be created in the destination, even if the file is skipped due to this rule
# TRUE/FALSE
# If not specified, FALSE
tvdb-episode-name-required=FALSE
# OPTIONAL - Extracts the contents of archives (.zip, .rar) into the directory-to-sort while sorting
# If "rar" and "unzip" programs are available they are used.
# TRUE/FALSE
# If not specified, TRUE
extract-compressed-before-sorting=TRUE
# OPTIONAL - Check for newer versions of SortTV
# TRUE/FALSE
# If not specified, TRUE
check-for-updates=TRUE
# Optional - Shows the license and some information about donations when the program starts
# TRUE/FALSE
# If not specified, TRUE
display-license=TRUE
# OPTIONAL - secondary config file, overwrites settings loaded so far (DO NOT PUT THE NAME OF THIS FILE!)
# If not specified, only the default config file is loaded (sorttv.config)
# read-config-file=