1pub mod parser;
2pub mod assembling;
3pub mod analyzer;
4pub mod dispatcher;
5mod run;
6mod error;
7
8pub mod ui_prompts {
10 pub const FFMPEG_UNAVAILABLE_WARNING: &str = "It looks like ffmpeg and ffprobe aren't installed, which means that some of blob-dl's features aren't available!\nPlease install them for a fuller experience";
11
12 pub const LONG_ABOUT: &str = "A command line tool used to make downloading youtube videos in various formats easy\nIf you are having problems passing a URL as an argument, try wrapping it in quotes (\"\")!\n\nFor more details check out the github page https://github.com/MicheleCioccarelli/blob-dl";
13
14 pub const SHORT_ABOUT: &str = "A command line tool used to make downloading youtube videos in various formats easy\nIf you are having problems passing a URL as an argument, try wrapping it in quotes (\"\")!\n\nFor more details check out the github page https://github.com/MicheleCioccarelli/blob-dl";
15
16 pub const YTDLP_NOT_INSTALLED: &str = "blob-dl is a wrapper around yt-dlp and cannot function without it.\nPlease install yt-dlp from the official github page: https://github.com/yt-dlp/yt-dlp";
17
18 pub const BEST_QUALITY_PROMPT_PLAYLIST: &str = "Best possible quality for each video";
19
20 pub const BEST_QUALITY_PROMPT_SINGLE_VIDEO: &str = "Best possible quality";
21
22 pub const SMALLEST_QUALITY_PROMPT_PLAYLIST: &str = "Smallest file size for each video";
23
24 pub const SMALLEST_QUALITY_PROMPT_SINGLE_VIDEO: &str = "Smallest file size";
25
26 pub const YT_FORMAT_PROMPT_PLAYLIST: &str = "Choose a format to download to every video in (only formats available for all videos are shown)";
27
28 pub const YT_FORMAT_PROMPT_SINGLE_VIDEO: &str = "Choose a format to download the video in";
29
30 pub const CONVERT_FORMAT_PROMPT_VIDEO_PLAYLIST: &str = "Choose a format to recode all the videos to";
31
32 pub const CONVERT_FORMAT_PROMPT_VIDEO_SINGLE_VIDEO: &str = "Choose a format to recode the video to";
33
34 pub const CONVERT_FORMAT_PROMPT_AUDIO: &str = "Choose an audio format to convert the audios to";
35
36 pub const SEE_HELP_PAGE: &str = "Type blob-dl --help for a list of all the available options";
37
38 pub const USAGE_MSG: &str = "Usage: blob-dl [OPTIONS] [URL]";
39
40 pub const ERROR_RETRY_PROMPT: &str = "The following videos weren't downloaded but retrying might help, choose which videos to re-download [space bar to select]";
41
42 pub const UNRECOVERABLE_ERROR_PROMPT: &str = "The following videos could not be downloaded due to unrecoverable errors";
43
44 pub const DEBUG_REPORT_PROMPT: &str = "By default new errors are flagged as recoverable, if any unrecoverable errors are flagged incorrectly please report them to the github page";
45
46 pub const SELECT_ALL: &str = "Select all\n";
47 pub const SELECT_NOTHING: &str = "Don't re-download anything\n";
48}
49
50mod youtube_error_message {
52 pub const PRIVATE_VIDEO: &str = " Private video. Sign in if you've been granted access to this video";
53
54 pub const NONEXISTENT_PLAYLIST: &str = " YouTube said: The playlist does not exist.";
55
56 pub const HOMEPAGE_REDIRECT: &str = " The channel/playlist does not exist and the URL redirected to youtube.com home page";
57
58 pub const NETWORK_FAIL: &str = " Unable to download API page: <urlopen error [Errno -3] Temporary failure in name resolution> (caused by URLError(gaierror(-3, 'Temporary failure in name resolution')))";
59
60 pub const VIOLENT_VIDEO: &str = " This video has been removed for violating YouTube's policy on violent or graphic content";
61
62 pub const REMOVED_VIDEO: &str = " Video unavailable. This video has been removed by the uploader";
63
64 pub const VIDEO_NOT_FOUND: &str = " not found, unable to continue";
65
66 pub const YTDLP_GAVE_UP: &str = " error: HTTP Error 403: Forbidden. Giving up after 10 retries";
67
68 pub const NO_API_PAGE: &str = " Unable to download API page: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U";
69
70 pub const ENCODER_STREAM_ERROR: &str = " Postprocessing: Error selecting an encoder for stream 0:1";
71
72 pub const NONEXISTENT_VIDEO: &str = "Incomplete data received";
73
74 pub const VIDEO_UNAVAILABLE: &str = " Video unavailable";
76}
77mod blobdl_error_message {
79 pub const BROKEN_URL_ERR: &str = "The url provided wasn't recognized, try using a regular youtube url";
80
81 pub const UNSUPPORTED_WEBSITE_ERR: &str = "Currently blob-dl only supports downloading youtube videos or playlists, not content from other websites";
82
83 pub const UNKNOWN_ISSUE_ERR: &str = "Congrats! You ran into an unknown issue, please file a report on blob-dl's github page :)";
84
85 pub const MISSING_ARGUMENT_ERR: &str = "You must provide 1 URL";
86
87 pub const JSON_SERIALIZATION_ERR: &str = "There was a problem serializing this video's format information";
88
89 pub const UTF8_ERR: &str = "This video's format information contained non-UTF8 characters and broke the parser, best and worst quality should still work!";
90
91 pub const SERDE_ERR: &str = "Serde ran into a problem when serializing this video's format information: ";
92
93 pub const IO_ERR: &str = "There was an IO error: ";
94
95 pub const URL_QUERY_COULD_NOT_BE_PARSED: &str = "This url's query could not be parsed, try using a regular youtube url";
96
97 pub const URL_INDEX_PARSING_ERR: &str = "The video's index in the playlist couldn't be parsed, please report this issue to the github page";
98}