Commit graph

152 commits

Author SHA1 Message Date
mykola2312
c737ecd1ba remove message log spam 2024-02-21 21:39:41 +02:00
mykola2312
22d1011c9e clean main 2024-02-21 21:04:43 +02:00
mykola2312
72a7eb0239 implement bot command to download video 2024-02-21 21:04:21 +02:00
mykola2312
7fb721496a delete tmp file if error happens 2024-02-21 20:28:31 +02:00
mykola2312
fed938d04e finish implementing download function 2024-02-21 19:27:01 +02:00
mykola2312
69193d9f94 use result for better error handling dx 2024-02-21 19:25:15 +02:00
mykola2312
02265981d8 implementing some downloady stuff 2024-02-21 19:19:54 +02:00
mykola2312
4bc93de87e implement yt-dlp download 2024-02-21 19:06:23 +02:00
mykola2312
819e30c1fa begin implementing generic download function 2024-02-21 18:48:03 +02:00
mykola2312
ed013fae4d do renaming for command handlers so it wouldn't conflict with other functions 2024-02-21 18:42:09 +02:00
mykola2312
da07633d0d add -y option to ffmpeg so it wont stuck prompting for confirmation 2024-02-21 17:21:27 +02:00
mykola2312
e26814e2e7 add tests to check best format finding functions 2024-02-21 15:05:18 +02:00
mykola2312
a8a0831a52 move everything related to telegram bot to appropriate module 2024-02-21 14:52:54 +02:00
mykola2312
550c27ff03 mp3 converting with ffmpeg works 2024-02-21 14:35:07 +02:00
mykola2312
c8f9972941 introduce unit testing 2024-02-21 14:17:21 +02:00
mykola2312
bbcedac4e1 implement mp3 bitrate rounding up 2024-02-20 23:04:41 +02:00
mykola2312
0491be57c8 make yt-dlp error message its own enum type 2024-02-20 21:06:47 +02:00
mykola2312
b188551885 make separate process spawn function with error types to avoid code duplication 2024-02-20 21:01:41 +02:00
mykola2312
494c00a60e begin implementing ffmpeg interface 2024-02-20 20:26:45 +02:00
mykola2312
fa3d2b3b03 implement function to find best audio format 2024-02-20 16:39:15 +02:00
mykola2312
9414fb51bd rename to av because its video with audio 2024-02-20 16:09:11 +02:00
mykola2312
6602016d44 instead of sorting just find max width height format 2024-02-20 16:06:58 +02:00
mykola2312
d1bced33b5 implement function to find best quality video format 2024-02-20 14:24:19 +02:00
mykola2312
28799ca380 check exit status instead of stdout empty & stderr non-empty. also begin working on algorithm to determine best format 2024-02-19 20:24:20 +02:00
mykola2312
402e2ca990 implement pretty output for YtDlpFormat 2024-02-19 14:50:44 +02:00
mykola2312
5dace36e03 fix yt-dlp's "none" string value to real None variant 2024-02-19 14:37:19 +02:00
mykola2312
685320336b impl From traits for error type for easy usage 2024-02-19 14:20:04 +02:00
mykola2312
06864fc26d implement YtDlpError 2024-02-19 13:46:27 +02:00
mykola2312
5802b8fa9a use tokio process instead of sync one 2024-02-19 13:12:52 +02:00
mykola2312
2f794802bc cargo fmt 2024-02-19 12:48:40 +02:00
mykola2312
c6cff5ad66 implement async process spawning 2024-02-19 12:48:10 +02:00
mykola2312
e935caefdc add yt-dlp json struct deserializers 2024-02-19 11:44:55 +02:00
mykola2312
045921bcd9 add serde 2024-02-19 11:41:27 +02:00
mykola2312
2a0dc1c509 begin working on yt-dlp wrapper 2024-02-19 11:33:39 +02:00
mykola2312
a0deb938c4 move to bot_main so I can test program without running huge teloxide 2024-02-19 11:33:20 +02:00
mykola2312
8a2047e1c8 adjust dockerfile so only required files are copied instead of everything 2024-02-19 09:44:35 +02:00
mykola2312
6c456dcee6 remove pyo3 2024-02-19 09:29:43 +02:00
mykola2312
eab13de0dc Merge branch 'develop' 2024-02-18 21:05:18 +02:00
mykola2312
339ed6fd85 add dockerignore 2024-02-18 21:04:48 +02:00
mykola2312
ad61490cb5 add todo reminder to ditch pyo3 ffi because of lack subinterpreter support 2024-02-18 20:02:32 +02:00
mykola2312
b224c8fa7b implement yt-dlp FFI and working bot command to download 2024-02-18 19:29:36 +02:00
mykola2312
70c050ca19 remove dead code 2024-02-18 19:12:21 +02:00
mykola2312
2211ace02e set teloxide to upstream git instead of crates one to fix issues 2024-02-18 18:56:14 +02:00
mykola2312
9c12bb4a15 begin implementing downloader functionality 2024-02-18 18:27:51 +02:00
mykola2312
8edc034061 add pyo3 crate 2024-02-18 18:27:19 +02:00
mykola2312
d88286cf6c add comments to dockerfile 2024-02-18 18:16:50 +02:00
mykola2312
66ed80a72e use compose so env secrets could be passed to container 2024-02-18 12:47:45 +02:00
mykola2312
cac74f57ee begin working on docker containerization 2024-02-18 12:11:31 +02:00
mykola2312
cc2d47cc55 fix warnings 2024-02-18 10:57:03 +02:00
mykola2312
0e9f4f7b9e add readme 2024-02-18 08:55:32 +02:00