JDownloader Community - Appwork GmbH
 

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #17  
Old 20.07.2019, 19:59
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,324
Default

Wer gar keine Einträge haben will könnte in den Profieinstellungen "GeneralSettings.downloaddestinationhistorylength" bzw. "GeneralSettings.maxdownloadlinkhistoryentries" auf 0 setzen. Ungetestet!

Quote:
Originally Posted by Jiaz View Post
@psp: mach mir nen ticke dazu, dann bau ich da wwas ein
Zu Lebzeiten der Menschheit oder später?

Quote:
Originally Posted by Lucaen View Post
ist ja toll, Danke.
Schon genutzt die nicht vorhandene Option?

Quote:
Originally Posted by Lucaen View Post
Kann man das auch irgenwo einstellen das keine neuen Downloadordner in die History hinzugefügt werden
aber die in der History sind auch drinbleiben?
Es sollen zwar hin und wieder neue Downloadordner erstellt werden aber nicht in die History eingetragen werden.
Über den Ereignis-Skripter gäbe es ein Weg um das gewünschte Ziel annährend zu erreichen. Für eine perfekte Lösung müsste vermutlich das obige Ticket realisiert werden.

Hauptskript:
Code:
// No new entries in Download Destination History
// Trigger: Interval (e.g. 10000ms)

var DownloadDestinationHistory_old = getProperty("downloaddestinationhistory", true);

if (typeof DownloadDestinationHistory_old == "object") {
    if (Object.keys(DownloadDestinationHistory_old).length > 0) {
        var DownloadDestinationHistory = callAPI("config", "get", "org.jdownloader.gui.views.linkgrabber.addlinksdialog.LinkgrabberSettings", null, "DownloadDestinationHistory");

        for (var key in DownloadDestinationHistory) {
            if (!DownloadDestinationHistory_old.hasOwnProperty(key)) {
                DownloadDestinationHistory[key].name = null;
            }
        }
        callAPI("config", "set", "org.jdownloader.gui.views.linkgrabber.addlinksdialog.LinkgrabberSettings", null, "DownloadDestinationHistory", DownloadDestinationHistory);
    }
}

Um die Daten im Cache zu haben muss noch ein zweites Skript genutzt werden:
Code:
// Save DownloadDestinationHistory as session cache
// Trigger: JDownloader started
var DownloadDestinationHistory = callAPI("config", "get", "org.jdownloader.gui.views.linkgrabber.addlinksdialog.LinkgrabberSettings", null, "DownloadDestinationHistory");
setProperty("downloaddestinationhistory", DownloadDestinationHistory, true);
Theoretisch könnte man auch die Configdatei auslesen und eine dauerhafte Kopie anlegen statt im Cache es immer einzulesen.


Zusätzlich oder als Alternative kann es auch per Button erfolgen statt beim JD Start:
Code:
// Save DownloadDestinationHistory as session cache
// Trigger: Toolbar Button Pressed
// Eventtriggername: Freeze entries

if (name == "Freeze entries") {
    var DownloadDestinationHistory = callAPI("config", "get", "org.jdownloader.gui.views.linkgrabber.addlinksdialog.LinkgrabberSettings", null, "DownloadDestinationHistory");
    setProperty("downloaddestinationhistory", DownloadDestinationHistory, true);
}

Es ist der erste Fall bei mir wo eine Profieinstellung (LinkgrabberSettings.downloaddestinationhistory) sich eigenständig verändert beim Speichern. Der Wert "time" wird stets aktualisiert. Darum ist eine Lösung über den Wert "time" nicht möglich in diesem Fall um alle "neuen" Einträge zu blockieren.
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.

Last edited by thecoder2012; 20.07.2019 at 20:18.
Reply With Quote
 

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 01:15.
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.