cr1tika7 / my.jdownloader.api Goto Github PK
View Code? Open in Web Editor NEWAn My.JDownloader API wrapper for c#. A rewritten and extended version of https://github.com/noone2407/MyJDownloaderApi
License: GNU General Public License v3.0
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
Using handler.DownloadsV2.QueryPackages(new LinkQueryRequest()); to query package doesn't return the SaveTo property
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());
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
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!
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.
Its taking around 10-20 Seconds to add 1 UJ
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 allIn 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!
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:
This is happening more and more.
My Setup
See details (This is what it looks like right after the error):
Now in this screenshot I opened up My.JDownloader.org:
If I hit 'Refresh' (see screenshot) - The Current Connections: 0
quickly changes to 1
and then 2
- then reverts back to 0
.
Here is a screenshot of the error message. It appears that the method 'UpdateEncryptionToken' has a null value.
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?
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).
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
Not sure if you can do anything
Thanks
JDownloaderHandler() requires an appkey, and that is not stated in the readme. I used my login email and it worked fine.
Good afternoon @Cr1TiKa7 ,
To avoid having to download the entire project, could you generate the new version for Nuget?
Greetings and thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.