View Single Post
  #46  
Old 23.11.2016, 09:01
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

@Spongshga
Code:
Spongshga has exceeded their stored private messages quota and cannot accept further messages until they clear some space.

Please continue the conversation here or contact me in JD Chat.

I do not have 'rarstreamer.exe'. As I already mentioned, external links are hidden to users, so if you had already posted the link to the software in your previous message, I was not able to access it.

The translation did not help me much to figure out what kind of script you need. I managed to find a 'rarstreamer' software. Not sure if it is the latest version or if it is even the same software you were referring to. I was however, able to use it in a script.

The default 'folder monitor' mode of the software results in 100% CPU (maxing one core) usage. There is however, an additional option, to directly extract the archives. It appears to be working without any problems and I have used that in the script. Once the extraction is started, it will wait and automatically (without any user interaction) continue extracting when the next part becomes available. It also has an option to extract password protected archives, but it seems to be broken.

Code:
Assertion failed: files_to_unpack.size() == passwords.size(), file stream_unrar.cpp, line 695
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information

Script:

Code:
// Stream Archives
// Trigger : "Downloadlist Contextmenu Button"
// Note: Selection must be a finished link (not package)
// rarstreamer used: **External links are only visible to Support Staff**

if (name == "Stream Archive") {
    if (dlSelection.isLinkContext()) {
        var link = dlSelection.getContextLink();
        var file = link.getDownloadPath();
        var downloadFolder = link.getPackage().getDownloadFolder();
        var rarstreamer = "c:/portable/rarstreamer/stream_unrar.exe"; /* <- Set full path to rarstreamer */
        var player = "c:/portable/videolan/vlc/vlc.exe"; /* <- Set full path to media player */
        var streamFolder = downloadFolder + "/stream";

        if (getPath(file).exists()) {
            callAsync(function() {}, rarstreamer, "-a", file, "-d", streamFolder);
            callAsync(function() {}, player, streamFolder);
        }
    }
}
Reply With Quote