I have succeeded in running shaark in a docker (without docker-compose) and added the installation of youtube-dl and python to it. When I then tried to verify it works correctly in the settings, I got an error.
After some analysis it turns out that youtube-dl was not able to download the video that is used for testing. Youtube-dl received its last update in the end of 2021 (https://github.com/ytdl-org/youtube-dl) and I have another tool running on my NAS, which had a similar issue. The solution is to switch to yt-dlp (https://github.com/yt-dlp/yt-dlp) which still receives regular updates (latest one was 3 weeks ago)
So I downloaded yt-dlp instead and changed the binary path in the settings to use that one instead. Stil didn't work.
Turns out this needs an update of youtube-dl-php, because yt-dlp apparently uses some changed filepaths.
Since there is a major version jump (1.6 is currently used in shaark and 2.1.3 is the newest version), I changed the YoutubeDlProvider.php file.
Then I needed to run composer require norkunas/youtube-dl-php:2.1.3 -W and that made the settings page finally show "Success" when trying the youtube download.
The problem is now, that it still doesn't seem to work for "real" cases. I added a youtube video, clicked edit and then Archive, then Archive as Media and it says "Link is being archived". I don't see any log messages, I don't see any files appear, It just seems to stop.
As an additional information: I am using redis and have put shaark into production mode.
I have attached my updated version of the YoutubeDlProvider.php file(as txt, as github does not support php file extensions). I am not a PHP developer, so take everything I have said so far with a grain of salt, my languages are Java and JavaScript/Typescript ;-)
YoutubeDlProvider.txt
I have succeeded in running shaark in a docker (without docker-compose) and added the installation of youtube-dl and python to it. When I then tried to verify it works correctly in the settings, I got an error. After some analysis it turns out that youtube-dl was not able to download the video that is used for testing. Youtube-dl received its last update in the end of 2021 (https://github.com/ytdl-org/youtube-dl) and I have another tool running on my NAS, which had a similar issue. The solution is to switch to yt-dlp (https://github.com/yt-dlp/yt-dlp) which still receives regular updates (latest one was 3 weeks ago) So I downloaded yt-dlp instead and changed the binary path in the settings to use that one instead. Stil didn't work. Turns out this needs an update of youtube-dl-php, because yt-dlp apparently uses some changed filepaths. Since there is a major version jump (1.6 is currently used in shaark and 2.1.3 is the newest version), I changed the
YoutubeDlProvider.php
file. Then I needed to runcomposer require norkunas/youtube-dl-php:2.1.3 -W
and that made the settings page finally show "Success" when trying the youtube download.The problem is now, that it still doesn't seem to work for "real" cases. I added a youtube video, clicked edit and then Archive, then Archive as Media and it says "Link is being archived". I don't see any log messages, I don't see any files appear, It just seems to stop.
As an additional information: I am using redis and have put shaark into production mode.
I have attached my updated version of the
YoutubeDlProvider.php
file(as txt, as github does not support php file extensions). I am not a PHP developer, so take everything I have said so far with a grain of salt, my languages are Java and JavaScript/Typescript ;-) YoutubeDlProvider.txt