diff --git a/Ruutu+ Lataaja v2 .vbs b/Ruutu+ Lataaja v2 .vbs index 70a7ed6..f562055 100644 --- a/Ruutu+ Lataaja v2 .vbs +++ b/Ruutu+ Lataaja v2 .vbs @@ -36,6 +36,11 @@ For Each Elem In xmlCol sFilePath = Elem.firstChild.nodeValue Next +if sFilePath = Empty then +wscript.Echo "This video cant be downloaded or streamed - DRM active" +wscript.Quit 1 +end if + dim vlcd vlcd=inputbox("type > stream = Open with vlc player, type > download = Download the file", "Ruutu+ Lataaja", "download") If vlcd = "" then wscript.echo "Input Empty. Closing program" 'wscript.Quit 1' if no ID typed, quit program @@ -60,19 +65,14 @@ sTempFilePath=inputbox("Choose filename.", "Ruutu + lataaja") oFolder = BrowseForFolder() & "\" FilePath = oFolder & sTempFilePath & filext -'if (sFilePath Is Nothing) then wscript.Echo ("This video cant be downloaded or streamed - DRM active"), 1 - if sFilePath = Empty then - wscript.Echo "This video cant be downloaded or streamed - DRM active" - wscript.Quit 1 - end if WScript.Echo "Saving To file ->" & FilePath - sCommand = "ffmpeg -y -i """ + sFilePath + """ -c:v copy -c:a copy """ + FilePath + """" if FilePath = "" then wscript.Quit 1 Set oShell = WScript.CreateObject("WScript.Shell") oShell.Run sCommand, 1, True wscript.Echo "file download complete - " & FilePath wscript.Echo "Thank you for using Ruutu+ lataaja!" + 'Stream file with vlc player case "stream" set vlc = WScript.CreateObject("Wscript.Shell")