mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
Add video description to metadata
This commit is contained in:
parent
8a097f5f93
commit
1c1e5955b8
@ -6,6 +6,7 @@
|
||||
- "Add shell auto completion, see: https://twitch-dl.bezdomni.net/shell_completion.html"
|
||||
- "Add setting defaults via environment variables, see: https://twitch-dl.bezdomni.net/environment_variables.html"
|
||||
- "Add `download --concat` option to avoid using ffmeg for joinig vods and concat them instead. This will produce a `.ts` file by default."
|
||||
- "Add video description to metadata (#129)"
|
||||
|
||||
2.1.4:
|
||||
date: 2024-01-06
|
||||
|
@ -81,12 +81,16 @@ def _select_playlist_interactive(playlists):
|
||||
|
||||
|
||||
def _join_vods(playlist_path: str, target: str, overwrite: bool, video):
|
||||
description = video["description"] or ""
|
||||
description = description.strip()
|
||||
|
||||
command = [
|
||||
"ffmpeg",
|
||||
"-i", playlist_path,
|
||||
"-c", "copy",
|
||||
"-metadata", f"artist={video['creator']['displayName']}",
|
||||
"-metadata", f"title={video['title']}",
|
||||
"-metadata", f"description={description}",
|
||||
"-metadata", "encoded_by=twitch-dl",
|
||||
"-stats",
|
||||
"-loglevel", "warning",
|
||||
|
@ -91,6 +91,9 @@ def print_video(video):
|
||||
if channel or playing:
|
||||
print_out(" ".join([channel, playing]))
|
||||
|
||||
if video["description"]:
|
||||
print_out(f"Description: {video['description']}")
|
||||
|
||||
print_out(f"Published <blue>{published_at}</blue> Length: <blue>{length}</blue> ")
|
||||
print_out(f"<i>{url}</i>")
|
||||
|
||||
|
@ -56,6 +56,7 @@ def gql_raise_on_error(response: httpx.Response):
|
||||
VIDEO_FIELDS = """
|
||||
id
|
||||
title
|
||||
description
|
||||
publishedAt
|
||||
broadcastType
|
||||
lengthSeconds
|
||||
|
Loading…
Reference in New Issue
Block a user