JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 26.08.2023, 21:57
Dyce Dyce is offline
Modem User
 
Join Date: Aug 2023
Posts: 4
Question Deprecated API: Get download progress

Hello everyone,

what is the expected workflow for getting download progress from the API? Should I just call queryPackages/queryLinks periodically or is there some better way? Sorry if this was asked before but I could not find any results.
Reply With Quote
  #2  
Old 28.08.2023, 14:22
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,914
Default

@Dyce: either poll via queryPackages/queryLinks methods or use make use of events system (events namespace) and subscribe to wished events and then use eventlistener via long polling connection. first way is totally fine

In case you need further help/got questions on this, you may also contact via support@jdownloader.org
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 28.08.2023, 15:12
Dyce Dyce is offline
Modem User
 
Join Date: Aug 2023
Posts: 4
Default

Using the event system would be amazing, but I noticed there are no events fired when download progresses, only when it e.g. starts/stops. I subscribed using this endpoint: /events/subscribe?[".*"]&[]

So I guess there is no way around periodically polling for packages/links if I want to see the download progress, or is there?

Last edited by Dyce; 28.08.2023 at 15:36.
Reply With Quote
  #4  
Old 28.08.2023, 15:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,914
Default

@Dyce: the events do exist but I will have to check what maybe be missing/required in order to get them working. I will check as soon as I find time
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 28.08.2023, 16:36
Dyce Dyce is offline
Modem User
 
Join Date: Aug 2023
Posts: 4
Default

That would be awesome, thank you very much for this!
Reply With Quote
  #6  
Old 01.09.2023, 13:49
Dyce Dyce is offline
Modem User
 
Join Date: Aug 2023
Posts: 4
Default

Just an update, it seems that "ADD_LINK" event is also not being fired. When I add package with link from linkcollector to downloads, only these events are fired.
Spoiler:

Code:
        {
            "eventdata": null,
            "eventid": "CONTENT_REMOVED",
            "publisher": "linkcollector"
        },
        {
            "eventdata": null,
            "eventid": "REFRESH_STRUCTURE",
            "publisher": "downloads"
        },
        {
            "eventdata": null,
            "eventid": "ADD_CONTENT",
            "publisher": "downloads"
        },
        {
            "eventdata": {
                "afterUuid": 1693564977305,
                "uuid": 1693565033307
            },
            "eventid": "ADD_PACKAGE",
            "publisher": "downloads"
        },
        {
            "eventdata": null,
            "eventid": "RUNNING",
            "publisher": "downloadwatchdog"
        },
        {
            "eventdata": {
                "running": true,
                "uuid": 1634236843049
            },
            "eventid": "LINK_UPDATE.running",
            "publisher": "downloads"
        },
        {
            "eventdata": {
                "running": true,
                "uuid": 1685812581654
            },
            "eventid": "PACKAGE_UPDATE.running",
            "publisher": "downloads"
        }
Reply With Quote
  #7  
Old 22.09.2023, 02:08
toms toms is offline
Modem User
 
Join Date: Sep 2023
Posts: 2
Thumbs up

+1 to this feature, it would be awesome to get download progress by suscribing and listening to it, not by querying it every 2 or 5 seconds or so.
Reply With Quote
  #8  
Old 30.01.2024, 01:26
toms toms is offline
Modem User
 
Join Date: Sep 2023
Posts: 2
Default

Is there a way to do this by polling the events API via open websocket/stream?
Thanks in advance
Reply With Quote
  #9  
Old 31.01.2024, 12:34
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,668
Default

Quote:
Originally Posted by toms View Post
Is there a way to do this by polling the events API via open websocket/stream?
Thanks in advance
Query "aggregatedNumbers" with HTTP request using "polling" namespace of the deprecated API. Default API port can be changed in advanced settings.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 00:35.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.