GithubHelp home page GithubHelp logo

cr1tika7 / my.jdownloader.api Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 7.0 139 KB

An My.JDownloader API wrapper for c#. A rewritten and extended version of https://github.com/noone2407/MyJDownloaderApi

License: GNU General Public License v3.0

C# 100.00%

my.jdownloader.api's People

Stargazers

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

Watchers

 avatar  avatar

my.jdownloader.api's Issues

QueryPackages doesn't return SaveTo Property

Using handler.DownloadsV2.QueryPackages(new LinkQueryRequest()); to query package doesn't return the SaveTo property
image

Example Console App

using My.JDownloader.Api;
using My.JDownloader.Api.Models.DownloadsV2.Request;
using My.JDownloader.Api.Models.DownloadsV2.Response;

JDownloaderHandler main = new JDownloaderHandler("xxxxxxxxxxxxxxxxxxxxxxx");
main.Connect("xxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxx");

DeviceHandler handler = main.GetDeviceHandler(main.GetDevices().FirstOrDefault());

IEnumerable<DownloadLinkResponse> Links = handler.DownloadsV2.QueryLinks(new LinkQueryRequest());
IEnumerable<FilePackageResponse> Packages = handler.DownloadsV2.QueryPackages(new LinkQueryRequest());

Adding links and setting directory

In a scenario where we want to add links and change the download location:

Device.LinkgrabberV2.AddLinks(
                new My.JDownloader.Api.Models.LinkgrabberV2.Request.AddLinkRequest
                {
                    Links = url,
                    DestinationFolder = destination,  //ignored always
                    PackageName = package,  //ignored for folders
                    AutoStart = autostart
                });

When adding a single file link PackageName is correct, DestinationFolder is ignored.
When adding a folder link (with multiple files), Both PackageName and DestinationFolder are ignored.
This must be jdownloaders fault for handling it poorly.

The workaround would be to AddLinks > Wait for it to finish > Query packages > SetDownloadDirectory on package IDs
However waiting seems broken in this case:

        public bool IsCollecting()
        {
            if (ApiHandler.CallAction<object>(Device, "/linkgrabberv2/isCollection", null, JDownloaderHandler.LoginObject) == null)
            {
                return false;
            }
            return true;
        }

The method name could have changed in the api since there it states the method should be
isCollecting instead of isCollection
https://my.jdownloader.org/developers/index.html#tag_255

LinkgrabberV2.QueryLinks gibt nur eine leere Liste zurück

Hey Cr1TiKa7,

ein super Projekt hast du erstellt! Habe es getestet und leider bekomme ich keine Objekte von der Funktion "LinkgrabberV2.QueryLinks" zurück. Im JDownloader gibt es einen entsprechenden Link. Dieser ist Online. Sobald der Link im Download Bereich ist, kann ich diesen über die Funktion "DownloadsV2.QueryLinks" abrufen. Leider ist dort der Status immer = null. Mein Ziel ist es, Downloadlinks auf deren Status (Online / Offline) zu überprüfen. Mache ich etwas falsch? Gibt es evtl. noch einen anderen Ansatz mit deiner API den Onlinestatus abzugreifen? Würde mich über eine Antwort freuen!

DownloadController.Start and DownloadController.Stop are incorrectly swapped

Hi,

I found this in the latest version of the code (2.4.2), where it appears that the DeviceHandler.DownloadController.Stop and DeviceHandler.DownloadController.Start methods are swapped.

The Start method calls the "/downloadcontroller/stop" action and the Stop method calls the "/downloadcontroller/start" action.
JDownlooaderIssue

[Question] - How to add a 'comment' to a Package? Missing method from JDownload docs or this API?

Hello!

I have been looking everywhere for this, and I can't seem to find how we can add 'comments' to packages via the API.

I see this support issue on JDownloader that explains how to do it, but it appears the methods are missing.

@mrdial8: I will add a --> (from moderator user: Jiaz)

setComment(long[] linkIds, long[] packageIds,boolean setPackageChildren, String comment)

api method in downloadsV2 and linkgrabberv2 namespace
comment will only be set on specified links/packages if setPackageChildren=false
else it will auto apply comment to all package children, so you don't have to specify them all

In case you need method to be different or other/more methods, please just let us know! -> (from moderator user: Jiaz)

However, when I look on the JDownload API Docs - I do not see the setcomment() method Jiaz was talking about.

Is this a question for JDownloader admins, or for the My.Jdownloader.API?

This library is GREAT!! Thank you!

[Bug??] - I am having a bug sometimes when I connect to my JDownloader instance, verbose details below

Hello!

I have a bug that I believe I found when connecting to my JDownloader instance. This bug only occurs sometimes... Lately its been occurring more and more. The bug appears when I try to 'connect' to my JDownloader instance using: these methods:

image

This is happening more and more.

My Setup

  • Console App (on my desktop
  • JDownloader Client (on my desktop)
  • I also have set up My.Jdownloader.Org connection

See details (This is what it looks like right after the error):

image

Now in this screenshot I opened up My.JDownloader.org:

image

If I hit 'Refresh' (see screenshot) - The Current Connections: 0 quickly changes to 1 and then 2 - then reverts back to 0.

image

Here is a screenshot of the error message. It appears that the method 'UpdateEncryptionToken' has a null value.

image


Is this a bug with the SDK library? Or perhaps this is an issue on my end? I live in NYC and my internet connection is very good, I am not using a VPN. I can help debug this issue.

Where do you think this bug originates from?

Quite critical bug - or so it seems

Hi, thanks for great work but I got something very curios.

Using C# with .Net Core 2.0 and version 2.0.0 of this lib from NuGet. JdHandler is connected and exactly 1 device gets listed with GetDevices().

Code for reproduction:
DeviceHandler JD_Device = _jd.GetDeviceHandler(_jd.GetDevices()[0])
Exception:
System.NullReferenceException: "Object reference not set to an instance of an object."

Not sure if this is already fixed in GitHub as I can't compile from source (missing System.Net.Http in net40).

CleanUp returns API_COMMAND_NOT_FOUND

Hi, I was having a problem calling Cleanup to remove some completed downloads and did a little digging and found out that CleanUp in LinkgrabberV2.cs returns this issues.

Also I had to add ", decryptResponse: true" as in the screenshot as the decryption wasn't working

image

Not sure if you can do anything
Thanks

Documentation is outdated

JDownloaderHandler() requires an appkey, and that is not stated in the readme. I used my login email and it worked fine.

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.