From af1a093fe40f0a161573d18dadf1f21c28889b2b Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Mon, 18 Apr 2022 13:19:00 +0200 Subject: [PATCH 1/7] Added pthread library link to cmakelist --- Tubio/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tubio/CMakeLists.txt b/Tubio/CMakeLists.txt index 080830f..14b4717 100755 --- a/Tubio/CMakeLists.txt +++ b/Tubio/CMakeLists.txt @@ -49,3 +49,5 @@ add_executable(Tubio external_dependencies/leonetienne/stringtools/StringTools.h ) +target_link_libraries(Tubio pthread) + From 97289fec3f945a2c73b0f3a0021c9b23edafa29e Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Mon, 18 Apr 2022 14:35:53 +0200 Subject: [PATCH 2/7] Download manager now also writing error messages to dlbuf logs --- Tubio/DownloadManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tubio/DownloadManager.cpp b/Tubio/DownloadManager.cpp index 6b5678a..bc3de0e 100644 --- a/Tubio/DownloadManager.cpp +++ b/Tubio/DownloadManager.cpp @@ -162,7 +162,7 @@ void DownloadManager::DownloadNext() std::string ytdl_call_video_base = "yt-dlp --newline --no-call-home --no-playlist --no-part --no-warnings --socket-timeout 5 --limit-rate $$DL_RATE" " --no-mtime --no-cache-dir -f \"$$QUALITY\" --recode-video mp4 --prefer-ffmpeg" - " -o \"$$DL_FILE\" \"$$DL_URL\" > \"$$DL_PROG_BUF_FILE\""; + " -o \"$$DL_FILE\" \"$$DL_URL\" > \"$$DL_PROG_BUF_FILE\" 2>&1"; // Fill template ytdl_call_video_base = Internal::StringHelpers::Replace(ytdl_call_video_base, "$$QUALITY", DownloadQualityToStringParams(entry->quality)); @@ -180,7 +180,7 @@ void DownloadManager::DownloadNext() std::string ytdl_call_audio_base = "yt-dlp --newline --no-call-home --no-playlist --no-part --no-warnings --socket-timeout 5 --limit-rate $$DL_RATE" " --no-mtime --no-cache-dir -f worstvideo+bestaudio --audio-format mp3 --audio-quality 0 --extract-audio -o \"$$DL_FILE\"" - " \"$$DL_URL\" > \"$$DL_PROG_BUF_FILE\""; + " \"$$DL_URL\" > \"$$DL_PROG_BUF_FILE\" 2>&1"; // Fill template From b6863ac2e7230394cf8982992674d04c8a025f3d Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Mon, 18 Apr 2022 14:36:26 +0200 Subject: [PATCH 3/7] Server backend now implements a request to get the raw download log for a given download-entity --- Tubio/HttpServer.cpp | 29 +++++++++++++++++++++++++++++ Tubio/HttpServer.h | 1 + Tubio/Version.h | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Tubio/HttpServer.cpp b/Tubio/HttpServer.cpp index eee915e..8f50c9b 100644 --- a/Tubio/HttpServer.cpp +++ b/Tubio/HttpServer.cpp @@ -102,6 +102,10 @@ void HttpServer::EventHandler(mg_connection* pNc, int ev, void* p) { ProcessAPIRequest(pNc, ev, p, peer_addr); } + else if (requestedUri.substr(0, 12) == "/downloadlog") + { + ServeDownloadLog(pNc, ev, p, requestedUri); + } else if (requestedUri.substr(0, 9) == "/download") { ServeDownloadeableResource(pNc, ev, p, requestedUri); @@ -216,6 +220,31 @@ void HttpServer::ServeDownloadeableResource(mg_connection* pNc, int ev, void* p, return; } +void HttpServer::ServeDownloadLog(mg_connection* pNc, int ev, void* p, std::string uri) +{ + std::string fileId = uri.substr(13, uri.length() - 13); + + if (Downloader::DownloadManager::DoesTubioIDExist(fileId)) + { + Downloader::DownloadEntry& entry = Downloader::DownloadManager::GetDownloadEntryByTubioID(fileId); + + std::stringstream ss; + std::string logFilename = std::string("./dlcache/dlprogbuf/") + fileId + ".buf"; + + ss << "Access-Control-Allow-Origin: *\nContent-Type: text/plain; Cache-Control: must-revalidate, post-check=0, pre-check=0"; + mg_http_serve_file(pNc, (http_message*)p, logFilename.c_str(), mg_mk_str("text/plain"), mg_mk_str(ss.str().c_str())); + } + else + { + Json j; + std::stringstream ss; + j.CloneFrom(RestResponseTemplates::GetByCode(HTTP_STATUS_CODE::BAD_REQUEST, "Invalid tubio id!")); + ServeStringToConnection(pNc, j.Render(), (int)HTTP_STATUS_CODE::BAD_REQUEST); + } + + return; +} + bool HttpServer::IsConnectionAllowed(std::string peer_address, std::string& denialReason) { // Localhost is always allowed! diff --git a/Tubio/HttpServer.h b/Tubio/HttpServer.h index 0f95a43..7ba650f 100644 --- a/Tubio/HttpServer.h +++ b/Tubio/HttpServer.h @@ -24,6 +24,7 @@ namespace Rest bool InitWebServer(); static void ProcessAPIRequest(struct mg_connection* pNc, int ev, void* p, std::string peerAddress); static void ServeDownloadeableResource(struct mg_connection* pNc, int ev, void* p, std::string uri); + static void ServeDownloadLog(struct mg_connection* pNc, int ev, void* p, std::string uri); static void EventHandler(struct mg_connection* pNc, int ev, void* p); static void ServeStringToConnection(struct mg_connection* c, std::string str, int httpStatusCode = 200); diff --git a/Tubio/Version.h b/Tubio/Version.h index 147f94f..057a7fc 100644 --- a/Tubio/Version.h +++ b/Tubio/Version.h @@ -1,2 +1,2 @@ #pragma once -#define TUBIO_SERVER_VERSION (0.65) +#define TUBIO_SERVER_VERSION (0.66) From e482c3706cc8e70f51eca8ef763dcf54a4a27ab5 Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Mon, 18 Apr 2022 14:43:07 +0200 Subject: [PATCH 4/7] Now writing tubio id to logs when queueing --- Tubio/RestQueryHandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tubio/RestQueryHandler.cpp b/Tubio/RestQueryHandler.cpp index 65b7cda..e0de386 100644 --- a/Tubio/RestQueryHandler.cpp +++ b/Tubio/RestQueryHandler.cpp @@ -115,11 +115,11 @@ bool RestQueryHandler::QueueDownload(const JsonBlock& request, JsonBlock& respon return false; } - log->cout << "Queued video \"" << videoUrl << "\"..."; - log->Flush(); - std::string tubId = DownloadManager::QueueDownload(videoUrl, mode, quality); + log->cout << "Queued video \"" << videoUrl << "\" with id \"" << tubId << "\"..."; + log->Flush(); + responseCode = HTTP_STATUS_CODE::OK; responseBody.CloneFrom(RestResponseTemplates::GetByCode(HTTP_STATUS_CODE::OK)); responseBody.Set("message") = "Download queued!"; From 927f5489c66423331fb5a5f1e5cc5743e20c251e Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Thu, 21 Apr 2022 10:06:05 +0200 Subject: [PATCH 5/7] Removed mcvs files --- Tubio.sln | 31 ------ Tubio/Tubio.vcxproj | 195 ------------------------------------ Tubio/Tubio.vcxproj.filters | 126 ----------------------- 3 files changed, 352 deletions(-) delete mode 100644 Tubio.sln delete mode 100644 Tubio/Tubio.vcxproj delete mode 100644 Tubio/Tubio.vcxproj.filters diff --git a/Tubio.sln b/Tubio.sln deleted file mode 100644 index 890b2c6..0000000 --- a/Tubio.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30413.136 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tubio", "Tubio\Tubio.vcxproj", "{8AE799C5-CB17-4714-A362-D8B9817A723E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Debug|x64.ActiveCfg = Debug|x64 - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Debug|x64.Build.0 = Debug|x64 - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Debug|x86.ActiveCfg = Debug|Win32 - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Debug|x86.Build.0 = Debug|Win32 - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Release|x64.ActiveCfg = Release|x64 - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Release|x64.Build.0 = Release|x64 - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Release|x86.ActiveCfg = Release|Win32 - {8AE799C5-CB17-4714-A362-D8B9817A723E}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {11C6C438-21D5-40CC-9CDC-FBA3AE6634F3} - EndGlobalSection -EndGlobal diff --git a/Tubio/Tubio.vcxproj b/Tubio/Tubio.vcxproj deleted file mode 100644 index c3c0b3d..0000000 --- a/Tubio/Tubio.vcxproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {8ae799c5-cb17-4714-a362-d8b9817a723e} - Tubio - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - false - - - true - - - false - - - - Level3 - true - _WIN;JASONPP_RENDER_SORTED;_WIN32;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp17 - - - Console - true - urlmon.lib;%(AdditionalDependencies) - - - - - Level3 - true - true - true - _WIN;JASONPP_RENDER_SORTED;_WIN32;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp17 - - - Console - true - true - true - urlmon.lib;%(AdditionalDependencies) - - - - - Level3 - true - _WIN;JASONPP_RENDER_SORTED;_WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp17 - - - Console - true - urlmon.lib;%(AdditionalDependencies) - - - - - Level3 - true - true - true - _WIN;JASONPP_RENDER_SORTED;_WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp17 - - - Console - true - true - true - urlmon.lib;%(AdditionalDependencies) - - - - - - - TurnOffAllWarnings - TurnOffAllWarnings - TurnOffAllWarnings - TurnOffAllWarnings - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tubio/Tubio.vcxproj.filters b/Tubio/Tubio.vcxproj.filters deleted file mode 100644 index 4ca00f7..0000000 --- a/Tubio/Tubio.vcxproj.filters +++ /dev/null @@ -1,126 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {714ac1f3-3586-412c-9b83-bf00f08d58ab} - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - _external_dependencies - - - _external_dependencies - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - _external_dependencies - - - _external_dependencies - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file From a88d8b0c55b7b472c65a12c259a0daab8524190e Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Thu, 21 Apr 2022 13:37:33 +0200 Subject: [PATCH 6/7] Update 'README.md' --- README.md | 279 +++++++++++++++++++++++++++--------------------------- 1 file changed, 140 insertions(+), 139 deletions(-) diff --git a/README.md b/README.md index d626bad..f590ec3 100644 --- a/README.md +++ b/README.md @@ -1,139 +1,140 @@ -![Tubio](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/teaser.png) - -# Tubio -The free, open source video downloader! - -No longer do you have to rely on shady websites, shoving tons of ads in your face to fulfil your downloady needs. No longer will you be held back by artificially crippled download speeds, login-/paywalls or even watermarks. - -## But what is Tubio? -Tubio in of itself is not a downloader, but a GUI for the widely known, open-source, public-domain cli [yt-dlp](https://github.com/yt-dlp/yt-dlp/). Thanks for this awesome tool! You guys are heroes! (Obviously, same goes for youtube-dl, which yt-dlp is based on) -The goal of Tubio is to make this awesome software more accessible. Not everyone knows how to use the command line! - -## But, how does it work? -It\`s quite easy! Make sure the Tubio service is running in the background, navigate to http://localhost, paste in your video/music url and chances are that it will work! - -This is because the set of supported websites is **extremely** large! See here: [supportedsites.md](https://github.com/blackjack4494/yt-dlc/blob/master/docs/supportedsites.md) - -When your download finished, just click "download" and have fun! - -## No, i mean on a more technical level -The backend is a C++ webserver, powered by [casenta/mongoose](https://github.com/cesanta/mongoose).Thanks, you guys are awesome! -The connection is **not** encrypted, but that\`s okay because it is intended for localhost only. Mongoose does support ssl, so you can always add it, if you fancy it. - -The frontend is a nuxt.js web application. - -## But how does it look? -Have a sneak peak! - -![soundcloud](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/soundcloud.png) - -![reddit](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/reddit.png) - -![youtube](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/youtube.png) - -![settings](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/settings.png) - -![mobile](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/mobile.png) - -## NEW! Get the Chrome Companion Extension! (no longer maintained) -![extension-popup](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/chromeext-popup.png) - -![extension-contextmenu](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/chromeext-context.png) - - -## How can i configure it? -See this json file (config.json). -Most of these values are configurable in the web-interface, but not all, such as the port. -```json -{ - "access": { - "enable_whitelist": true, - "only_allow_localhost": false, - "whitelist": [ - "127.0.0.1", - "192.168.1.12", - "192.168.1.14", - "192.168.1.10" - ] - }, - "downloader": { - "cachedir": "dlcache", - "max_dlrate_per_thread": "100M", - "num_threads": 10 - }, - "general": { - "show_console": true - }, - "httpServer": { - "polling_rate": 100, - "port": "80", - "rootdir": "./frontend" - }, - "logging": { - "autosave_interval": 20, - "logfile_json": "log.json", - "logfile_text": "log.txt" - } -} -``` - -## Can i use Tubio on multiple devices? -Tubio is a webserver, after all. It is intended to be used for localhost only (since no encryption), but no one is preventing you from unticking `localhost only` under /settings. - -Then you could connect to it via your local IPv4 address (such as `192.168.1.12`) or even over the global WAN! However, regarding WAN, i would **strongly** advise against such a careless setup. - -!!! IMPORTANT -Tubio does NOT manage sessions or accounts! Everyone using your Tubio instance will see **all your downloads** and vica versa. - -If you opt for unleashing Tubio on your LAN, i would **strongly** recommend enabling the whitelist! You can do this either in the `config.json` or in /settings. Either way, it is a json-array of strings which represent IPv4 addresses. - -## Setup (Linux) -1) Clone this repository and build it with cmake -2) Create some folder on your system. This will be the installation folder. -3) In this folder, dump the contents of /Tubio/. -4) Install python3 and then yt-dlp via `pip install yt-dlp`. -5) Launch the tubio executable -6) Enjoy <3 - -## Frequently Asked Questions -### My downloads hang at 99% or 100% -This happens as there often is some post-processing to do after downloading. - -### My downloads fail! -First thing to do: Navigate to /settings and click "Update ytdl". This will update your local instance of [yt-dlp](https://github.com/yt-dlp/yt-dlp/). Check the logs to see if it worked. If not, you can always download it yourself (from the [releases-page](https://github.com/yt-dlp/yt-dlp/releases) and put yt-dlp.exe in the same directory tubio.exe lies in.). - -If it\`s still not working, you are most likely trying to download a video from a playlist with a weird url. Try a different one (The one from the share button, the one from right-clicking the video or the one from the url-bar in your browser). - -If it\`s still not working, you\`re out of luck. :( -You may want to check youtube-dl compatible sites. - -### I locked myself out by enabling localhost only on another device! -This can only be undone from localhost. Open Tubio via, and this is important, either `localhost` or `127.0.0.1` and untick it again. If you can only ssh into the host, you can edit the `config.json` itself and restart Tubio. - -### Does it work on Windows? -Sure it does. You just have to compile it yourself using cmake, and put yt-dlp.exe, ffmpeg.exe, ffplay.exe and ffprobe.exe -in Tubios working directory (installation directory). You could then just launch it at startup. - -### Can I use it on my phone? -Sure. Read [this](#user-content-can-i-use-tubio-on-multiple-devices). - -### Can i use this to host my own downloader website? -On your own risk! Tubio is NOT designed for this! Also do note that tubio does NOT manage sessions or accounts! Everyone accessing this instance can see everyones downloads and access the admin panel! Tubio is really designed for one user! - -### XY is not working, you have to fix it now! -I do not. Tubio is a tool I originally made for myself only. I just thought it\`s nice and worth sharing. I will address issues when I have time. Feel free to submit issues and I will have a look when I get to it. :) - -### XY is not polished enough! -This is an alpha-version. What did you expect? :D - -### Can you please add support for website XY? -Please address the awesome team at youtube-dl, as they made the downloading-end: [github.com/ytdl-org/youtube-dl/issues](https://github.com/ytdl-org/youtube-dl/issues). -The downloader tubio uses ([yt-dlp](https://github.com/yt-dlp/yt-dlp/)) is based on youtube-dl. - -## Important notice! -I do NOT endorse illegal downloads in any way, shape, or form. Tubio is a tool to download media from legal sources! Use Tubio at your own discretion! Neither do i provide ANY warranty in ANY way, shape, or form! - -## License -Tubio is distributed under the GNU General Public License v3.0. -Please read the [license file](https://gitea.leonetienne.de/leonetienne/Tubio/src/branch/master/LICENSE). - +![Tubio](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/teaser.png) + +# Tubio +The free, open source video downloader! + +No longer do you have to rely on shady websites, shoving tons of ads in your face to fulfil your downloady needs. No longer will you be held back by artificially crippled download speeds, login-/paywalls or even watermarks. + +## But what is Tubio? +Tubio in of itself is not a downloader, but a GUI for the widely known, open-source, public-domain cli [yt-dlp](https://github.com/yt-dlp/yt-dlp/). Thanks for this awesome tool! You guys are heroes! (Obviously, same goes for youtube-dl, which yt-dlp is based on) +The goal of Tubio is to make this awesome software more accessible. Not everyone knows how to use the command line! + +## But, how does it work? +It\`s quite easy! Make sure the Tubio service is running in the background, navigate to http://localhost, paste in your video/music url and chances are that it will work! + +This is because the set of supported websites is **extremely** large! See here: [supportedsites.md](https://github.com/blackjack4494/yt-dlc/blob/master/docs/supportedsites.md) + +When your download finished, just click "download" and have fun! + +## No, i mean on a more technical level +The backend is a C++ webserver, powered by [casenta/mongoose](https://github.com/cesanta/mongoose).Thanks, you guys are awesome! +The connection is **not** encrypted, but that\`s okay because it is intended for localhost only. Mongoose does support ssl, so you can always add it, if you fancy it. + +The frontend is a nuxt.js web application. + +## But how does it look? +Have a sneak peak! + +![soundcloud](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/soundcloud.png) + +![reddit](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/reddit.png) + +![youtube](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/youtube.png) + +![settings](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/settings.png) + +![mobile](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/mobile.png) + +## NEW! Get the Chrome Companion Extension! (no longer maintained) +![extension-popup](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/chromeext-popup.png) + +![extension-contextmenu](https://gitea.leonetienne.de/leonetienne/Tubio/raw/branch/master/github-media/chromeext-context.png) + + +## How can i configure it? +See this json file (config.json). +Most of these values are configurable in the web-interface, but not all, such as the port. +```json +{ + "access": { + "enable_whitelist": true, + "only_allow_localhost": false, + "whitelist": [ + "127.0.0.1", + "192.168.1.12", + "192.168.1.14", + "192.168.1.10" + ] + }, + "downloader": { + "cachedir": "dlcache", + "max_dlrate_per_thread": "100M", + "num_threads": 10 + }, + "general": { + "show_console": true + }, + "httpServer": { + "polling_rate": 100, + "port": "80", + "rootdir": "./frontend" + }, + "logging": { + "autosave_interval": 20, + "logfile_json": "log.json", + "logfile_text": "log.txt" + } +} +``` + +## Can i use Tubio on multiple devices? +Tubio is hosts a webserver, after all. It is intended to be used for localhost only (since no encryption), but no one is preventing you from unticking `localhost only` under /settings. + +It wouldn't be that complicated to enable SSL. You'd have to install and link `libcryptopp`, obtain a certificate + key, and pass them to the mongoose webserver. But that would break that whole *"compiles without any dependencies thing"*. See [the mongoose docs SSL page](https://mongoose.ws/tutorials/tls/) for instructions. If you implement this cleanly, like with a special make target, a merge request would be greatly appreciated. + +Then you could connect to it via your local IPv4 address (such as `192.168.1.12`) or even over the global WAN! However, regarding WAN, i would **strongly** advise against such a careless setup. + +!!! IMPORTANT +Tubio does NOT manage sessions or accounts! Everyone using your Tubio instance will see **all your downloads** and vica versa. + +If you opt for unleashing Tubio on your LAN, i would **strongly** recommend enabling the whitelist! You can do this either in the `config.json` or in /settings. Either way, it is a json-array of strings which represent IPv4 addresses. + +## Setup (Linux) +1) Clone this repository and build it with cmake +2) Create some folder on your system. This will be the installation folder. +3) In this folder, dump the contents of /Tubio/. +4) Install python3 and then yt-dlp via `pip install yt-dlp`. +5) Launch the tubio executable +6) Enjoy <3 + +## Frequently Asked Questions +### My downloads hang at 99% or 100% +This happens as there often is some post-processing to do after downloading. + +### My downloads fail! +First thing to do: Verify that are using the latest version of yt-dlp. The team behind its upstream, youtube-dl, are quite fast adjusting the downloading backend to changes in popular platforms, such as youtube. If your downloads still fail, +verify that yt-dlp is in fact capable of downloading the url you supplied by executing `yt-dlp $url`, replacing `$url` with your url. If this works, you can extract the tubio id of the url you just queued in `/settings`, and then open `/downloadlog/` to see the output stdout and stderr of the yt-dlp call. Then work from the error messages you see in there. + +If it\`s still not working, you\`re out of luck. :( +You may want to check youtube-dl compatible sites. + +### I locked myself out by enabling localhost only on another device! +This can only be undone from localhost. Open Tubio via, and this is important, either `localhost` or `127.0.0.1` and untick it again. If you can only ssh into the host, you can edit the `config.json` itself and restart Tubio. + +### Does it work on Windows? +Sure it does. You just have to compile it yourself using cmake, and put yt-dlp.exe, ffmpeg.exe, ffplay.exe and ffprobe.exe +in Tubios working directory (installation directory). You could then just launch it at startup. + +### Can I use it on my phone? +You bet! That's what I'm mainly using it for :) Read [this](#user-content-can-i-use-tubio-on-multiple-devices). + +### Can I use this to host my own downloader website? +On your own risk! Tubio is NOT designed for this! Also do note that tubio does NOT manage sessions or accounts! Everyone accessing this instance can see everyones downloads and access the admin panel! Tubio is really designed for one user! + +### XY is not working, you have to fix it now! +I do not. Tubio is a tool I originally made for myself only. I just thought it\`s nice and worth sharing. I will address issues when I have time. Feel free to submit issues and I will have a look when I get to it. :) + +### XY is not polished enough! +This is an alpha-version. What did you expect? :D + +### Can you please add support for website XY? +Please address the awesome team at youtube-dl, as they make the downloading-backend: [github.com/ytdl-org/youtube-dl/issues](https://github.com/ytdl-org/youtube-dl/issues). +The downloader tubio uses ([yt-dlp](https://github.com/yt-dlp/yt-dlp/)) is based on youtube-dl. + +## Important notice! +I do NOT endorse illegal downloads in any way, shape, or form. Tubio is a tool to download media from legal sources! Use Tubio at your own discretion! Neither do i provide ANY warranty in ANY way, shape, or form! + +## License +Tubio is distributed under the GNU General Public License v3.0. +Please read the [license file](https://gitea.leonetienne.de/leonetienne/Tubio/src/branch/master/LICENSE). + From b0f4250c600a149507f1a0bb275f93f802d4a965 Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Thu, 21 Apr 2022 13:42:03 +0200 Subject: [PATCH 7/7] Update 'README.md' --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f590ec3..28ed54f 100644 --- a/README.md +++ b/README.md @@ -78,11 +78,9 @@ Most of these values are configurable in the web-interface, but not all, such as ``` ## Can i use Tubio on multiple devices? -Tubio is hosts a webserver, after all. It is intended to be used for localhost only (since no encryption), but no one is preventing you from unticking `localhost only` under /settings. +Tubio hosts a webserver, after all. It is intended to be used for localhost only (since no encryption), but no one is preventing you from unticking `localhost only` under `/settings`. Then you could connect to it via your local IPv4 address (such as `192.168.1.12`) or even over the global WAN! However, regarding WAN, i would **strongly** advise against such a careless setup. -It wouldn't be that complicated to enable SSL. You'd have to install and link `libcryptopp`, obtain a certificate + key, and pass them to the mongoose webserver. But that would break that whole *"compiles without any dependencies thing"*. See [the mongoose docs SSL page](https://mongoose.ws/tutorials/tls/) for instructions. If you implement this cleanly, like with a special make target, a merge request would be greatly appreciated. - -Then you could connect to it via your local IPv4 address (such as `192.168.1.12`) or even over the global WAN! However, regarding WAN, i would **strongly** advise against such a careless setup. +It wouldn't be that complicated to enable TLS. You'd have to install and link `libcryptopp`, obtain a certificate + key, and pass them to the mongoose webserver. But that would break that whole *"compiles without any dependencies thing"*. See [the mongoose docs TLS page](https://mongoose.ws/tutorials/tls/) for instructions. If you implement this cleanly, like with a special make target, a merge request would be greatly appreciated. !!! IMPORTANT Tubio does NOT manage sessions or accounts! Everyone using your Tubio instance will see **all your downloads** and vica versa.