[FEATURE] download_index source variable, new tv presets (#271)

This commit is contained in:
Jesse Bannon 2022-10-05 12:08:43 -07:00 committed by GitHub
parent dc7b47d29b
commit 5b8ee7f2de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 602 additions and 6 deletions

View file

@ -29,6 +29,10 @@ Episode Formatting Presets
* ``season_by_year__episode_by_month_day_reversed``
* Episode numbers are reversed, meaning more recent episodes appear at the
top of a season by having a lower value.
* ``season_by_year__episode_by_download_index``
* Episodes are numbered by the download order. NOTE that this fetched using
the length of the download archive. Do not use if you intend to remove
old videos.
Usage
"""""
@ -80,7 +84,8 @@ Episode Formatting Presets
* ``season_by_collection__episode_by_year_month_day_reversed``
* ``season_by_collection__episode_by_playlist_index``
* Only use playlist_index episode formatting for playlists that
will never change. Otherwise, indices get messed up.
will be fully downloaded once and never again. Otherwise,
indices can change.
* ``season_by_collection__episode_by_playlist_index_reversed``
Season Presets

View file

@ -32,6 +32,7 @@ from ytdl_sub.downloaders.ytdl_options_builder import YTDLOptionsBuilder
from ytdl_sub.entries.base_entry import BaseEntry
from ytdl_sub.entries.entry import Entry
from ytdl_sub.entries.entry_parent import EntryParent
from ytdl_sub.entries.variables.kwargs import DOWNLOAD_INDEX
from ytdl_sub.entries.variables.kwargs import PLAYLIST_ENTRY
from ytdl_sub.entries.variables.kwargs import REQUESTED_SUBTITLES
from ytdl_sub.entries.variables.kwargs import SOURCE_ENTRY
@ -391,11 +392,14 @@ class Downloader(DownloadArchiver, Generic[DownloaderOptionsT], ABC):
upload_date_idx = self._enhanced_download_archive.mapping.get_num_entries_with_upload_date(
upload_date_standardized=entry.upload_date_standardized
)
download_idx = self._enhanced_download_archive.mapping.get_num_entries()
entry.add_kwargs(
{
# Workaround for the yt-dlp issue that does not include subs in playlist downloads
REQUESTED_SUBTITLES: download_entry.kwargs_get(REQUESTED_SUBTITLES),
# Tracks number of entries downloaded
DOWNLOAD_INDEX: download_idx,
# Tracks number of entries with the same upload date to make them unique
UPLOAD_DATE_INDEX: upload_date_idx,
}

View file

@ -5,6 +5,7 @@ from yt_dlp.utils import sanitize_filename
from ytdl_sub.entries.base_entry import BaseEntry
from ytdl_sub.entries.base_entry import BaseEntryVariables
from ytdl_sub.entries.variables.kwargs import CHANNEL
from ytdl_sub.entries.variables.kwargs import DOWNLOAD_INDEX
from ytdl_sub.entries.variables.kwargs import EXT
from ytdl_sub.entries.variables.kwargs import PLAYLIST_COUNT
from ytdl_sub.entries.variables.kwargs import PLAYLIST_DESCRIPTION
@ -379,6 +380,27 @@ class EntryVariables(BaseEntryVariables):
"""
return "jpg"
@property
def download_index(self: Self) -> int:
"""
Returns
-------
int
The i'th entry downloaded. NOTE that this is fetched dynamically from the download
archive.
"""
return self.kwargs_get(DOWNLOAD_INDEX, 0) + 1
@property
def download_index_padded6(self: Self) -> str:
"""
Returns
-------
str
The download_index padded six digits
"""
return pad(self.download_index, 6)
@property
def upload_date_index(self: Self) -> int:
"""

View file

@ -40,6 +40,7 @@ PLAYLIST_UPLOADER = _("playlist_uploader")
PLAYLIST_UPLOADER_ID = _("playlist_uploader_id")
PLAYLIST_UPLOADER_URL = _("playlist_uploader_url")
DOWNLOAD_INDEX = _("download_index", backend=True)
UPLOAD_DATE_INDEX = _("upload_date_index", backend=True)
REQUESTED_SUBTITLES = _("requested_subtitles", backend=True)
UID = _("id")

View file

@ -22,6 +22,7 @@ TV_SHOW_BY_DATE = "_tv_show_by_date"
SEASON_YEAR__EPISODE_MONTH_DAY = "season_by_year__episode_by_month_day"
SEASON_YEAR__EPISODE_MONTH_DAY_REVERSED = "season_by_year__episode_by_month_day_reversed"
SEASON_YEAR__EPISODE_UPLOAD_INDEX = "season_by_year__episode_by_upload_index"
SEASON_YEAR_MONTH__EPISODE_DAY = "season_by_year_month__episode_by_day"
#####################################################
@ -118,6 +119,11 @@ class TvShowByDateEpisodeFormattingPresets(PrebuiltPresets):
"""
return self._document_preset()
@property
def season_by_year__episode_by_download_index(self) -> Preset:
"""DOC"""
return self._document_preset()
class TvShowCollectionPresets(PrebuiltPresets):
"""

View file

@ -96,6 +96,14 @@ presets:
episode_number: "{upload_day_of_year_reversed}{upload_date_index_reversed_padded}"
episode_number_padded: "{upload_day_of_year_reversed_padded}{upload_date_index_reversed_padded}"
season_by_year__episode_by_download_index:
preset:
- "_episode_base"
- "_season_by_year"
overrides:
episode_number: "{download_index}"
episode_number_padded: "{download_index_padded6}"
###############
season_by_collection__episode_by_year_month_day:

View file

@ -189,7 +189,7 @@ class DownloadMappings:
-------
True if there are no entry mappings. False otherwise.
"""
return len(self._entry_mappings) == 0
return self.get_num_entries() == 0
def add_entry(self, entry: Entry, entry_file_path: str) -> "DownloadMappings":
"""
@ -242,6 +242,14 @@ class DownloadMappings:
[_ for _ in self._entry_mappings.values() if _.upload_date == upload_date_standardized]
)
def get_num_entries(self) -> int:
"""
Returns
-------
Number of entries in the mapping
"""
return len(self._entry_mappings)
def get_entries_out_of_range(self, date_range: DateRange) -> Dict[str, DownloadMapping]:
"""
Parameters

View file

@ -117,7 +117,7 @@ def assert_expected_downloads(
dry_run: bool,
expected_download_summary_file_name: str,
ignore_md5_hashes_for: Optional[List[str]] = None,
regenerate_expected_download_summary: bool = True,
regenerate_expected_download_summary: bool = False,
):
if dry_run:
output_directory_contents = list(Path(output_directory).rglob("*"))

View file

@ -12,7 +12,7 @@ def assert_transaction_log_matches(
output_directory: str,
transaction_log: FileHandlerTransactionLog,
transaction_log_summary_file_name: str,
regenerate_transaction_log: bool = True,
regenerate_transaction_log: bool = False,
):
"""
Parameters

View file

@ -1,6 +1,6 @@
{
"Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3-thumb.jpg": "662fcaadf6e80d63591bac19a5fdffb0",
"Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "c0cdbc58669859a3f85e1bd4f0d1c424",
"Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4": "14d83cb2ee79d372b3b862d95c2f7a43",
"Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "c6f7178b1efc57282dabbca958785d69",
"Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4": "3c4e0cf1cefe6bf55adbbb1d809bbd04",
"Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo": "cacf09ab38f9b3085da9c5af516cf22a"
}

View file

@ -0,0 +1,17 @@
{
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/.ytdl-sub-subscription_test-download-archive.json": "1210f444aedd73ae2783f5af91fb3d2a",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3.mp4": "80fcdb781cf92c93bbec03746a115837",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3.nfo": "a2c8a022fc847306a7532d2b4cd232c3",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2.mp4": "f367e1d39e69a05455c90665e2216c7b",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2.nfo": "337afe160ce5853e77c65ebd932654e1",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1.mp4": "0285aa0e54c1d7924e0150da8cc968c8",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1.nfo": "04b12a58853b0908e5c85ae51400577d",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1.mp4": "eeb33439e6bfe14b364e1709052c7293",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1.nfo": "dee10981e2e573f39c48cb5f6d300120",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/poster.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/tvshow.nfo": "ee3b3f5ddd0992a5d6c6b61e0f486cd0"
}

View file

@ -0,0 +1,18 @@
{
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/.ytdl-sub-subscription_test-download-archive.json": "1210f444aedd73ae2783f5af91fb3d2a",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3.mp4": "1b178e261a0eae1d02f233d22d6f979f",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3.nfo": "a2c8a022fc847306a7532d2b4cd232c3",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2.mp4": "66a6f2b7fd965e1913c0b542f8e2f6e5",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2.nfo": "337afe160ce5853e77c65ebd932654e1",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1.mp4": "c1ae890c170ddc0dfb09e322b8d6abde",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1.nfo": "04b12a58853b0908e5c85ae51400577d",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1.mp4": "401adfe88764f2b38f0dcd9c7ce4a91d",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1.nfo": "dee10981e2e573f39c48cb5f6d300120",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/fanart.jpg": "15c9a67b554f415a662fdf7a3340cd61",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/poster.jpg": "0b0fdbe56bab3e3fdda18730588d742a",
"unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/tvshow.nfo": "d8684087d7f81fbc0a9d5af1dd562f73"
}

View file

@ -0,0 +1,17 @@
{
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/.ytdl-sub-subscription_test-download-archive.json": "1210f444aedd73ae2783f5af91fb3d2a",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3.mp4": "5a3dff1da0568bc48e1523267d1e0bd5",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3.nfo": "a2c8a022fc847306a7532d2b4cd232c3",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2.mp4": "e79db21572d7be45153a0c6f0d2e91c4",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2.nfo": "337afe160ce5853e77c65ebd932654e1",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1.mp4": "d1a3521c555f5bd9de9b6c9bc50d6067",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1.nfo": "04b12a58853b0908e5c85ae51400577d",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1.mp4": "b6450bb0cecd83ced0bae0612a33481f",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1.nfo": "dee10981e2e573f39c48cb5f6d300120",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/poster.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/tvshow.nfo": "b28b526b1b6b90e549b32359050c4fcc"
}

View file

@ -0,0 +1,18 @@
{
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/.ytdl-sub-subscription_test-download-archive.json": "1210f444aedd73ae2783f5af91fb3d2a",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3.mp4": "37c2b30a41f16c01ce1769ee24e1182b",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3.nfo": "a2c8a022fc847306a7532d2b4cd232c3",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2.mp4": "198e26e1d9e9fe45f8e4d59da1e577f9",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2.nfo": "337afe160ce5853e77c65ebd932654e1",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1.mp4": "5dc0930a217d10ec75d1013ac7ed2c55",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1.nfo": "04b12a58853b0908e5c85ae51400577d",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1.mp4": "2915935e0a5a60d6e581f336b77c834a",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1.nfo": "dee10981e2e573f39c48cb5f6d300120",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/fanart.jpg": "15c9a67b554f415a662fdf7a3340cd61",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/poster.jpg": "0b0fdbe56bab3e3fdda18730588d742a",
"unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/tvshow.nfo": "8289ee91a7898ee4c3708f868609f42d"
}

View file

@ -0,0 +1,12 @@
{
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/.ytdl-sub-subscription_test-download-archive.json": "37d49d806cb9943250237dc05a54def9",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000001 - 20-3.mp4": "aedfcf811a6b868aefbd3a5531198f88",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000002 - 20-2.mp4": "b35f9146f22563739e5d5b92bf830d42",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2020/s2020.e000003 - 20-1.mp4": "a956b01cc3edf37ce07a9efa1adb884a",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/Season 2021/s2021.e000004 - 21-1.mp4": "5cc43c84fd2646ae50bd5523213c3fb0",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0/poster.jpg": "e80c508c4818454300133fe1dc1a9cd7"
}

View file

@ -0,0 +1,13 @@
{
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/.ytdl-sub-subscription_test-download-archive.json": "37d49d806cb9943250237dc05a54def9",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000001 - 20-3.mp4": "661f2008605b7019e837c81c7ab7e23e",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000002 - 20-2.mp4": "de610b7795466eb3082ff75f7bd98b40",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2020/s2020.e000003 - 20-1.mp4": "38332b89050892d497feea4580dd18d6",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/Season 2021/s2021.e000004 - 21-1.mp4": "1f5b96e1bdb88f8bf73ffd689f83783e",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/fanart.jpg": "15c9a67b554f415a662fdf7a3340cd61",
"unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1/poster.jpg": "0b0fdbe56bab3e3fdda18730588d742a"
}

View file

@ -0,0 +1,87 @@
Files created:
----------------------------------------
{output_directory}
.ytdl-sub-subscription_test-download-archive.json
poster.jpg
tvshow.nfo
NFO tags:
tvshow:
title: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
{output_directory}/Season 2020
s2020.e000001 - 20-3-thumb.jpg
s2020.e000001 - 20-3.mp4
Video Tags:
date: 2020-08-07
episode_id: 1
season_number: 2020
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-3.com
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000001 - 20-3.nfo
NFO tags:
episodedetails:
aired: 2020-08-07
episode: 1
plot: https://20-3.com
season: 2020
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000002 - 20-2-thumb.jpg
s2020.e000002 - 20-2.mp4
Video Tags:
date: 2020-08-08
episode_id: 2
season_number: 2020
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-2.com
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000002 - 20-2.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 2
plot: https://20-2.com
season: 2020
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000003 - 20-1-thumb.jpg
s2020.e000003 - 20-1.mp4
Video Tags:
date: 2020-08-08
episode_id: 3
season_number: 2020
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-1.com
title: 2020-08-08 - Mock Entry 20-1
year: 2020
s2020.e000003 - 20-1.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 3
plot: https://20-1.com
season: 2020
title: 2020-08-08 - Mock Entry 20-1
year: 2020
{output_directory}/Season 2021
s2021.e000004 - 21-1-thumb.jpg
s2021.e000004 - 21-1.mp4
Video Tags:
date: 2021-08-08
episode_id: 4
season_number: 2021
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://21-1.com
title: 2021-08-08 - Mock Entry 21-1
year: 2021
s2021.e000004 - 21-1.nfo
NFO tags:
episodedetails:
aired: 2021-08-08
episode: 4
plot: https://21-1.com
season: 2021
title: 2021-08-08 - Mock Entry 21-1
year: 2021

View file

@ -0,0 +1,88 @@
Files created:
----------------------------------------
{output_directory}
.ytdl-sub-subscription_test-download-archive.json
fanart.jpg
poster.jpg
tvshow.nfo
NFO tags:
tvshow:
title: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
{output_directory}/Season 2020
s2020.e000001 - 20-3-thumb.jpg
s2020.e000001 - 20-3.mp4
Video Tags:
date: 2020-08-07
episode_id: 1
season_number: 2020
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-3.com
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000001 - 20-3.nfo
NFO tags:
episodedetails:
aired: 2020-08-07
episode: 1
plot: https://20-3.com
season: 2020
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000002 - 20-2-thumb.jpg
s2020.e000002 - 20-2.mp4
Video Tags:
date: 2020-08-08
episode_id: 2
season_number: 2020
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-2.com
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000002 - 20-2.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 2
plot: https://20-2.com
season: 2020
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000003 - 20-1-thumb.jpg
s2020.e000003 - 20-1.mp4
Video Tags:
date: 2020-08-08
episode_id: 3
season_number: 2020
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-1.com
title: 2020-08-08 - Mock Entry 20-1
year: 2020
s2020.e000003 - 20-1.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 3
plot: https://20-1.com
season: 2020
title: 2020-08-08 - Mock Entry 20-1
year: 2020
{output_directory}/Season 2021
s2021.e000004 - 21-1-thumb.jpg
s2021.e000004 - 21-1.mp4
Video Tags:
date: 2021-08-08
episode_id: 4
season_number: 2021
show: unit_jellyfin_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://21-1.com
title: 2021-08-08 - Mock Entry 21-1
year: 2021
s2021.e000004 - 21-1.nfo
NFO tags:
episodedetails:
aired: 2021-08-08
episode: 4
plot: https://21-1.com
season: 2021
title: 2021-08-08 - Mock Entry 21-1
year: 2021

View file

@ -0,0 +1,87 @@
Files created:
----------------------------------------
{output_directory}
.ytdl-sub-subscription_test-download-archive.json
poster.jpg
tvshow.nfo
NFO tags:
tvshow:
title: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
{output_directory}/Season 2020
s2020.e000001 - 20-3-thumb.jpg
s2020.e000001 - 20-3.mp4
Video Tags:
date: 2020-08-07
episode_id: 1
season_number: 2020
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-3.com
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000001 - 20-3.nfo
NFO tags:
episodedetails:
aired: 2020-08-07
episode: 1
plot: https://20-3.com
season: 2020
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000002 - 20-2-thumb.jpg
s2020.e000002 - 20-2.mp4
Video Tags:
date: 2020-08-08
episode_id: 2
season_number: 2020
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-2.com
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000002 - 20-2.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 2
plot: https://20-2.com
season: 2020
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000003 - 20-1-thumb.jpg
s2020.e000003 - 20-1.mp4
Video Tags:
date: 2020-08-08
episode_id: 3
season_number: 2020
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-1.com
title: 2020-08-08 - Mock Entry 20-1
year: 2020
s2020.e000003 - 20-1.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 3
plot: https://20-1.com
season: 2020
title: 2020-08-08 - Mock Entry 20-1
year: 2020
{output_directory}/Season 2021
s2021.e000004 - 21-1-thumb.jpg
s2021.e000004 - 21-1.mp4
Video Tags:
date: 2021-08-08
episode_id: 4
season_number: 2021
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://21-1.com
title: 2021-08-08 - Mock Entry 21-1
year: 2021
s2021.e000004 - 21-1.nfo
NFO tags:
episodedetails:
aired: 2021-08-08
episode: 4
plot: https://21-1.com
season: 2021
title: 2021-08-08 - Mock Entry 21-1
year: 2021

View file

@ -0,0 +1,88 @@
Files created:
----------------------------------------
{output_directory}
.ytdl-sub-subscription_test-download-archive.json
fanart.jpg
poster.jpg
tvshow.nfo
NFO tags:
tvshow:
title: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
{output_directory}/Season 2020
s2020.e000001 - 20-3-thumb.jpg
s2020.e000001 - 20-3.mp4
Video Tags:
date: 2020-08-07
episode_id: 1
season_number: 2020
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-3.com
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000001 - 20-3.nfo
NFO tags:
episodedetails:
aired: 2020-08-07
episode: 1
plot: https://20-3.com
season: 2020
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000002 - 20-2-thumb.jpg
s2020.e000002 - 20-2.mp4
Video Tags:
date: 2020-08-08
episode_id: 2
season_number: 2020
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-2.com
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000002 - 20-2.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 2
plot: https://20-2.com
season: 2020
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000003 - 20-1-thumb.jpg
s2020.e000003 - 20-1.mp4
Video Tags:
date: 2020-08-08
episode_id: 3
season_number: 2020
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-1.com
title: 2020-08-08 - Mock Entry 20-1
year: 2020
s2020.e000003 - 20-1.nfo
NFO tags:
episodedetails:
aired: 2020-08-08
episode: 3
plot: https://20-1.com
season: 2020
title: 2020-08-08 - Mock Entry 20-1
year: 2020
{output_directory}/Season 2021
s2021.e000004 - 21-1-thumb.jpg
s2021.e000004 - 21-1.mp4
Video Tags:
date: 2021-08-08
episode_id: 4
season_number: 2021
show: unit_kodi_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://21-1.com
title: 2021-08-08 - Mock Entry 21-1
year: 2021
s2021.e000004 - 21-1.nfo
NFO tags:
episodedetails:
aired: 2021-08-08
episode: 4
plot: https://21-1.com
season: 2021
title: 2021-08-08 - Mock Entry 21-1
year: 2021

View file

@ -0,0 +1,47 @@
Files created:
----------------------------------------
{output_directory}
.ytdl-sub-subscription_test-download-archive.json
poster.jpg
{output_directory}/Season 2020
s2020.e000001 - 20-3-thumb.jpg
s2020.e000001 - 20-3.mp4
Video Tags:
date: 2020-08-07
episode_id: 1
season_number: 2020
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-3.com
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000002 - 20-2-thumb.jpg
s2020.e000002 - 20-2.mp4
Video Tags:
date: 2020-08-08
episode_id: 2
season_number: 2020
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-2.com
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000003 - 20-1-thumb.jpg
s2020.e000003 - 20-1.mp4
Video Tags:
date: 2020-08-08
episode_id: 3
season_number: 2020
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://20-1.com
title: 2020-08-08 - Mock Entry 20-1
year: 2020
{output_directory}/Season 2021
s2021.e000004 - 21-1-thumb.jpg
s2021.e000004 - 21-1.mp4
Video Tags:
date: 2021-08-08
episode_id: 4
season_number: 2021
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_0
synopsis: https://21-1.com
title: 2021-08-08 - Mock Entry 21-1
year: 2021

View file

@ -0,0 +1,48 @@
Files created:
----------------------------------------
{output_directory}
.ytdl-sub-subscription_test-download-archive.json
fanart.jpg
poster.jpg
{output_directory}/Season 2020
s2020.e000001 - 20-3-thumb.jpg
s2020.e000001 - 20-3.mp4
Video Tags:
date: 2020-08-07
episode_id: 1
season_number: 2020
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-3.com
title: 2020-08-07 - Mock Entry 20-3
year: 2020
s2020.e000002 - 20-2-thumb.jpg
s2020.e000002 - 20-2.mp4
Video Tags:
date: 2020-08-08
episode_id: 2
season_number: 2020
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-2.com
title: 2020-08-08 - Mock Entry 20-2
year: 2020
s2020.e000003 - 20-1-thumb.jpg
s2020.e000003 - 20-1.mp4
Video Tags:
date: 2020-08-08
episode_id: 3
season_number: 2020
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://20-1.com
title: 2020-08-08 - Mock Entry 20-1
year: 2020
{output_directory}/Season 2021
s2021.e000004 - 21-1-thumb.jpg
s2021.e000004 - 21-1.mp4
Video Tags:
date: 2021-08-08
episode_id: 4
season_number: 2021
show: unit_plex_tv_show_by_date_season_by_year__episode_by_download_index_is_yt_1
synopsis: https://21-1.com
title: 2021-08-08 - Mock Entry 21-1
year: 2021

View file

@ -75,6 +75,8 @@ def mock_entry_to_dict(
"uploader": "abc123",
"uploader_id": "abc123",
"uploader_url": "https://yourname.here",
"download_index": 1,
"download_index_padded6": "000001",
"upload_date_index": 1,
"upload_date_index_padded": "01",
"upload_date_index_reversed": 99,