-
Notifications
You must be signed in to change notification settings - Fork 0
Formatting
Downlomatic provides its own formatting feature and syntax. This is due to the need to give every downloaded video an individual name without needing to specify it manually. This is done by providing an expression with special identifiers.
These identifiers get replaced with their according meaning for each individual download. There also are literals, which are also replaced with their value. That value however is constant and equal throughout all videos. Furthermore, there are illegals. These will be removed from the final result.
These are all identifiers:
- /N: the general name/title of the video
- /S: the name of the series
- /s: the number of the season
- /e: the number of the episode
- /L: the main audience language of the episode
- /A: the spoken (audio) language of the episode
- /V: the subtitle (video) language of the episode
- /T: the type of translation
- /y: the release year
If those identifiers are found in the given expression, they are replaced by their respective meaning. Identifiers do not always have a value. Depending on the specific video, some identifiers will simply be removed, because they are replaced with no text. To better control this, there are segments. These are covered further down this document.
- //: Means the OS specific directory separator ("/" on Unix, "\" on Windows)
Works in the same way as identifiers. They however always have a constant, non variable value. Therefore it's not possible to build negative identifiers out of them. They are covered under the segment section.
- /, \, [, ], :, *, ?, ", <, >, |
Illegal characters in the expression will be removed. Illegal characters typically are characters, which can not be used in the name of a file. This includes Windows specific illegals and folder separators. You should use the "//" literal to make use of directories.
There are special identifiers to mark segments:
- /[: Beginning of a segment
- /]: End of a segment
The segment will only be displayed in the final result if the other identifiers inside that segment can successfully be filled in. You can nest segments inside other segments. Be aware though, that segments have no impact on its surrounding segments. So if the inner segment can not be displayed because there's a empty identifier inside, the outer segment may still be visible in the final result with the inner segment being removed.
In each of these segments you can make use of negative identifiers. Negative identifiers make
the segment they are in only visible if there exists no value for them.
They can be created by putting a "!" directly after "/" of each identifier. For
example /[S/sN/e/]/[/!sEpisode /e] would create "Episode 1" for the first Episode which doesn't have a
season number. If it has one, it creates "S1E1" (assuming it's the first season).
Positive identifiers are the counterpart to negative identifiers: They make the segment visible only if there exists a value for them. It should be noted, that these don't display the according value, unlike the normal identifier does. They are written like negative identifiers but the "!" is replaced by a "?". For example the title identifier: /T, /!T, /?T