fixed test, docs
This commit is contained in:
parent
5dd1fb1ece
commit
b47e1470a8
5 changed files with 28 additions and 39 deletions
|
|
@ -49,7 +49,7 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
html_theme_options = {"navigation_depth": 8}
|
||||
html_theme_options = {"navigation_depth": 10}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
|
|
|
|||
|
|
@ -7,30 +7,28 @@ ytdl-sub is configured in the ``config.yaml`` and consists of two sections:
|
|||
configuration:
|
||||
presets:
|
||||
|
||||
config.yaml
|
||||
-----------
|
||||
|
||||
configuration
|
||||
^^^^^^^^^^^^^
|
||||
-------------
|
||||
|
||||
The ``configuration`` section contains app-wide configs.
|
||||
|
||||
presets
|
||||
^^^^^^^
|
||||
-------
|
||||
|
||||
``presets`` define a `formula` for how to format downloaded media and metadata.
|
||||
|
||||
source
|
||||
""""""
|
||||
^^^^^^
|
||||
Download strategies dictate what exactly is getting downloaded from which
|
||||
source. By having separate strategies, we can define strategy-dependent
|
||||
parameters to better fine-tune how we download things.
|
||||
|
||||
youtube
|
||||
'''''''
|
||||
"""""""
|
||||
|
||||
channel
|
||||
.......
|
||||
'''''''
|
||||
.. code-block:: yaml
|
||||
|
||||
presets:
|
||||
|
|
@ -61,7 +59,7 @@ _____
|
|||
--------
|
||||
|
||||
playlist
|
||||
........
|
||||
''''''''
|
||||
.. code-block:: yaml
|
||||
|
||||
presets:
|
||||
|
|
@ -76,7 +74,7 @@ ___________
|
|||
--------
|
||||
|
||||
video
|
||||
.....
|
||||
'''''
|
||||
.. code-block:: yaml
|
||||
|
||||
presets:
|
||||
|
|
@ -91,10 +89,10 @@ ________
|
|||
--------
|
||||
|
||||
soundcloud
|
||||
''''''''''
|
||||
""""""""""
|
||||
|
||||
albums_and_singles
|
||||
..................
|
||||
''''''''''''''''''
|
||||
.. code-block:: yaml
|
||||
|
||||
presets:
|
||||
|
|
@ -113,49 +111,49 @@ ____________________
|
|||
--------
|
||||
|
||||
output_options
|
||||
""""""""""""""
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
output_directory
|
||||
''''''''''''''''
|
||||
""""""""""""""""
|
||||
.. autoproperty:: ytdl_sub.config.preset_options.OutputOptions.output_directory
|
||||
|
||||
file_name
|
||||
'''''''''
|
||||
"""""""""
|
||||
.. autoproperty:: ytdl_sub.config.preset_options.OutputOptions.file_name
|
||||
|
||||
thumbnail_name
|
||||
''''''''''''''
|
||||
""""""""""""""
|
||||
.. autoproperty:: ytdl_sub.config.preset_options.OutputOptions.thumbnail_name
|
||||
|
||||
maintain_download_archive
|
||||
'''''''''''''''''''''''''
|
||||
"""""""""""""""""""""""""
|
||||
.. autoproperty:: ytdl_sub.config.preset_options.OutputOptions.maintain_download_archive
|
||||
|
||||
keep_files
|
||||
''''''''''
|
||||
""""""""""
|
||||
.. autoproperty:: ytdl_sub.config.preset_options.OutputOptions.keep_files
|
||||
|
||||
YTDL Options
|
||||
""""""""""""
|
||||
^^^^^^^^^^^^
|
||||
TODO
|
||||
|
||||
Overrides
|
||||
"""""""""
|
||||
^^^^^^^^^
|
||||
TODO
|
||||
|
||||
Plugins
|
||||
"""""""
|
||||
^^^^^^^
|
||||
|
||||
Music Tags
|
||||
''''''''''
|
||||
""""""""""
|
||||
TODO
|
||||
|
||||
NFO
|
||||
'''
|
||||
"""
|
||||
TODO
|
||||
|
||||
NFO Output Directory
|
||||
''''''''''''''''''''
|
||||
""""""""""""""""""""
|
||||
TODO
|
||||
|
||||
Format Variables
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Contents
|
|||
========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 5
|
||||
:maxdepth: 10
|
||||
|
||||
getting_started
|
||||
config
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class YoutubeChannelDownloaderOptions(YoutubeDownloaderOptions, DateRangeValidat
|
|||
like `UCsvn_Po0SmunchJYOWpOxMg`. You can get this by opening a video and clicking on the
|
||||
channel's avatar image to take you to their channel, then check the url.
|
||||
"""
|
||||
return self.channel_id
|
||||
return self._channel_id.value
|
||||
|
||||
@property
|
||||
def channel_avatar_path(self) -> Optional[OverridesStringFormatterValidator]:
|
||||
|
|
@ -203,20 +203,11 @@ class YoutubeChannelDownloader(YoutubeDownloader[YoutubeChannelDownloaderOptions
|
|||
"""Returns full channel url"""
|
||||
return f"https://youtube.com/channel/{channel_id}"
|
||||
|
||||
@property
|
||||
def channel_id(self) -> str:
|
||||
"""
|
||||
Returns
|
||||
-------
|
||||
Channel ID
|
||||
"""
|
||||
return self.download_options.channel_id.value
|
||||
|
||||
def download(self) -> List[YoutubeVideo]:
|
||||
"""
|
||||
Downloads all videos from a channel
|
||||
"""
|
||||
channel_url = self.channel_url(channel_id=self.channel_id)
|
||||
channel_url = self.channel_url(channel_id=self.download_options.channel_id)
|
||||
channel_videos: List[YoutubeVideo] = []
|
||||
ytdl_options_overrides = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ def expected_full_channel_download():
|
|||
return ExpectedDownload(
|
||||
expected_md5_file_hashes={
|
||||
# Download mapping
|
||||
Path("pz/.ytdl-subscribe-pz-download-mapping.json"): "add71021318bf87a3facb965fd38bd7f",
|
||||
Path("pz/.ytdl-sub-pz-download-archive.json"): "add71021318bf87a3facb965fd38bd7f",
|
||||
|
||||
# Output directory files
|
||||
Path("pz/fanart.jpg"): "e6e323373c8902568e96e374817179cf",
|
||||
|
|
@ -158,7 +158,7 @@ def expected_recent_channel_download():
|
|||
return ExpectedDownload(
|
||||
expected_md5_file_hashes={
|
||||
# Download mapping
|
||||
Path("pz/.ytdl-subscribe-pz-download-mapping.json"): "a133d9ea8a63e239cd41b799b9031fd5",
|
||||
Path("pz/.ytdl-sub-pz-download-archive.json"): "a133d9ea8a63e239cd41b799b9031fd5",
|
||||
|
||||
# Output directory files
|
||||
Path("pz/fanart.jpg"): "e6e323373c8902568e96e374817179cf",
|
||||
|
|
@ -205,7 +205,7 @@ def expected_rolling_recent_channel_download():
|
|||
return ExpectedDownload(
|
||||
expected_md5_file_hashes={
|
||||
# Download mapping
|
||||
Path("pz/.ytdl-subscribe-pz-download-mapping.json"): "8013b4d2ba6921c9347c014ac915e3f6",
|
||||
Path("pz/.ytdl-sub-pz-download-archive.json"): "8013b4d2ba6921c9347c014ac915e3f6",
|
||||
|
||||
# Output directory files
|
||||
Path("pz/fanart.jpg"): "e6e323373c8902568e96e374817179cf",
|
||||
|
|
|
|||
Loading…
Reference in a new issue