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 committed May 15, 2018
1 parent 0843a01 commit e72577f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Ruutu+ Lataaja v2 .vbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gatlingurl = "http:https://gatling.nelonenmedia.fi/media-xml-cache?id=" & xmlid
fullurl = gatlingurl
xmltag = "CastMediaFile"
' folder = "downloads" TODO
'vlcPath = "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" ' TODO, says file not found? path should be correct???
vlcPath = "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe " ' TODO, says file not found? path should be correct???
' ffmpegPath "" TODO

If xmlid = "" then wscript.Quit 1' if no ID typed, quit program
Expand All @@ -38,7 +38,7 @@ sFilePath = Elem.firstChild.nodeValue
Next

dim vlcd
vlcd=inputbox("type > stream = Open with vlc player, type > download = Download the file", "Ruutu+ Lataaja", "download")
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
If vlcd = "stream" then wscript.Echo ("Starting stream with VLC Player")

Expand Down Expand Up @@ -73,13 +73,14 @@ 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")
vlcCommand = "vlc.exe """ + sFilePath +""""
'wscript.Echo vlcCommand
wscript.Echo "Opening playlist - " & sFilePath
vlcCommand = "" + vlcPath + "" + sFilePath + """"
'vlcCommand = "vlc.exe """ + sFilePath +""""
wscript.Echo vlcCommand
'wscript.Echo "Opening playlist - " & sFilePath
vlc.Run vlcCommand, 1, True
End Select
wscript.Echo "Thank you for using Ruutu+ lataaja!"
Expand Down

0 comments on commit e72577f

Please sign in to comment.