Giter Site home page Giter Site logo

e-alfred / ocdownloader Goto Github PK

View Code? Open in Web Editor NEW
373.0 21.0 84.0 1.72 MB

ocDownloader - AGPL-licensed multi-protocol download manager for Nextcloud using ARIA2, youtube-dl and Curl (supports Youtube, BitTorrent, HTTP, FTP)

Home Page: https://github.com/e-alfred/ocdownloader

License: GNU Affero General Public License v3.0

PHP 29.12% Shell 0.02% CSS 1.70% JavaScript 69.16%
aria2 nextcloud torrent hacktoberfest

ocdownloader's People

Contributors

chazz avatar chion82 avatar djazzlab avatar dmitrodem avatar e-alfred avatar gas85 avatar grantmacnamara avatar jasonpoon-cn avatar lokarde avatar loki3000 avatar mamartel avatar marissa999 avatar morrisjobke avatar msberends avatar muellerlukas avatar mywk avatar nextcloud-bot avatar nibbels avatar noci2012 avatar opso-code avatar rakekniven avatar rt4u avatar tatodorov avatar telkk avatar wartw98 avatar weeman1337 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocdownloader's Issues

I can not enter the settings(nextcloud) after updating to NC13

Nextcloud version 13.0.0.14
Operating system Gentoo
Apache -2.4.27-r1
PHP version 7.1.13

After updating from NC 12.0.5 to NC 13.0.0.14 I can not enter the settings nextcloud under any user.
If disable application ocDownloader, then i can enter the settings.

Error:

Internal server error
The request can not be processed by the server.

If this happens again, send the administrator of the server a detailed message about what happened, listed below.

For more information, see the server log.

Technical details
Remote address: 192.168.100.2
Request ID: WnwuAsCoZGQAAFomNskAAAAK

nextcloud.log:
{"reqId":"WnwuAsCoZGQAAFomNskAAAAK","level":3,"time":"2018-02-08T11:01:24+00:00","remoteAddr":"192.168.100.2","user":"ivan","app":"index","method":"GET","url":"\/settings\/user","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Call to undefined function style()\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(706): include()\\n#1 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Settings\\\/Manager.php(497): OC_App::getForms('personal')\\n#2 \\\/var\\\/www\\\/nextcloud\\\/settings\\\/Controller\\\/CommonSettingsTrait.php(89): OC\\\\Settings\\\\Manager->getPersonalSections()\\n#3 \\\/var\\\/www\\\/nextcloud\\\/settings\\\/Controller\\\/CommonSettingsTrait.php(42): OC\\\\Settings\\\\Controller\\\\PersonalSettingsController->formatPersonalSections('personal', 'personal-info')\\n#4 \\\/var\\\/www\\\/nextcloud\\\/settings\\\/Controller\\\/CommonSettingsTrait.php(120): OC\\\\Settings\\\\Controller\\\\PersonalSettingsController->getNavigationParameters('personal', 'personal-info')\\n#5 \\\/var\\\/www\\\/nextcloud\\\/settings\\\/Controller\\\/PersonalSettingsController.php(61): OC\\\\Settings\\\\Controller\\\\PersonalSettingsController->getIndexResponse('personal', 'personal-info')\\n#6 [internal function]: OC\\\\Settings\\\\Controller\\\\PersonalSettingsController->index('personal-info')\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(161): call_user_func_array(Array, Array)\\n#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(91): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OC\\\\Settings\\\\Controller\\\\PersonalSettingsController), 'index')\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(115): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Settings\\\\Controller\\\\PersonalSettingsController), 'index')\\n#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OC\\\\\\\\Settings\\\\\\\\Con...', 'index', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#11 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router.php(297): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#13 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(998): OC\\\\Route\\\\Router->match('\\\/settings\\\/user')\\n#14 \\\/var\\\/www\\\/nextcloud\\\/index.php(37): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/apps\\\/ocdownloader\\\/settings\\\/personal.php\",\"Line\":17}","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36 OPR\/50.0.2762.67","version":"13.0.0.14"}

/var/log/apache2/ssl_access_log:

192.168.100.2 - - [08/Feb/2018:21:20:47 +1000] “GET /settings/user HTTP/1.1” 500 6537
192.168.100.2 - - [08/Feb/2018:21:20:48 +1000] “GET /settings/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1” 302 -
192.168.100.2 - - [08/Feb/2018:21:20:48 +1000] “GET /settings/undefined/img/notifications.svg HTTP/1.1” 302 -
192.168.100.2 - - [08/Feb/2018:21:20:48 +1000] “GET /apps/files/ HTTP/1.1” 200 35391
192.168.100.2 - - [08/Feb/2018:21:20:49 +1000] “GET /apps/files/ HTTP/1.1” 200 35393

CSS is broken in NC 13

Hello,

i upgraded my cloud to NC13, but it seems that the Layout is brocken.
Can you fix it?

ocdownlaoder_nc13

[low priority] should we rename this app? and if yes, to what?

inspired by the issue (https://github.com/DjazzLab/ocdownloader/issues/58) which had this fork as an result, i opened this issue and collected the suggestions...

just a few annotations to explain the list:

  • it is ordered chronological by first mentioning
  • the first link is the initial mentioning (sometimes with further explanation, research, etc.)
  • additional links are some further discussion or research about it

BT download issues

Attempting a BT downloads return the general GID error, while HTTP and FTP downloads work flawlessly, also aria can and indeed does download torrents for nextcloud user if tried manually. Additional settings "Allow protocol for users" (this string also shows untranslated, while there is one in l10n files) show Allow BitTorrent with Yes/No Checkbox and a bold "No" to the right of it.

Regards, Anulap

When encryption is activated, aria2c can't decode the torrent file

Hi !
I've been wondering why aria2c kept throwing me those :

08/28 11:59:02 [DEBUG] Exception caught
Exception: [download_helper.cc:291] errorCode=25 Bencode decoding failed

Turns out, ocdownloader gives the filepath to aria2c, aria2c receives an encrypted torrent file and can't do much about this...

Is there a quick way I can fix this, without disabling encryption in Nextcloud ?

"No files in here" after downloaded a youtube video via curl

Operations&Phenomenon:

After I downloaded a video from youtube, the file has been downloaded. I use ls -l found this file an Debian file system in the Nextcloud's data folder. But I fail to see it In the "Downloads" folder of my Nextcoud file.

Root Cause & Resolution:

Unknown

Data&Logs:

qq 20171217121125
qq 20171217121141
qq 20171217121203

/tmp full with Curl

On raspberry pi, default /tmp is 10M.
So status files fill it quickly and then curl stop working.

Why no move it to Download folder ?

How to download 1080p from youtube?

No matter what i use Aria or CURL, only 720p is downloaded.
Is there an option to download 1080p?
As long as i understand youtube-dl is used ONLY to get direct link, not for downloading.

Undefined variable: GID in controller/lib/tools.php

Error PHP Undefined variable: GID at /var/www/vhosts/DOMAIN/httpdocs/apps/ocdownloader/controller/lib/tools.php#225 2017-08-27T16:00:25+0200
Error PHP Undefined variable: GID at /var/www/vhosts/DOMAIN/httpdocs/apps/ocdownloader/controller/lib/tools.php#221 2017-08-27T16:00:25+0200
Error PHP Undefined variable: GID at /var/www/vhosts/DOMAIN/httpdocs/apps/ocdownloader/controller/lib/tools.php#225 2017-08-27T16:00:25+0200
Error PHP Undefined variable: GID at /var/www/vhosts/DOMAIN/httpdocs/apps/ocdownloader/controller/lib/tools.php#221 2017-08-27T16:00:25+0200

I just post this here as "TODO" / "TO LOOK IN"

API request with Youtube URL does not download video

Trying to download a Youtube video with one of the browser extensions returns the following message: "Unable to retrieve true Youtube video URL"

This seems to be caused by issuing a JSON request with the Youtube URL over the API from an external tool.

Curl download does not work - Solved

Hallo,
since installation I have no ARIA and would like to use CURL. But App shows always "using ARIA2" and "GID is 'null'" if hitting download button. How to force is to use CURL?
System is:
Ubuntu 16.04
Nextcloud 12.03
Curl
ocdownloader is fresh installed from the Store

# php -m | grep curl
curl
# whereis curl
curl: /usr/bin/curl
# ls -la SERVER/
total 20
drwxr-xr-x  2 www-data www-data 4096 Oct 25 11:00 .
drwxr-xr-x 11 www-data www-data 4096 Oct 25 11:00 ..
-rwxr-xr-x  1 www-data www-data 4308 Oct 25 11:00 fallback.php
-rwxr-xr-x  1 www-data www-data  150 Oct 25 11:00 fallback.sh

image

When we deactivate Download type the type of download is still a valid choice for admins

screenshot_1
And here we still can choose youtube/Ftp/Http:
screenshot_6

Because the Setting is only valid for non admins. This behaviour seems a bit weird for me. Maybe there should be settings for admins and users. Speaking for me I wish to close down all methods which are not working on my system. -> And I dont want to see them -> And I dont want them to produce errors.

screenshot_7

Troubles to change user and directory

Hi,
I have troubles to change the default directory. I tried to use the -d option of aria2c but it keeps downloading into the same default directory.
In addition to this, aria2c doesn't start if I run it as with an other user than root.
So here is my command:
aria2c --enable-rpc --rpc-allow-origin-all -c -D --log /var/log/aria2.log --check-certificate=false -d /home/ivan/data/Ivan34/files/Téléchargements/

For the user trouble I can set up a cron to change the user but it is not very nice.
But I would like to find a way to change the default directory.
Thank you!

The Plugins for the Browsers ?

Hi,
it is possible for hosting the plugins also, because be clients
of the NCdownloader for supporting the functionality too.
Maybe find some peoples where helps with for programming further if in the readme stay
"helping hands and Programmers wanted for this cloud downloader "slave" ;) and his clients
for developing further" for have a open way for creating a small self running community around.

best regards
Blacky

Script missing for Bittorrent

There is some upload functionality for ARIA2 and Bittorrent files.

script ('files', 'jquery.iframe-transport');

script ('files', 'jquery.iframe-transport');
produces 404 on my system.

script ('files', 'jquery.fileupload');
seems to be loaded from
screenshot_8

Rightnow I cannot test this with missing aria2. Is this upload working without script ('files', 'jquery.iframe-transport'); nowadays?

Greetings

Youtube download vs. legal stuff

This is not really an issue, but for the logs:
https://www.computerbase.de/2017-09/youtube-mp3-org-stream-ripper-offline/
I live in germany and contributing to some software that is able to download supposed-to-be streams might be problematic.
Problematic, if the streamer takes measures that I should not download the video very easy or if the streamer encrypts it.

So I will just follow my current path and only contribute to HTTP / FTP and legal bittorrent downloads.
I write this that nobody wonders about my silence when it comes to upgrading youtube support and similar ;)

This also might be some topic when it comes to getting the app into nextclouds store.

Greetings

Running Aria2 on a separate host

Hi there,

On my setup I have everything containerized, even nextcloud, so Aria2 is in another container.
I would like to be able to set aria2 in another host/container, and configure it on the nextcloud settings. With docker is easy to map the same download directory on each container, but mount via nfs should be acceptable for physical environments, so download folders shouldn't be a problem. As far as I can see, the main problem is to say to ocDownloader not to search of aria2c daemon in localhost but connect via rpc to aria2 port, either the localhost or a remote host.

What do you think?

COPYING vs. LICENSE

Kind of everywhere we have the text:

  • This file is licensed under the Affero General Public License version 3 or
  • later. See the COPYING file.

But removed COPYING and added LICENSE.

minor aria2c improvements

i had a quick look at the aria2c usage (https://github.com/e-alfred/ocdownloader#aria2-installation) and noticed some things... (i have no idea if changing the readme.md is enough or it has to be changed elsewhere, therefore just the issue and no PR):

  • -c and --continue=true is redundant, so to stay in line with using the readable options -c should be deleted

  • maybe --remote-time=true can be added?

    Retrieve timestamp of the remote file from the remote HTTP/FTP server and if it is available, apply it to the local file.

  • and at the end just cosmetic issues to stay in line with the full human readable options:

    • -D may be replaced by --daemon=true
    • --enable-rpc may be replaced by --enable-rpc=true

Class OC_OCS_Result not found

Tried to downlaod a file today. With the Firefox plugin I get some log entries like this:
Error: Class 'OC_OCS_Result' not found at /var/www/nextcloud/apps/ocdownloader/appinfo/routes.php#90
and the download is not working.

Trying the same link with the app Web interface I get

Undefined index: result at /var/www/nextcloud/apps/ocdownloader/controller/httpdownloader.php#195 
Undefined index: result at /var/www/nextcloud/apps/ocdownloader/controller/httpdownloader.php#182 
Undefined index: result at /var/www/nextcloud/apps/ocdownloader/controller/httpdownloader.php#181 
Undefined index: result at /var/www/nextcloud/apps/ocdownloader/controller/httpdownloader.php#176

I was thinking about a broken install so I disabled and removed the app and reenabled it again. But the Problem is still there.

I'm using nextcloud 13RC2

Any idea what is going wrong here?

status of development and compatibility (HTTP / FTP) with Curl downloader

As written previously in my commit I am using Nextcloud 12.0.2.

I do not have youtube-DL installed.
I do not have bittorrent working
I do not have Aria installed.

Thus I am testing FTP and HTTP only for now. Using CURL.

When I download FTP the download is working but the app did not set it to complete.
screenshot_2
screenshot_4

Trying to download a FTP-Path without specifying a filename resulted in "Waiting" forever.
The file that got downloaded contained the files listing as text named 1503746171_:

drwxr-xr-x 1 mirror_debian_cd users 4096 Jul 23 02:53 9.1.0
drwxr-xr-x 1 mirror_debian_cd users 4096 Jul 23 16:44 9.1.0-live
lrwxrwxrwx 1 mirror_debian_cd users 5 Jul 23 03:00 current -> 9.1.0
lrwxrwxrwx 1 mirror_debian_cd users 10 Jul 23 21:00 current-live -> 9.1.0-live
-rw-r--r-- 1 mirror_debian_cd users 12797 Aug 26 08:12 ls-lR.gz
drwxr-xr-x 1 mirror_debian_cd users 4096 May 23 2005 project

screenshot_5

HTTP worked properly in my few tests.

Http downloader creates empty /Downloads file if /Downloads/ directory does not exist

Hi,

Ran across an issue on a new install where the (default) /Downloads directory did not exist in the user folder. Upon running Ocdownloader using aria2 (with debug logging), the log showed the following error:

2017-09-25 23:05:01.629799 [ERROR] [AbstractCommand.cc:350] CUID#23 - Download aborted. URI={URL HERE}
Exception: [AbstractCommand.cc:350] errorCode=18 URI={URL HERE} 
  -> [util.cc:1453] errNum=17 errorCode=18 Failed to make the directory /var/ncdata/james/files/Downloads, cause: File exists

My home directory possessed a zero byte /Downloads file. I deleted the file and reran the download request, and I received the same error with the /Downloads file having been recreated.

Steps to reproduce:

  • Delete user's default downloads folder.
  • Add new download
  • inspect log file and home folder for an empty file titled the same as {Default Download Folder}.

Thanks,

James

How to edit minified js files?

As I see minifyed versions of JS must be removed from dev versions. It's almost impossible to edit it and complete impossible to check changes.
Or it's must be provided recommended tool for compression (still bad idea).
I think that files must be compressed immediately before publication.

downloaded files are shown at 0kb size on nextcloud

Hi all,

Maybe I missing something:

Just added Aria2 (1.32.0) and youtube-dl on my installation (nextcloud v12.0.2, postgresql 9.6.5) and it working well except that nextcloud show for every downladed files a 0kb size.

I tried a youtube video, http and torrent download and it's the same thing. I tried to disable nextant (freshly installed too) but that change nothing. But, well, I can download or stream downloaded video from nextcloud, that's working.

Only way I found (for now) in order to have the good sizes is to launch an "occ file:scan".
I don't know if it's related to the "0kb size showing" or if it's normal, but *.aria2c files are always in the "Downloads" directory on the filesystem.

GID is Null cames random?

Hey I got the problem ,
I use Debian9 (a brand new system)with Nextcloud 12.0.4 installed by snap with ocDownloader version 1.5.5.with Aria2
At the begining ,the ocdownloader working property with Aria2 ,which ever using Http or BT.
Then I try to add 1 more BT torrent from the cloud files,but it start to return the message "cant find the GID "to me !
At the same time ,I can use the Webui to manage Aria2,it is working!
I dont know why. Have any solutions?

shell_exec url

$Output = shell_exec ($this->YTDLBinary . ' -i \'' . $this->URL . '\' --get-url --get-filename' . ($ExtractAudio ? ' -f bestaudio -x' : ' -f best') . ($this->ForceIPv4 ? ' -4' : '') . (is_null ($Proxy) ? '' : $Proxy));

$Output = shell_exec ($this->YTDLBinary . ' -i \'' . $this->URL . '\' --get-url --get-filename' . ($ExtractAudio ? ' -f bestaudio -x' : ' -f best') . ($this->ForceIPv4 ? ' -4' : '') . (is_null ($Proxy) ? '' : $Proxy));

Just to have a look at such: $this->URL is put to shell_exec.
The question I ask : Is this command somehow exploitable or might this code be a problem somehow?
Is this URL filtered with care?

Rightnow I only checked the surface. Dont nail me down if this hint is absolutely bogus for some reason. Same for Proxy.

Returned GID is null ! Is Aria2c running as a daemon ? (for torrent files)

Hi, I still get this error (already mentioned here: https://github.com/DjazzLab/ocdownloader/issues/14
when I try to download the contents of a torrent file

  echo390:~# ps aux | grep aria
  downloa+  7245  0.1  0.0 101124 14988 ?        S    15:43   0:00 /usr/bin/aria2c --conf-path=/etc/aria2/aria2.conf

here is my config:

  echo390:~# cat /etc/aria2/aria2.conf
  log=/var/log/aria2/aria2c.log
  enable-rpc=true
  rpc-allow-origin-all=true
  rpc-listen-port=6800
  check-certificate=false
  continue=true
  disable-ipv6=true
  enable-dht6=false
  http-accept-gzip=true
  http-no-cache=true
  metalink-preferred-protocol=https
  save-cookies=/var/local/aria2/cookies
  load-cookies=/var/local/aria2/cookies
  referer=*
  user-agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1
  on-download-complete=/opt/aria2-tools/hooks/aria2_notify_complete
  enable-http-pipelining=true
  console-log-level=info
  log-level=info
  download-result=default
  certificate=/etc/letsencrypt/live/echo390.server4you.de/fullchain.pem
  rpc-certificate=/etc/letsencrypt/live/echo390.server4you.de/fullchain.pem
  private-key=/etc/letsencrypt/live/echo390.server4you.de/privkey.pem
  rpc-private-key=/etc/letsencrypt/live/echo390.server4you.de/privkey.pem
  rpc-secure=false
  save-session=/var/local/aria2/sessions
  save-session-interval=2
  input-file=/var/local/aria2/sessions
  rpc-save-upload-metadata=true
  force-save=true

what am I doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.