Skip to content

Commit

Permalink
Update Ruutu+ Lataaja v2 .vbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lovsan authored May 15, 2018
1 parent 6d33845 commit c783afe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Ruutu+ Lataaja v2 .vbs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down

0 comments on commit c783afe

Please sign in to comment.