I was wondering what are you guys using as front GUI to play other files then DVD (vob) files? I was hoping that JRiver plugin will solve my issues, it work only for music.
Ideas???
Thanks
Marty
Ideas???
Thanks
Marty
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Sub Main(parms As Object)
Telnet
end sub
Sub Telnet()
Dim Reply As String
Const RemoteIP As String = "192.168.0.xx"
Const PortNumber As Integer = 4769
' Connect to the remote
Dim Client As New TcpClient()
Client.Connect(IPAddress.Parse(RemoteIP), PortNumber)
Dim NetStream As NetworkStream = Client.GetStream()
SendString(NetStream, "5100 fnPlay" & VBCRLF)
' Receive reply
'hs.WaitSecs(1)
Dim count = 5
while(count >0)
count = count - 1
Reply = ReadString(Client)
end while
' Send something
'SendString(NetStream, "5100 fnPlay" & VBCRLF)
'hs.WriteLog("debug", Reply)
' Disconnect
Client.Close()
End Sub
Private Function ReadString(ByVal Client As System.Net.Sockets.TcpClient) As String
Dim Stream As NetworkStream = Client.GetStream
Dim Buffersize As Integer = Client.ReceiveBufferSize
Dim Data(Buffersize -1) As Byte
If Stream.CanTimeout Then
Stream.ReadTimeout = 1000 * 15
End If
Dim BytesRead As Integer = Stream.Read(Data, 0, Buffersize)
Return Encoding.ASCII.GetString(Data, 0, BytesRead)
End Function
Private Function SendString(ByVal Stream As NetworkStream, ByVal Data As String) As Boolean
Dim Bytes As [Byte]() = Encoding.ASCII.GetBytes(Data)
If Stream.CanTimeout Then
Stream.WriteTimeout = 1000 * 5
End If
Stream.Write(Bytes, 0, Bytes.Length)
Return True
End Function
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Sub Main(parms As Object)
' No connection could be made because the target machine is off
'while(instr(1,stringForComp,"No connection",1) = 0)
Try
'hs.writelog("Movie Name", "The Movie Name is: " & parms)
Telnet(parms)
Catch e As Exception
'hs.writelog("debug", e.ToString())
stringForComp = e.ToString()
hs.Launch("psexec","\\htpc -i -u <username> -p <password> cmd /c start C:\PROGRA~1\ZOOMPL~1\zplayer.exe")
hs.waitsecs(10)
Telnet(parms)
End Try
'end while
end sub
Sub Telnet(movieName As Object)
Const RemoteIP As String = "192.168.0.xx"
Const PortNumber As Integer = 4769
' Connect to the remote
Dim Client As New TcpClient()
Client.Connect(IPAddress.Parse(RemoteIP), PortNumber)
Dim NetStream As NetworkStream = Client.GetStream()
' Send something
'SendString(NetStream, vbcrlf)
' Receive reply
'hs.WaitSecs(1)
Dim Reply As String = ReadString(Client)
'hs.WriteLog("debug", Reply)
'hs.WriteLog("debug", movieName)
'hs.WaitSecs(1)
if (movieName = "fnEQToggle") then
SendString(NetStream, "5100 fnEQToggle" & vbcrlf)
elseif (movieName = "fnStop") then
SendString(NetStream, "5100 fnStop" & vbcrlf)
else
SendString(NetStream, "1920" & vbcrlf)
hs.WaitSecs(1)
SendString(NetStream, "1850 " & movieName & vbcrlf)
'hs.writelog ("debug", "1930 " & movieName & vbcrlf)
hs.waitsecs(2)
SendString(NetStream, "5100 fnFullscreen" & vbcrlf)
end if
hs.WaitSecs(2)
' Disconnect
Client.Close()
End Sub
Private Function ReadString(ByVal Client As System.Net.Sockets.TcpClient) As String
Dim Stream As NetworkStream = Client.GetStream
Dim Buffersize As Integer = Client.ReceiveBufferSize
Dim Data(Buffersize -1) As Byte
If Stream.CanTimeout Then
Stream.ReadTimeout = 1000 * 15
End If
Dim BytesRead As Integer = Stream.Read(Data, 0, Buffersize)
Return Encoding.ASCII.GetString(Data, 0, BytesRead)
End Function
Private Function SendString(ByVal Stream As NetworkStream, ByVal Data As String) As Boolean
Dim Bytes As [Byte]() = Encoding.ASCII.GetBytes(Data)
If Stream.CanTimeout Then
Stream.WriteTimeout = 1000 * 5
End If
Stream.Write(Bytes, 0, Bytes.Length)
Return True
End Function
Comment