JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #141  
Old 10.12.2020, 21:10
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Quote:
@dockel: All 3 new scripts needed to be updated. Please replace your existing scripts with the latest version.
Yes yes, I had done already, many thanks.

Quote:
You mean if there are multiple variants in the list, select one you want and disable the other variants?
That would be a good alternatvie, I guess. Disable or move / get the other variants to history.txt. I actually meant, I download one variant of a video. When I add that video again to JD I (unwanted) might download it again because I load another variant of the video I have downloaded before. To avoid that, it would be good if all of the variants would be disabled / marked as dups.
__________________
Aktuelles Windows
Reply With Quote
  #142  
Old 10.12.2020, 21:53
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,125
Default

Quote:
Originally Posted by Dockel View Post
... it would be good if all of the variants would be disabled / marked as dups.
Do you mean, the variant added via add links dialog or clipboard is disabled, but other variants of the same video, when added via context menu are not disabled?
Reply With Quote
  #143  
Old 10.12.2020, 22:26
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Sorry, I am not quite sure to understand. I want to avoid to download the same video again, independently of the version. Once I have download one of the offered versions, e.g. 720 p I never again want to download any version of that video, for example I do not want to download the 1080 p version or 480 p version and none of the others, I never want to download that video again. So because of that it would be good if all of those varaints (I chose one from to download) would be disabled / marked as dups because I never again want to download the same video independently of the variant.
__________________
Aktuelles Windows
Reply With Quote
  #144  
Old 10.12.2020, 22:32
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,125
Default

Quote:
Originally Posted by Dockel View Post
... it would be good if all of those varaints (I chose one from to download) would be disabled / marked as dups because I never again want to download the same video independently of the variant.
For YT links, the script has been modified to match the video url and not the variant url, which means when you add YR links to JD, all variants of that video url, should automatically be disabed Is it not doing that?
Reply With Quote
  #145  
Old 10.12.2020, 22:46
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Ay, yes, indeed, it does it, I just tried. Didn't notice that before, sorry. That's extremely useful.

Thank you very much!
__________________
Aktuelles Windows
Reply With Quote
  #146  
Old 11.12.2020, 11:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,605
Default

@mgpai: for YT videos, better process the properties, you can directly fetch the videoID via getProperty("YT_ID")
__________________
JD-Dev & Server-Admin
Reply With Quote
  #147  
Old 29.01.2021, 11:07
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Since yesterday there are some links shown to be duplicates which (actually) cannot be duplicates.

Why could this happen? How could one avoid that?
__________________
Aktuelles Windows
Reply With Quote
  #148  
Old 29.01.2021, 13:11
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,125
Default

Quote:
Originally Posted by Dockel View Post
Since yesterday there are some links shown to be duplicates which (actually) cannot be duplicates.

Why could this happen? How could one avoid that?
Which site?
Reply With Quote
  #149  
Old 29.01.2021, 13:23
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Do you mean the hoster (zippy, anonfiles) or the website the links are from?
__________________
Aktuelles Windows
Reply With Quote
  #150  
Old 29.01.2021, 13:37
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,125
Default

Quote:
Originally Posted by Dockel View Post
Do you mean the hoster (zippy, anonfiles) or the website the links are from?
Hoster url. Does it happen only on particular sites or all sites? Are they direct links or obtained from container like filecrypt?

I think you had requested to run dupe check on download list links. So, check if the url is present there. It obviously is matching some string from the history file or download list . You have to just find out which url is it matching and on which list.
Reply With Quote
  #151  
Old 29.01.2021, 13:52
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Quote:
Hoster url. Does it happen only on particular sites or all sites? Are they direct links or obtained from container like filecrypt?
Until now it's only the mentioned ones. Just transferred by copying the link (to the clipboard and automatically added to JD then).

Quote:
I think you had requested to run dupe check on download list links.
Sorry, I do not understand what that means. The links are marked (disabled) as dupes in the link grabber window. There is no dupe in the downloadlist then.

Quote:
You have to just find out which url is it matching and on which list.
I am not quite sure to understand. I would think there is only one option, the history.txt (there is no dupe in the downloadlist). So I thought the same link is already contained there. May be the dupe links are the same but they are leading to other content / another rar / zip file.
__________________
Aktuelles Windows
Reply With Quote
  #152  
Old 29.01.2021, 13:56
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,125
Default

@Dockel: Please contact me in chat when you are free.
Reply With Quote
  #153  
Old 29.01.2021, 14:38
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Sorry, I do not know how to ping
__________________
Aktuelles Windows
Reply With Quote
  #154  
Old 31.01.2021, 15:46
DragoBleaPiece DragoBleaPiece is offline
Baby Loader
 
Join Date: Jun 2020
Posts: 6
Default

Quote:
Originally Posted by mgpai View Post
Replacement scripts

Script #3
Code:
/* 
    Disable duplicate link in Lingrabber list
    Trigger required: A new link has been added
*/

var link = crawledLink;

if (link.availableState == "ONLINE") {
    var file = getPath(JD_HOME + "/cfg/history.txt");

    var lock = getModifyLock(file.name);
    lock.writeLock();

    var urls = getProperty(file.name, true);

    if (urls == null) {
        urls = file.exists() && readFile(file) || "";
        setProperty(file.name, urls, true);
    }

    lock.writeUnlock();

    if (urls) {
        var url = link.contentURL || link.pluginURL;

        if (link.host == "youtube.com") {
            url = link.containerURL;
        }

        if (urls.indexOf(url) > -1) {
            var text = "#duplicatelink";
            var comment = link.comment;

            if (comment) {
                text = text + " " + comment;
            }

            link.comment = text;
            link.enabled = false;
        }
    }
}


the app sorta hang up every time i add link when i enable the script. i can't click any option in the pop-up message, i can't close the app. i even have to force close it via task manager. can u help me pls? thanks

Last edited by DragoBleaPiece; 31.01.2021 at 15:48.
Reply With Quote
  #155  
Old 31.01.2021, 16:00
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,125
Default

Quote:
Originally Posted by DragoBleaPiece View Post
the app sorta hang up every time i add link when i enable the script. i can't click any option in the pop-up message, i can't close the app. i even have to force close it via task manager. can u help me pls? thanks
Caused by a bug. Yet to be fixed by the developers.

Solution: Disable "Synchronous Execution of script" checkbox in the top panel of the script editor.
Reply With Quote
  #156  
Old 31.01.2021, 20:46
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Hello mgpai,

the same happens again with the same kind of links: https://board.jdownloader.org/showpo...&postcount=147

The links are not in history.txt.
__________________
Aktuelles Windows
Reply With Quote
  #157  
Old 01.02.2021, 10:27
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,125
Default

Quote:
Originally Posted by Dockel View Post
... the same happens again with the same kind of links ... The links are not in history.txt.
The 'new link added' script only marks as dupe, if a matching entry is found in the hsitory file. Maybe it is matching a different format, but it is matching something.

For testing purposes, temporarily replace the existing history file with an empty one and see if the link will still be marked as duplicate.

You can also use the following script to find the matching entry (if any) in history file.
Code:
/* 
    Find matching entry for the selected link in history file
    Trigger required: Linkgrabber Contextmenu Button Pressed
*/

if (name = "Find in history") {
    var link = lgSelection.contextLink;
    var file = getPath(JD_HOME + "/cfg/history.txt");
    var entries = readFile(file).split("\r\n");
    var line = null;
    var url = link.contentURL || link.pluginURL;

    if (link.host == "youtube.com") {
        url = link.containerURL;
    }

    entries.some(function(entry, index) {
        if (entry == url) {
            line = index + 1;
            return true;
        }
    })
    
    if (line) {
        alert("Found \"" + url + "\" on Line " + line + " in \"" + file + "\"");
    } else {
        alert("No matching entriy found for \"" + url + "\".");
    }
}

To fix the issue, should be able to find the cause and reproduce the same outcome consistently. Contact me in chat after you run the tests.
Reply With Quote
  #158  
Old 01.02.2021, 10:56
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default

Thank you!

I added four links which are marked as dupes. Did not find them in history.txt. Replaced that file, added those links again, they were marked as dupes:



I added the script:


I am in the chat now.
__________________
Aktuelles Windows
Reply With Quote
  #159  
Old 23.02.2021, 18:03
Amiganer Amiganer is offline
JD Beta
 
Join Date: Mar 2019
Posts: 58
Default Summary?

Hello.

Thanks for thw ork to the problem.
Can someone please put alle actual Scripts in one post (I'm a littlebit confused, what script is which one). Thank You.

Bye, Christian
Reply With Quote
  #160  
Old 16.03.2021, 21:11
Dockel Dockel is offline
Black Hole
 
Join Date: Feb 2020
Posts: 258
Default How could I avoid such messages?

How could I avoid such messages:


They show up when I add a file to the history.
__________________
Aktuelles Windows
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 21:45.
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 - 2021, Jelsoft Enterprises Ltd.