94 lines
5.4 KiB
Python
94 lines
5.4 KiB
Python
from datetime import UTC, datetime
|
|
|
|
DEFAULT_PRESET_UPDATED_AT: datetime = datetime(2026, 1, 25, tzinfo=UTC)
|
|
|
|
DEFAULT_PRESETS: list[dict[str, object]] = [
|
|
{
|
|
"name": "default",
|
|
"default": True,
|
|
"cli": "--socket-timeout 30 --download-archive %(archive_file)s",
|
|
"description": "Default preset for yt-dlp. It will download whatever yt-dlp decides is the best quality for the video and audio.",
|
|
"folder": "",
|
|
"template": "",
|
|
"cookies": "",
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
{
|
|
"name": "mobile",
|
|
"cli": '--socket-timeout 30 --download-archive %(archive_file)s\n-t mp4 --merge-output-format mp4 --add-chapters --remux-video mp4 \n--embed-metadata --embed-thumbnail \n--postprocessor-args "-movflags +faststart"',
|
|
"default": True,
|
|
"description": "This preset is designed for mobile devices. It will download the best quality video and audio in mp4 format, merge them, and add chapters, metadata, and thumbnail.",
|
|
"folder": "",
|
|
"template": "",
|
|
"cookies": "",
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
{
|
|
"name": "1080p",
|
|
"cli": "--socket-timeout 30 --download-archive %(archive_file)s\n-S vcodec:h264 --format 'bv[height<=1080][ext=mp4]+ba[ext=m4a]/b[ext=mp4]/b[ext=webm]'",
|
|
"default": True,
|
|
"description": "Download the best quality video and audio in mp4 format for 1080p resolution.",
|
|
"folder": "",
|
|
"template": "",
|
|
"cookies": "",
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
{
|
|
"name": "720p",
|
|
"cli": "--socket-timeout 30 --download-archive %(archive_file)s\n-S vcodec:h264 --format 'bv[height<=720][ext=mp4]+ba[ext=m4a]/b[ext=mp4]/b[ext=webm]'",
|
|
"default": True,
|
|
"description": "Download the best quality video and audio in mp4 format for 720p resolution.",
|
|
"folder": "",
|
|
"template": "",
|
|
"cookies": "",
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
{
|
|
"name": "audio_only",
|
|
"cli": "--socket-timeout 30 --download-archive %(archive_file)s\n--extract-audio --add-chapters --embed-metadata --embed-thumbnail --format 'bestaudio/best'",
|
|
"default": True,
|
|
"description": "This preset is designed to download only the audio of the video. It will extract the audio, add chapters, metadata, and thumbnail.",
|
|
"folder": "",
|
|
"template": "",
|
|
"cookies": "",
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
{
|
|
"name": "info_reader_plugin",
|
|
"description": 'This preset generate specific filename format and metadata to work with yt-dlp info reader plugins for jellyfin/emby and plex and to make play state sync work for WatchState.\n\nThere is one more step you need to do via Other > Terminal if you have it enabled or directly from container shell\n\nyt-dlp -I0 --write-info-json --write-thumbnail --convert-thumbnails jpg --paths /downloads/youtube -o "%(channel|Unknown_title)s [%(channel_id|Unknown_id)s]/%(title).180B [%(channel_id|Unknown_id)s].%(ext)s" -- https://www.youtube.com/channel/UCClfFsWcT3N2I7VTXXyt84A\n\nChange the url to the channel you want to download.\n\nFor more information please visit \nhttps://github.com/arabcoders/watchstate/blob/master/FAQ.md#how-to-get-watchstate-working-with-youtube-contentlibrary',
|
|
"folder": "",
|
|
"template": "%(channel)s [%(channel_id|Unknown_id)s]/Season %(release_date>%Y,upload_date>%Y|Unknown)s/%(release_date>%Y%m%d,upload_date>%Y%m%d)s - %(title).180B [%(id)s].%(ext)s",
|
|
"cli": "--socket-timeout 30 --download-archive %(archive_file)s\n--windows-filenames --write-info-json --embed-info-json \n--convert-thumbnails jpg --write-thumbnail --embed-metadata",
|
|
"cookies": "",
|
|
"default": True,
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
{
|
|
"name": "nfo_maker_tv",
|
|
"description": "This preset generate specific filename format and metadata to work with media servers like jellyfin/emby and plex for episodes.",
|
|
"folder": "",
|
|
"template": "%(channel)s [%(channel_id|Unknown_id)s]/Season %(release_date>%Y,upload_date>%Y|Unknown)s/S%(release_date>%Y,upload_date>%Y)sE%(release_date>%m%d,upload_date>%m%d)s - %(title).100B [%(id)s].%(ext)s",
|
|
"cli": '--socket-timeout 30 --download-archive %(archive_file)s\n--use-postprocessor "NFOMakerPP:when=after_move" \n--windows-filenames --convert-thumbnails jpg --write-thumbnail',
|
|
"cookies": "",
|
|
"default": True,
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
{
|
|
"name": "nfo_maker_movie",
|
|
"description": "This preset generate specific filename format and metadata to work with media servers like jellyfin/emby and plex for movies.",
|
|
"folder": "",
|
|
"template": "%(channel)s [%(channel_id|Unknown_id)s]/Season %(release_date>%Y,upload_date>%Y|Unknown)s/S%(release_date>%Y,upload_date>%Y)sE%(release_date>%m%d,upload_date>%m%d)s - %(title).100B [%(id)s].%(ext)s",
|
|
"cli": '--socket-timeout 30 --download-archive %(archive_file)s\n--use-postprocessor "NFOMakerPP:when=after_move;mode=movie" \n--windows-filenames --convert-thumbnails jpg --write-thumbnail',
|
|
"cookies": "",
|
|
"default": True,
|
|
"priority": 0,
|
|
"updated_at": DEFAULT_PRESET_UPDATED_AT,
|
|
},
|
|
]
|