[FEATURE] height and width variables
This commit is contained in:
parent
faf9fd8a10
commit
cefa5a71f2
2 changed files with 32 additions and 0 deletions
|
|
@ -83,6 +83,13 @@ extractor_key
|
||||||
:description:
|
:description:
|
||||||
The yt-dlp extractor key
|
The yt-dlp extractor key
|
||||||
|
|
||||||
|
height
|
||||||
|
~~~~~~
|
||||||
|
:type: ``Integer``
|
||||||
|
:description:
|
||||||
|
Height in pixels of the video. If this value is unavailable (i.e. audio download), it
|
||||||
|
will default to 0.
|
||||||
|
|
||||||
ie_key
|
ie_key
|
||||||
~~~~~~
|
~~~~~~
|
||||||
:type: ``String``
|
:type: ``String``
|
||||||
|
|
@ -165,6 +172,13 @@ webpage_url
|
||||||
:description:
|
:description:
|
||||||
The url to the webpage.
|
The url to the webpage.
|
||||||
|
|
||||||
|
width
|
||||||
|
~~~~~
|
||||||
|
:type: ``Integer``
|
||||||
|
:description:
|
||||||
|
Width in pixels of the video. If this value is unavailable (i.e. audio download), it
|
||||||
|
will default to 0.
|
||||||
|
|
||||||
----------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Metadata Variables
|
Metadata Variables
|
||||||
|
|
|
||||||
|
|
@ -1093,6 +1093,24 @@ class EntryVariableDefinitions(ABC):
|
||||||
definition="{ {} }",
|
definition="{ {} }",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def height(self: "VariableDefinitions") -> IntegerMetadataVariable:
|
||||||
|
"""
|
||||||
|
:description:
|
||||||
|
Height in pixels of the video. If this value is unavailable (i.e. audio download), it
|
||||||
|
will default to 0.
|
||||||
|
"""
|
||||||
|
return IntegerMetadataVariable.from_entry(metadata_key="height", default=0)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def width(self: "VariableDefinitions") -> IntegerMetadataVariable:
|
||||||
|
"""
|
||||||
|
:description:
|
||||||
|
Width in pixels of the video. If this value is unavailable (i.e. audio download), it
|
||||||
|
will default to 0.
|
||||||
|
"""
|
||||||
|
return IntegerMetadataVariable.from_entry(metadata_key="width", default=0)
|
||||||
|
|
||||||
|
|
||||||
class VariableDefinitions(
|
class VariableDefinitions(
|
||||||
EntryVariableDefinitions,
|
EntryVariableDefinitions,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue