Closed ifoolb closed 4 years ago
Does the setting work if you change it in the SQLite database using the CLI? Otherwise I am not too confident to support a DBMS that isn't even really supported by Nextcloud:
I suppose not, because when I open the database, I find duplicate rows in it, such as 2|WhichDownloader|CURL 3|WhichDownloader|ARIA2 4|WhichDownloader|CURL After switching to MariaDB the settings work well, so it does seem to be a problem because of SQLite. But SQLite is convenient, if it's supported then I won't need to run another daemon on my 'micro' server.
This will probably be solved by https://github.com/e-alfred/ocdownloader/issues/73. Rework will take some time probably, but if you want to help out pull requests are always welcome.
I've updated to 1.7.0 but still the same problem.
DB is sqlite, I've set the execute permissions for the fallback and I have selected cURL as downloader in the settings.
I had the same DB problem as @ifoolb and used the following commands to correct it: delete from oc_ocdownloader_adminsettings where id = X; insert into oc_ocdownloader_adminsettings values (1,'AllowProtocolBT','N'); insert into oc_ocdownloader_adminsettings values (2,'WhichDownloader','CURL');
to this: select * from oc_ocdownloader_adminsettings; 1 | AllowProtocolBT | N 2 | whichDownloader | CURL
However, the problem still exists with the new version 1.7.0
Edit: Forgot to write, the download page indicates that aria2 is still being used for downloads, and prints this error message: _Returned GID is null ! Is Aria2c running as a daemon ?
Here a quick solution to use curl instead of aria2:
In the file apps/ocdownloader/controller/libs/settings.php
add to the function public function getValue()
as first line after the {
this new line: if ($this->Key == 'WhichDownloader') return 'CURL';
Don't forget to adjust the path to the youtube-dl binary $this->YTDLBinary = '/usr/local/bin/youtube-dl'; // default path
in the file apps/ocdownloader/controller/ytdownloader.php
(I had to delete local
).
Edit:
Instead of modifying ytdownloader.php
you can add a second line to lib/settings.php
with if ($this->Key == 'YTDLBinary') return '/usr/bin/youtube-dl';
directly after the the first added line.
settings.php
could look like this:
public function getValue()
{
if ($this->Key == 'WhichDownloader') return 'CURL';
elseif ($this->Key == 'YTDLBinary') return '/usr/bin/youtube-dl';
elseif ($this->Key == 'AllowProtocolBT') return 'N';
...
}
Nextcloud officially doesn't support SQLite anymore, this app cannot support things that aren't supported by Nextcloud directly, so only Mariadb/Mysql and Postgresql are supported for now: https://docs.nextcloud.com/server/18/admin_manual/configuration_database/linux_database_configuration.html