Thread: [In progress] Vk.com Vkontakte.ru
View Single Post
  #2707  
Old 17.08.2019, 20:38
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 26
Default

example URL: **External links are only visible to Support Staff****External links are only visible to Support Staff**
WRONG filename: -67991642_456364887.jpg
RIGHT filename (optional): -67991642_456364887 - xb4q9pK_3sE.jpg

temp server link:
Code:
**External links are only visible to Support Staff**xb4q9pK_3sE.jpg

I would like to use both naming options at the same time. "post id" and "original server file name".

Something similar to what this old script.
Code:
if (link.getHost() == "vkontakte.ru") {

    while (link.getBytesLoaded() == 0) sleep(1000);

    var newName = "_ " + link.getProperty("LINKDUPEID") + " - " + link.getProperty("FINAL_FILENAME");
    var folder = link.getPackage().getDownloadFolder();
    var existsOnDisk = getPath(folder + "/" + newName).exists();

    if (existsOnDisk) {
        link.setEnabled(false);
    } else {
        link.setName(newName);
        link.setComment(link.getProperty("picturedirectlink"));
    }
}
Reply With Quote