JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 26.12.2020, 14:25
invisibleman78 invisibleman78 is offline
JD VIP
 
Join Date: May 2009
Posts: 322
Question MyJDownloader: Warteschlange sortieren nach Paket-Grösse?

Eine sehr nützliche Feature wäre die Möglichkeit, wenn man die Einträge in der Warteschlange ("Pakete") nach Grösse sortieren könnte.

Am bequemsten wäre es, wenn für alle markierten Einträge mit einem Rechtsklick "Nach Paket-Grösse sortieren" verfügbar wäre. Dann kann jeder selber wählen, auf welche Einträge man die Sortierung anwenden will.

Es kommt öfters vor, dass man z.B. Abends lieber noch ein Captcha für ein grösseres Paket lösen will, als für ein wenige MB grosses. Jeweils manuell nach dem grössten Paket zu suchen ist je nach Anzahl Einträge in der Warteschlange einigermassen aufwändig.
Reply With Quote
  #2  
Old 28.12.2020, 14:21
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

Derzeit wird im JDownloader die Sortierung von der GUI/Table Framework durchgeführt und es gibt
noch keine API welche eine Sortierung anbietet

Ich würde hier nicht in naher Zukunft von einer Lösung/Bearbeitung ausgehen, da neben der API ebenfalls die Clients hier die neuen Funktionen unterstützten müssen.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 28.12.2020, 16:07
invisibleman78 invisibleman78 is offline
JD VIP
 
Join Date: May 2009
Posts: 322
Default

Danke für die Erklärung und den Hinweis, @Jiaz
Reply With Quote
  #4  
Old 28.12.2020, 16:20
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

Nichts zu danken! Habe ja letztendlich nur erklärt, nichts behoben/gelöst
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 28.12.2020, 16:54
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Jiaz View Post
Nichts zu danken! Habe ja letztendlich nur erklärt, nichts behoben/gelöst
@Jiaz: A workaround is possible to sort ALL download packages, using array sort and movePackages MYJD API method in eventscripter, either at user-specified time(s), using 'interval' trigger or by entering a keyword and parsing it with "new crawler job" trigger.
Reply With Quote
  #6  
Old 28.12.2020, 17:19
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

@mgpai: true but that's nothing you can do on click via MyJDownloader
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 28.12.2020, 17:30
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Jiaz View Post
@mgpai: true but that's nothing you can do on click via MyJDownloader
Time based (interval) should be possible via any interface. If it is WebUI, can enter a keyword e.g. "sortbysize" in 'add links' dialog and parse/match it using "new crawler job" to run the script. Not sure how efficient it is though. I will mail the scripts to you.
Reply With Quote
  #8  
Old 28.12.2020, 18:01
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

@mgpai: create idea to use job.text as *command*
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 28.12.2020, 18:04
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Eventscripter script to sort download packages by size in WebUI.

Code:
/*
    Sort file packages
    Trigger: New Crawler Job
    To sort ALL download packages by size, open "add links" dialog and type "sortbysize" (without quotes) and click "continue" button
*/    

if (job.text == "sortbysize") {

    var packages = getAllFilePackages().sort(function(a, b) {
        return a.bytesTotal - b.bytesTotal;
    })

    packages.forEach(function(package) {
        callAPI("downloadsV2", "movePackages", [package.UUID], -1);
    })

    job.text = "";
}
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 18:18.
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 - 2024, Jelsoft Enterprises Ltd.