release tests
This commit is contained in:
parent
d5c2bbfa6d
commit
2df455ebbf
12 changed files with 45 additions and 35 deletions
|
|
@ -91,26 +91,32 @@ Or for a specific preset
|
||||||
The following are supported. Be sure the combined season + episode ordering
|
The following are supported. Be sure the combined season + episode ordering
|
||||||
include the year, month, day, i.e. upload-year + upload-month-day.
|
include the year, month, day, i.e. upload-year + upload-month-day.
|
||||||
|
|
||||||
``tv_show_by_date_season_ordering``
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
* upload-year
|
Season Ordering
|
||||||
* upload-year-month
|
~~~~~~~~~~~~~~~
|
||||||
* release-year
|
|
||||||
* release-year-month
|
|
||||||
|
|
||||||
``tv_show_by_date_episode_ordering``
|
``tv_show_by_date_season_ordering`` supports one of the following:
|
||||||
|
|
||||||
|
* ``upload-year`` (default)
|
||||||
|
* ``upload-year-month``
|
||||||
|
* ``release-year``
|
||||||
|
* ``release-year-month``
|
||||||
|
|
||||||
|
|
||||||
|
Episode Ordering
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* upload-day
|
``tv_show_by_date_episode_ordering`` supports one of the following:
|
||||||
* upload-month-day
|
|
||||||
* upload-month-day-reversed
|
* ``upload-month-day`` (default)
|
||||||
|
* ``upload-month-day-reversed``
|
||||||
|
|
||||||
* Reversed means more recent episodes appear at the top of a season by having a lower value.
|
* Reversed means more recent episodes appear at the top of a season by having a lower value.
|
||||||
* release-day
|
* ``upload-day``
|
||||||
* release-month-day
|
* ``release-day``
|
||||||
* release-month-day-reversed
|
* ``release-month-day``
|
||||||
* download-index
|
* ``release-month-day-reversed``
|
||||||
|
* ``download-index``
|
||||||
|
|
||||||
* Episodes are numbered by the download order. **NOTE**: this is fetched using the length of the download archive. Do not use if you intend to remove old videos.
|
* Episodes are numbered by the download order. **NOTE**: this is fetched using the length of the download archive. Do not use if you intend to remove old videos.
|
||||||
|
|
||||||
|
|
@ -184,16 +190,19 @@ Or for a specific preset
|
||||||
|
|
||||||
The following are supported.
|
The following are supported.
|
||||||
|
|
||||||
``tv_show_collection_episode_ordering``
|
|
||||||
|
Episode Ordering
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* upload-year-month-day
|
``tv_show_collection_episode_ordering`` supports one of the following:
|
||||||
* upload-year-month-day-reversed
|
|
||||||
* release-year-month-day
|
|
||||||
* release-year-month-day-reversed
|
|
||||||
* playlist-index
|
|
||||||
|
|
||||||
* Only use playlist-index episode formatting for playlists that will be fully downloaded once and never again. Otherwise, indices can change.
|
* ``upload-year-month-day`` (default)
|
||||||
* playlist-index-reversed
|
* ``upload-year-month-day-reversed``
|
||||||
|
* ``release-year-month-day``
|
||||||
|
* ``release-year-month-day-reversed``
|
||||||
|
* ``playlist-index``
|
||||||
|
|
||||||
|
* Only use ``playlist-index`` episode formatting for playlists that will be fully downloaded once and never again. Otherwise, indices can change.
|
||||||
|
* ``playlist-index-reversed``
|
||||||
|
|
||||||
TV Show Collection presets use upload-year-month-day as the default.
|
TV Show Collection presets use upload-year-month-day as the default.
|
||||||
|
|
|
||||||
|
|
@ -531,8 +531,8 @@ class MultiUrlDownloader(SourcePlugin[MultiUrlValidator]):
|
||||||
download_logger.info("Entry rejected by download match-filter, skipping ..")
|
download_logger.info("Entry rejected by download match-filter, skipping ..")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
upload_date_idx = self._enhanced_download_archive.mapping.get_num_entries_with_upload_date(
|
upload_date_idx = self._enhanced_download_archive.mapping.get_num_entries_with_date(
|
||||||
upload_date_standardized=entry.get(v.upload_date_standardized, str)
|
standardized_date=entry.get(v.ytdl_sub_keep_files_date_eval, str)
|
||||||
)
|
)
|
||||||
download_idx = self._enhanced_download_archive.num_entries
|
download_idx = self._enhanced_download_archive.num_entries
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ presets:
|
||||||
thumbnail_name: "{thumbnail_file_name}"
|
thumbnail_name: "{thumbnail_file_name}"
|
||||||
info_json_name: "{episode_file_path}.{info_json_ext}"
|
info_json_name: "{episode_file_path}.{info_json_ext}"
|
||||||
maintain_download_archive: True
|
maintain_download_archive: True
|
||||||
|
keep_files_date_eval: "{episode_date_standardized}"
|
||||||
|
|
||||||
ytdl_options:
|
ytdl_options:
|
||||||
break_on_existing: True
|
break_on_existing: True
|
||||||
|
|
|
||||||
|
|
@ -248,11 +248,11 @@ class DownloadMappings:
|
||||||
del self._entry_mappings[entry_id]
|
del self._entry_mappings[entry_id]
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def get_num_entries_with_upload_date(self, upload_date_standardized: str) -> int:
|
def get_num_entries_with_date(self, standardized_date: str) -> int:
|
||||||
"""
|
"""
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
upload_date_standardized
|
standardized_date
|
||||||
A standardized upload date
|
A standardized upload date
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
|
|
@ -260,7 +260,7 @@ class DownloadMappings:
|
||||||
Number of entries in the mapping with this upload date
|
Number of entries in the mapping with this upload date
|
||||||
"""
|
"""
|
||||||
return len(
|
return len(
|
||||||
[_ for _ in self._entry_mappings.values() if _.upload_date == upload_date_standardized]
|
[_ for _ in self._entry_mappings.values() if _.upload_date == standardized_date]
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_num_entries(self) -> int:
|
def get_num_entries(self) -> int:
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
DISABLE_YOUTUBE_TESTS: bool = True
|
DISABLE_YOUTUBE_TESTS: bool = True
|
||||||
REGENERATE_FIXTURES: bool = False
|
REGENERATE_FIXTURES: bool = True
|
||||||
|
|
||||||
RESOURCE_PATH: Path = Path("tests") / "resources"
|
RESOURCE_PATH: Path = Path("tests") / "resources"
|
||||||
_FILE_FIXTURE_PATH: Path = RESOURCE_PATH / "file_fixtures"
|
_FILE_FIXTURE_PATH: Path = RESOURCE_PATH / "file_fixtures"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Best Prebuilt TV Show by Date/.ytdl-sub-subscription_test-download-archive.json": "04415c1fa29845362550a3175b8e04ba",
|
"Best Prebuilt TV Show by Date/.ytdl-sub-subscription_test-download-archive.json": "95d3790190cece6e49d2f4d5f68868b1",
|
||||||
"Best Prebuilt TV Show by Date/Season 200008/s200008.e0701 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
"Best Prebuilt TV Show by Date/Season 200008/s200008.e0701 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||||
"Best Prebuilt TV Show by Date/Season 200008/s200008.e0701 - Mock Entry 20-3.info.json": "INFO_JSON",
|
"Best Prebuilt TV Show by Date/Season 200008/s200008.e0701 - Mock Entry 20-3.info.json": "INFO_JSON",
|
||||||
"Best Prebuilt TV Show by Date/Season 200008/s200008.e0701 - Mock Entry 20-3.mp4": "6dd6860e8075e5e99c85e14729c41bdb",
|
"Best Prebuilt TV Show by Date/Season 200008/s200008.e0701 - Mock Entry 20-3.mp4": "6dd6860e8075e5e99c85e14729c41bdb",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Best Prebuilt TV Show by Date/.ytdl-sub-subscription_test-download-archive.json": "980e8fc95a180c37d086daca7cbf0a86",
|
"Best Prebuilt TV Show by Date/.ytdl-sub-subscription_test-download-archive.json": "1e8b4072d6d6aace4cac0c94ac0e711e",
|
||||||
"Best Prebuilt TV Show by Date/Season 2000/s2000.e14698 - Mock Entry 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
"Best Prebuilt TV Show by Date/Season 2000/s2000.e14698 - Mock Entry 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||||
"Best Prebuilt TV Show by Date/Season 2000/s2000.e14698 - Mock Entry 20-1.info.json": "INFO_JSON",
|
"Best Prebuilt TV Show by Date/Season 2000/s2000.e14698 - Mock Entry 20-1.info.json": "INFO_JSON",
|
||||||
"Best Prebuilt TV Show by Date/Season 2000/s2000.e14698 - Mock Entry 20-1.mp4": "f4846a3b9ee6a16df3348916077d6476",
|
"Best Prebuilt TV Show by Date/Season 2000/s2000.e14698 - Mock Entry 20-1.mp4": "f4846a3b9ee6a16df3348916077d6476",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Best Prebuilt TV Show by Date/.ytdl-sub-subscription_test-download-archive.json": "8f3393f91d67446ebe9f3715e5a4d071",
|
"Best Prebuilt TV Show by Date/.ytdl-sub-subscription_test-download-archive.json": "f13a43a83e725981df8417ab1d36705a",
|
||||||
"Best Prebuilt TV Show by Date/Season 2000/s2000.e080701 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
"Best Prebuilt TV Show by Date/Season 2000/s2000.e080701 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||||
"Best Prebuilt TV Show by Date/Season 2000/s2000.e080701 - Mock Entry 20-3.info.json": "INFO_JSON",
|
"Best Prebuilt TV Show by Date/Season 2000/s2000.e080701 - Mock Entry 20-3.info.json": "INFO_JSON",
|
||||||
"Best Prebuilt TV Show by Date/Season 2000/s2000.e080701 - Mock Entry 20-3.mp4": "219480c0ee2075ed86ccba740cca3d70",
|
"Best Prebuilt TV Show by Date/Season 2000/s2000.e080701 - Mock Entry 20-3.mp4": "219480c0ee2075ed86ccba740cca3d70",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "05ed34568687c712ac7aaaf653267651",
|
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "df87dea55d4f4076ab4c075a3bceaa3d",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e100052498 - Mock Entry 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e100052498 - Mock Entry 20-1-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e100052498 - Mock Entry 20-1.info.json": "INFO_JSON",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e100052498 - Mock Entry 20-1.info.json": "INFO_JSON",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e100052498 - Mock Entry 20-1.mp4": "170f6eaaa831b92e80ba798b5ae50b60",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e100052498 - Mock Entry 20-1.mp4": "170f6eaaa831b92e80ba798b5ae50b60",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "36c4e50c0d8e359fb75a13b99834a42d",
|
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "e89ac9f59f9f9ef22e01c9055708b81c",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e100052699 - Mock Entry 20-4-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e100052699 - Mock Entry 20-4-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e100052699 - Mock Entry 20-4.info.json": "INFO_JSON",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e100052699 - Mock Entry 20-4.info.json": "INFO_JSON",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e100052699 - Mock Entry 20-4.mp4": "1ea0b0274a45288449dddcb1c91a0ac7",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e100052699 - Mock Entry 20-4.mp4": "1ea0b0274a45288449dddcb1c91a0ac7",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "d864f3150e18bda48e86f180ec769651",
|
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "8f0390db6223f1c48072c28aabdc4162",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e00080701 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e00080701 - Mock Entry 20-3-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e00080701 - Mock Entry 20-3.info.json": "INFO_JSON",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e00080701 - Mock Entry 20-3.info.json": "INFO_JSON",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e00080701 - Mock Entry 20-3.mp4": "680b08a1e5032d89188def2784e62146",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e00080701 - Mock Entry 20-3.mp4": "680b08a1e5032d89188def2784e62146",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "f293f9cd2c5a2c54f7fd15839e074141",
|
"Best Prebuilt TV Show Collection/.ytdl-sub-subscription_test-download-archive.json": "b6ee943d41ca8b0f9b54bb9cb04da7de",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e00060601 - Mock Entry 20-7-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e00060601 - Mock Entry 20-7-thumb.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e00060601 - Mock Entry 20-7.info.json": "INFO_JSON",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e00060601 - Mock Entry 20-7.info.json": "INFO_JSON",
|
||||||
"Best Prebuilt TV Show Collection/Season 01/s01.e00060601 - Mock Entry 20-7.mp4": "a75f9d2b28d82b78ae30da3962f57f61",
|
"Best Prebuilt TV Show Collection/Season 01/s01.e00060601 - Mock Entry 20-7.mp4": "a75f9d2b28d82b78ae30da3962f57f61",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue