[FEATURE] Simplify TV Show Collection Preset (#953)
Simplifies TV Show Collection presets, drastically. Old version:
```
rick_a_tv_show_collection:
preset:
- "jellyfin_tv_show_collection"
- "season_by_collection__episode_by_year_month_day_reversed"
- "collection_season_1"
- "collection_season_2"
overrides:
tv_show_name: "Rick A"
collection_season_1_url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
collection_season_1_name: "All Videos"
collection_season_2_url: "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc"
collection_season_2_name: "Official Music Videos"
```
New version:
```
Jellyfin TV Show Collection:
"~Rick A":
s01_name: "All Videos"
s01_url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
s02_name: "Official Music Videos"
s02_url: "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc"
```
This commit is contained in:
parent
d5e647554e
commit
083db0d9dc
10 changed files with 754 additions and 804 deletions
27
README.md
27
README.md
|
|
@ -71,13 +71,8 @@ __preset__:
|
|||
cookiefile: "/config/cookie.txt"
|
||||
|
||||
###################################################################
|
||||
# Subscriptions nested under this will use the
|
||||
# `Plex TV Show by Date` preset.
|
||||
#
|
||||
# Can choose between:
|
||||
# - Plex TV Show by Date:
|
||||
# - Jellyfin TV Show by Date:
|
||||
# - Kodi TV Show by Date:
|
||||
# TV Show Presets. Can replace Plex with Plex/Jellyfin/Kodi
|
||||
|
||||
Plex TV Show by Date:
|
||||
|
||||
# Sets genre tag to "Documentaries"
|
||||
|
|
@ -101,9 +96,18 @@ Plex TV Show by Date:
|
|||
= News | Only Recent:
|
||||
"BBC News": "https://www.youtube.com/@BBCNews"
|
||||
|
||||
Plex TV Show Collection:
|
||||
= Music:
|
||||
# Prefix with ~ to set specific override variables
|
||||
"~Beyond the Guitar":
|
||||
s01_name: "Videos"
|
||||
s01_url: "https://www.youtube.com/c/BeyondTheGuitar"
|
||||
s02_name: "Covers"
|
||||
s02_url: "https://www.youtube.com/playlist?list=PLE62gWlWZk5NWVAVuf0Lm9jdv_-_KXs0W"
|
||||
|
||||
###################################################################
|
||||
# Subscriptions nested under these will use the various prebuilt
|
||||
# music presets
|
||||
# Music Presets. Can replace Plex with Plex/Jellyfin/Kodi
|
||||
|
||||
YouTube Releases:
|
||||
= Jazz: # Sets genre tag to "Jazz"
|
||||
"Thelonious Monk": "https://www.youtube.com/@theloniousmonk3870/releases"
|
||||
|
|
@ -124,10 +128,7 @@ Bandcamp:
|
|||
"Emily Hopkins": "https://emilyharpist.bandcamp.com/"
|
||||
|
||||
###################################################################
|
||||
# Can choose between:
|
||||
# - Plex Music Videos:
|
||||
# - Jellyfin Music Videos:
|
||||
# - Kodi Music Videos:
|
||||
# Music Video Presets
|
||||
"Plex Music Videos":
|
||||
= Pop: # Sets genre tag to "Pop"
|
||||
"Rick Astley": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc"
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@ Below is an example that downloads a YouTube playlist:
|
|||
|
||||
presets:
|
||||
playlist_preset_ex:
|
||||
download:
|
||||
download_strategy: "url"
|
||||
url: "{url}"
|
||||
download: "{url}"
|
||||
output_options:
|
||||
output_directory: "{output_directory}/{playlist_name}"
|
||||
file_name: "{playlist_name}.{title}.{ext}"
|
||||
|
|
|
|||
|
|
@ -38,17 +38,39 @@ TV Show by Date
|
|||
|
||||
TV Show by Date will organize something like a YouTube channel or playlist into a tv show, where seasons and episodes are organized using upload date.
|
||||
|
||||
Plug and Play Presets
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can use any of these presets in your ``subscriptions.yaml`` as a "One size fits all" solution- they should set all appropriate values. These will organize seasons by year and episodes by month, then day.
|
||||
|
||||
Must define ``tv_show_directory``
|
||||
Example
|
||||
~~~~~~~
|
||||
Must define ``tv_show_directory``. Available presets:
|
||||
|
||||
* ``"Kodi TV Show by Date"``
|
||||
* ``"Jellyfin TV Show by Date"``
|
||||
* ``"Plex TV Show by Date"``
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
__preset__:
|
||||
overrides:
|
||||
tv_show_directory: "/tv_shows"
|
||||
|
||||
Plex TV Show by Date:
|
||||
|
||||
# Sets genre tag to "Documentaries"
|
||||
= Documentaries:
|
||||
"NOVA PBS": "https://www.youtube.com/@novapbs"
|
||||
"National Geographic": "https://www.youtube.com/@NatGeo"
|
||||
"Cosmos - What If": "https://www.youtube.com/playlist?list=PLZdXRHYAVxTJno6oFF9nLGuwXNGYHmE8U"
|
||||
|
||||
# Sets genre tag to "Kids", "TV-Y" for content rating
|
||||
= Kids | = TV-Y:
|
||||
"Jake Trains": "https://www.youtube.com/@JakeTrains"
|
||||
"Kids Toys Play": "https://www.youtube.com/@KidsToysPlayChannel"
|
||||
|
||||
= Music:
|
||||
# TV show subscriptions can support multiple urls and store in the same TV Show
|
||||
"Rick Beato":
|
||||
- "https://www.youtube.com/@RickBeato"
|
||||
- "https://www.youtube.com/@rickbeato240"
|
||||
|
||||
Advanced Usage
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
|
@ -71,43 +93,13 @@ And then add one of these:
|
|||
|
||||
* Episodes are numbered by the download order. NOTE that this is fetched using the length of the download archive. Do not use if you intend to remove old videos.
|
||||
|
||||
An example of a subscription that will be played on Kodi, organized by year with the most recent episode at the top (having a lower episode number), with a genre of "Pop":
|
||||
|
||||
.. code-block:: yaml
|
||||
:caption: subscriptions.yaml
|
||||
|
||||
__preset__:
|
||||
overrides:
|
||||
tv_show_directory: "/tv_shows"
|
||||
|
||||
kodi_tv_show_by_date:
|
||||
season_by_year_episode_by_month_day_reversed:
|
||||
= Pop:
|
||||
"Rick A": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
|
||||
|
||||
You can also choose to combine multiple URLs into one show. This will result in your videos being downloaded to the same folder, and the episode numbers being shared between them (so you won't have two episode 10's, for example). Note that you may :ytdl-sub-gh:`experience issues <issues/833>` if you use more than 20 URLs at this time.
|
||||
|
||||
.. code-block:: yaml
|
||||
:caption: subscriptions.yaml
|
||||
|
||||
__preset__:
|
||||
overrides:
|
||||
tv_show_directory: "/tv_shows"
|
||||
|
||||
kodi_tv_show_by_date:
|
||||
season_by_year_episode_by_month_day_reversed:
|
||||
= Pop:
|
||||
"~Rick A":
|
||||
url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
|
||||
url2: "https://www.youtube.com/@just.rick_6"
|
||||
|
||||
|
||||
TV Show Collection
|
||||
------------------
|
||||
|
||||
TV Show Collections are made up of multiple URLs, where each URL is a season.
|
||||
If a video belongs to multiple URLs (i.e. a channel and a channel's playlist),
|
||||
it will resolve to the bottom-most season, as defined in the subscription.
|
||||
TV Show Collections set each URL as its own season. If a video belongs to multiple URLs
|
||||
(i.e. a channel and a channel's playlist), the video will only download once and reside in
|
||||
the higher-numbered season.
|
||||
|
||||
Two main use cases of a collection are:
|
||||
1. Organize a YouTube channel TV show where Season 1 contains any video
|
||||
|
|
@ -116,15 +108,41 @@ Two main use cases of a collection are:
|
|||
2. Organize one or more YouTube channels/playlists, where each season
|
||||
represents a separate channel/playlist.
|
||||
|
||||
Player Presets
|
||||
Example
|
||||
~~~~~~~
|
||||
Must define ``tv_show_directory``. Available presets:
|
||||
|
||||
* ``"Kodi TV Show Collection"``
|
||||
* ``"Jellyfin TV Show Collection"``
|
||||
* ``"Plex TV Show Collection"``
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
__preset__:
|
||||
overrides:
|
||||
tv_show_directory: "/tv_shows"
|
||||
|
||||
Plex TV Show Collection:
|
||||
= Music:
|
||||
# Prefix with ~ to set specific override variables
|
||||
"~Beyond the Guitar":
|
||||
s01_name: "Videos"
|
||||
s01_url: "https://www.youtube.com/c/BeyondTheGuitar"
|
||||
s02_name: "Covers"
|
||||
s02_url: "https://www.youtube.com/playlist?list=PLE62gWlWZk5NWVAVuf0Lm9jdv_-_KXs0W"
|
||||
|
||||
Advanced Usage
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
If you prefer a different organization method, you can instead apply multiple presets to your subscriptions.
|
||||
|
||||
You will need a base of one of the below:
|
||||
|
||||
* ``kodi_tv_show_collection``
|
||||
* ``jellyfin_tv_show_collection``
|
||||
* ``plex_tv_show_collection``
|
||||
|
||||
Episode Formatting Presets
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
And then add one of these:
|
||||
|
||||
* ``season_by_collection__episode_by_year_month_day``
|
||||
* ``season_by_collection__episode_by_year_month_day_reversed``
|
||||
|
|
@ -132,40 +150,3 @@ Episode Formatting Presets
|
|||
|
||||
* Only use playlist_index episode formatting for playlists that will be fully downloaded once and never again. Otherwise, indices can change.
|
||||
* ``season_by_collection__episode_by_playlist_index_reversed``
|
||||
|
||||
Season Presets
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
* ``collection_season_1``
|
||||
* ``collection_season_2``
|
||||
* ``collection_season_3``
|
||||
* ``collection_season_4``
|
||||
* ``...``
|
||||
* ``collection_season_40``
|
||||
|
||||
Example
|
||||
~~~~~~~
|
||||
|
||||
A preset/subscription requires specifying a player, episode formatting, and
|
||||
one or more season presets, with the following override variables:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
rick_a_tv_show_collection:
|
||||
preset:
|
||||
- "jellyfin_tv_show_collection"
|
||||
- "season_by_collection__episode_by_year_month_day_reversed"
|
||||
- "collection_season_1"
|
||||
- "collection_season_2"
|
||||
overrides:
|
||||
# required
|
||||
tv_show_name: "Rick A"
|
||||
tv_show_directory: "/path/to/youtube_shows"
|
||||
collection_season_1_url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
|
||||
collection_season_1_name: "All Videos"
|
||||
collection_season_2_url: "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc"
|
||||
collection_season_2_name: "Official Music Videos"
|
||||
# can be modified from their default value
|
||||
# tv_show_genre: "ytdl-sub"
|
||||
# episode_title: "{upload_date_standardized} - {title}"
|
||||
# episode_description: "{webpage_url}"
|
||||
|
|
@ -55,4 +55,21 @@ Plex TV Show by Date:
|
|||
|
||||
# Set "News" for genre, use `Only Recent` preset to only store videos uploaded recently
|
||||
= News | Only Recent:
|
||||
"BBC News": "https://www.youtube.com/@BBCNews"
|
||||
"BBC News": "https://www.youtube.com/@BBCNews"
|
||||
|
||||
# Sets URLs to be explicit seasons. If a video resides in multiple URLs, it will
|
||||
# only appear once in the higher-numbered season. This is how you can separate a channel's
|
||||
# videos and playlists you are interested in.
|
||||
#
|
||||
# Choose the player you intend to use by setting the top-level key to be either:
|
||||
# - Plex TV Show Collection:
|
||||
# - Jellyfin TV Show Collection:
|
||||
# - Kodi TV Show Collection:
|
||||
Plex TV Show Collection:
|
||||
= Music:
|
||||
"~Beyond the Guitar":
|
||||
s01_name: "Videos"
|
||||
s01_url: "https://www.youtube.com/c/BeyondTheGuitar"
|
||||
|
||||
s02_name: "Music Videos"
|
||||
s02_url: "https://www.youtube.com/playlist?list=PLE62gWlWZk5NWVAVuf0Lm9jdv_-_KXs0W"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ presets:
|
|||
|
||||
# Download using the multi_url strategy
|
||||
download:
|
||||
download_strategy: "multi_url"
|
||||
urls:
|
||||
# The first URL will be all the artist's tracks.
|
||||
# Treat these as singles - an album with a single track
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ class TvShowCollectionEpisodeFormattingPresets(PrebuiltPresets):
|
|||
|
||||
|
||||
class TvShowCollectionSeasonPresets(PrebuiltPresets):
|
||||
"""Now Deprecated"""
|
||||
|
||||
preset_names = {
|
||||
"collection_season_1",
|
||||
"collection_season_2",
|
||||
|
|
|
|||
|
|
@ -40,14 +40,6 @@ presets:
|
|||
|
||||
####################################################################################################
|
||||
|
||||
# TV show from a collection. Must specify additional `tv_show_collection_season` presets in
|
||||
# addition. Each season sets its own `collection_season_number/_padded`
|
||||
_tv_show_collection:
|
||||
overrides:
|
||||
collection_season_number_padded: "{ %pad_zero(%int(collection_season_number), 2) }"
|
||||
season_number: "{collection_season_number}"
|
||||
season_number_padded: "{collection_season_number_padded}"
|
||||
|
||||
_episode_video_tags:
|
||||
video_tags:
|
||||
show: "{tv_show_name}"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -26,7 +26,7 @@
|
|||
"Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).nfo": "cb0184784a8eda842cfaf851f6e6af7d",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|-thumb.jpg": "00ed383591779ffe98291de60f198fe9",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.info.json": "INFO_JSON",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.mp4": "5f9f8841aed3f5d95efbd1839045741e",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.mp4": "b20822d0f7217c9f0a0ccf83e33f8187",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.nfo": "54ea4a48116aa98480a79495036c25e9",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e112101 - Skyrim 'Ultra HD w⧸Mods' [PC]-thumb.jpg": "1718599d5189c65f7d8cf6acfa5ea851",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e112101 - Skyrim 'Ultra HD w⧸Mods' [PC].info.json": "INFO_JSON",
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ def test_tv_show_subscriptions(config_file: ConfigFile, tv_show_subscriptions_pa
|
|||
config=config_file, subscription_path=tv_show_subscriptions_path
|
||||
)
|
||||
|
||||
assert len(subs) == 7
|
||||
assert len(subs) == 8
|
||||
assert subs[3].name == "Jake Trains"
|
||||
jake_train_overrides = subs[3].overrides.script
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue