Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: margro/TVServerXBMC
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.15.100.137
Choose a base ref
...
head repository: margro/TVServerXBMC
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 5, 2011

  1. Extend GetEPG command with optional start/endtime. Extended version r…

    …eturns also more EPG fields.
    margro committed May 5, 2011

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2f99b31 View commit details

Commits on May 29, 2011

  1. Copy the full SHA
    6b85808 View commit details

Commits on Aug 6, 2011

  1. Add support for fetching TV card settings.

    This will be used lateron to determine the base path of the recordings and LiveTV.
    margro committed Aug 6, 2011
    Copy the full SHA
    5a18908 View commit details

Commits on Aug 16, 2011

  1. Fix webstream detection

    margro committed Aug 16, 2011
    Copy the full SHA
    5994b09 View commit details
  2. Remove useless debug line

    margro committed Aug 16, 2011
    Copy the full SHA
    912bbe3 View commit details
  3. Copy the full SHA
    9f5fb8d View commit details

Commits on Oct 23, 2011

  1. Copy the full SHA
    b3aaf74 View commit details

Commits on Jul 16, 2016

  1. Copy the full SHA
    af58647 View commit details
  2. Copy the full SHA
    4d95572 View commit details
  3. Copy the full SHA
    ab7e930 View commit details
  4. Fix ToThumbFileName() function

    margro committed Jul 16, 2016
    Copy the full SHA
    22c64c6 View commit details
  5. Copy the full SHA
    4744239 View commit details
  6. Allow larger drives and network paths

    Drive size won't go negative when drive is over 1TB. Also allows for UNC
    paths.
    hackthis02 authored and margro committed Jul 16, 2016
    Copy the full SHA
    c6cc6c9 View commit details
  7. Update installer data

    margro committed Jul 16, 2016
    Copy the full SHA
    d31a978 View commit details
  8. Update Changelog

    margro committed Jul 16, 2016
    Copy the full SHA
    07529de View commit details

Commits on Jul 22, 2016

  1. Added: IPv6 support

    margro committed Jul 22, 2016
    Copy the full SHA
    031c291 View commit details

Commits on Nov 6, 2016

  1. Added: Support for detecting the recording type (TV, Radio, webstream)

    Added to support Kodi PVR API 5.1.0
    margro committed Nov 6, 2016
    Copy the full SHA
    b09c2cd View commit details

Commits on Dec 10, 2016

  1. Copy the full SHA
    3456cde View commit details

Commits on Jan 4, 2017

  1. Fixed: Use URL escaping for the GetRecordingInfo and GetScheduleInfo …

    …commands to accept fields with enters inside
    
    This fixes recording playback for in progress recordings when the description fields contains a multi-line string
    margro committed Jan 4, 2017
    Copy the full SHA
    5fc4776 View commit details

Commits on Dec 9, 2018

  1. 1.20.0.140:

    - Added: GetRecordingInfo: Allow resolving the hostname in an RTSP url to an IP-address
    - Fixed: GetRecordingInfo should return the same fields as getrecordings
    - Extended debug logging for adding schedules
    margro committed Dec 9, 2018
    Copy the full SHA
    bdb63b7 View commit details

Commits on Dec 13, 2018

  1. Copy the full SHA
    68822f0 View commit details
  2. Update .gitignore

    margro committed Dec 13, 2018
    Copy the full SHA
    f02cf55 View commit details
  3. Copy the full SHA
    723b209 View commit details

Commits on Dec 15, 2018

  1. Copy the full SHA
    1a09807 View commit details
  2. Update update list

    margro committed Dec 15, 2018
    Copy the full SHA
    94b0c7a View commit details
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/TVServerKodi/*.suo
/TVServerKodi/bin
/TVServerKodi/obj
/TVServerKodi/obj
/TVServerKodi/.vs
/TVServerKodi/MediaPortal_v*
21 changes: 21 additions & 0 deletions TVServerKodi/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
1.20.0.140:
- Added: GetRecordingInfo: Allow resolving the hostname in an RTSP url to an IP-address
- Fixed: GetRecordingInfo should return the same fields as getrecordings
- Extended debug logging for adding schedules
- Fixed: DataWriter could throw an unhandled exception during TVService shutdown

1.15.0.137:
- Fixed: Use URL escaping for the GetRecordingInfo and GetScheduleInfo commands to accept fields with enters inside
This fixes recording playback for in progress recordings when the description fields contains a multi-line string

1.15.0.136:
- Added: Support for detecting the recording type (TV, Radio, webstream)
- Fixed: Add additional exception handling around the GetRecordingURL() function

1.15.0.135:
- Added: IPv6 support (Vista and above)

1.15.0.134:
- Updated: referenced assemblies for TVServer 1.15.0 (final)
- Fixed: GetDriveSpace function for network shares and large disks (credits: Timothy Massing)

1.14.0.133:
- Updated: referenced assemblies for TVServer 1.14.0 (final)
- Updated: solution to VS2013
64 changes: 47 additions & 17 deletions TVServerKodi/Commands/DataWriter.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;
using System.IO;
using TVServerKodi;

namespace TVServerKodi.Commands
{
@@ -18,6 +16,7 @@ class DataWriter
private String listSeparator = ",";
private Converter<string, string> argumentEncoder = new Converter<string, string>(Uri.EscapeDataString);
private Converter<string, string> listEncoder = new Converter<string, string>(Uri.EscapeDataString);
private bool escapeData = true;

public DataWriter(NetworkStream stream)
{
@@ -37,6 +36,7 @@ public void setHumanEncoders()
//listSeparator = Environment.NewLine;
argumentEncoder = new Converter<string, string>(getSameString);
listEncoder = new Converter<string, string>(getSameString);
escapeData = false;
}

public void setArgumentSeparator(String argSep)
@@ -95,38 +95,68 @@ public String makeItemSmart(params Object[] arguments)

public String makeItem(params String[] arguments)
{
ensureNoNull(arguments, "");
try
{
ensureNoNull(arguments, "");

// escape all the arguments
String[] escaped = Array.ConvertAll<string,string>(arguments,argumentEncoder);
// escape all the arguments
String[] escaped = Array.ConvertAll<string, string>(arguments, argumentEncoder);

// join them up
return string.Join(argumentSeparator, arguments);
// join them up
return string.Join(argumentSeparator, arguments);
}
catch
{
return "";
}
}

// writes a command out, ensure that it is written out
public void write(String line)
{
writer.Write(line + commandSeparator);
Console.WriteLine("Socket write: " + line + commandSeparator);
writer.Flush();
try
{
writer.Write(line + commandSeparator);
Console.WriteLine("Socket write: " + line + commandSeparator);
writer.Flush();
}
catch
{ }
}
public void write(String line, bool escapeMe)
{
if (escapeData && escapeMe)
write(Uri.EscapeDataString(line));
else
write(line);
}


public void writeBytes(Byte[] bytes)
{
binWriter.Write(bytes);
binWriter.Flush();
try
{
binWriter.Write(bytes);
binWriter.Flush();
}
catch
{ }
}

public void writeList(List<string> list)
{
ensureNoNull(list, "");
try
{
ensureNoNull(list, "");

// escape every value
List<string> escaped = list.ConvertAll<string>(listEncoder);
// escape every value
List<string> escaped = list.ConvertAll<string>(listEncoder);

// send it as one line
write(String.Join(listSeparator , escaped.ToArray()));
// send it as one line
write(String.Join(listSeparator, escaped.ToArray()));
}
catch
{ }
}


6 changes: 3 additions & 3 deletions TVServerKodi/Commands/GetChannelThumb.cs
Original file line number Diff line number Diff line change
@@ -19,9 +19,9 @@ private string ToThumbFileName(string strName)
{
string strThumbName = strName;

strThumbName.Replace(":", "_");
strThumbName.Replace("/", "_");
strThumbName.Replace("\\", "_");
strThumbName = strThumbName.Replace(":", "_");
strThumbName = strThumbName.Replace("/", "_");
strThumbName = strThumbName.Replace("\\", "_");

return strThumbName;
}
14 changes: 12 additions & 2 deletions TVServerKodi/Commands/GetRecordingInfo.cs
Original file line number Diff line number Diff line change
@@ -24,16 +24,26 @@ public override void handleCommand(string command, string[] arguments, ref TvCon
{
int index = Int32.Parse(arguments[0]);
bool withRTSPurl = false;
bool useUriEncoding = false;
bool resolveRTSPurlToIP = false;

if (arguments.Length >= 2)
{
withRTSPurl = bool.Parse(arguments[1]);
}
if (arguments.Length >= 3)
{
useUriEncoding = bool.Parse(arguments[2]);
}
if (arguments.Length >= 4)
{
resolveRTSPurlToIP = bool.Parse(arguments[3]);
}

result = TVServerConnection.getRecordingInfo(index, withRTSPurl);
result = TVServerConnection.getRecordingInfo(index, withRTSPurl, resolveRTSPurlToIP);
Console.WriteLine(getCommandToHandle() + ":" + index + " " + result);

writer.write(result);
writer.write(result, useUriEncoding);
}
catch
{
9 changes: 7 additions & 2 deletions TVServerKodi/Commands/GetScheduleInfo.cs
Original file line number Diff line number Diff line change
@@ -15,19 +15,24 @@ public GetScheduleInfo(ConnectionHandler connection)

public override void handleCommand(string command, string[] arguments, ref TvControl.IUser me)
{
// we want to list all recordings
String result;

if (arguments != null)
{
try
{
int index = Int32.Parse(arguments[0]);
bool useUriEncoding = false;

if (arguments.Length >= 2)
{
useUriEncoding = bool.Parse(arguments[1]);
}

result = TVServerConnection.GetScheduleInfo(index);
Console.WriteLine("GetScheduleInfo:" + index + " " + result);

writer.write(result);
writer.write(result, useUriEncoding);
}
catch
{
603 changes: 547 additions & 56 deletions TVServerKodi/Installer/MPEI_update_1_10.xml

Large diffs are not rendered by default.

32 changes: 7 additions & 25 deletions TVServerKodi/Installer/TVServerKodi.xmp2
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ Click Next to continue or Cancel to exit Setup.</Value>
</MinVersion>
<MaxVersion>
<Major>1</Major>
<Minor>20</Minor>
<Minor>25</Minor>
<Build>999</Build>
<Revision>0</Revision>
</MaxVersion>
@@ -196,36 +196,18 @@ Click Next to continue or Cancel to exit Setup.</Value>
<Author>Marcel Groothuis, Prashant V</Author>
<HomePage>http://www.scintilla.utwente.nl/~marcelg/xbmc/tvserverxbmc.html</HomePage>
<ForumPage>http://forum.xbmc.org/forumdisplay.php?fid=171</ForumPage>
<UpdateUrl>https://dl.dropbox.com/u/7249985/xbmc/tvserverxbmc/MPEI_Update_1_10.xml</UpdateUrl>
<UpdateUrl>https://www.dropbox.com/s/8r4tw2phh6yzf12/MPEI_update_1_10.xml?dl=1</UpdateUrl>
<Version>
<Major>1</Major>
<Minor>12</Minor>
<Minor>20</Minor>
<Build>0</Build>
<Revision>131</Revision>
<Revision>140</Revision>
</Version>
<ExtensionDescription>With this plugin you can watch Live TV, recordings, EPG and schedules in XBMC (v12.0 or above) and Kodi





. The TVServerKodi plugin extends the MediaPortal TVServer with a dedicated RPC gateway to allow XBMC/Kodi to access and control the TVServer.











</ExtensionDescription>
<ExtensionDescription>With this plugin you can watch Live TV, recordings, EPG and schedules in XBMC (v12.0 or above) and Kodi. The TVServerKodi plugin extends the MediaPortal TVServer with a dedicated RPC gateway to allow XBMC/Kodi to access and control the TVServer.</ExtensionDescription>
<VersionDescription />
<DevelopmentStatus>Stable</DevelopmentStatus>
<OnlineLocation>https://dl.dropbox.com/u/7249985/xbmc/tvserverxbmc/TVServerXBMC-1.12.0.130.mpe1</OnlineLocation>
<ReleaseDate>2014-08-18T19:29:03</ReleaseDate>
<OnlineLocation>https://www.dropbox.com/s/qn8sies9famimgg/TVServerKodi-1.20.0.140.mpe1?dl=1</OnlineLocation>
<ReleaseDate>2018-12-13T19:29:03</ReleaseDate>
<Tags>xbmc, kodi, tv server plugins</Tags>
<Location>..\bin\[Name]-[Version].mpe1</Location>
<Params>
24 changes: 20 additions & 4 deletions TVServerKodi/Listener.cs
Original file line number Diff line number Diff line change
@@ -21,22 +21,38 @@ class Listener
public Listener()
{
this.port = 9596;
this.tcpListener = new TcpListener(IPAddress.Any, port);
CreateTCPListener();
}

public Listener(int listenport)
private void CreateTCPListener()
{
this.port = listenport;
try
{
this.tcpListener = new TcpListener(IPAddress.Any, port);
if (System.Environment.OSVersion.Version.Major < 6)
{
// ipv4 only (older than Vista):
this.tcpListener = new TcpListener(IPAddress.Any, port);

}
else
{
// Dual stack: accept ipv6 and ipv4 connections
this.tcpListener = new TcpListener(IPAddress.IPv6Any, port);
tcpListener.Server.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, false);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}

public Listener(int listenport)
{
this.port = listenport;
CreateTCPListener();
}


public bool StartListening()
{
7 changes: 3 additions & 4 deletions TVServerKodi/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using MediaPortal.Common.Utils;

@@ -11,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TVServerKodi")]
[assembly: AssemblyCopyright("Copyright © Marcel Groothuis 2010-2016")]
[assembly: AssemblyCopyright("Copyright © Marcel Groothuis 2010-2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

@@ -30,8 +29,8 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.14.0.133")]
[assembly: AssemblyFileVersion("1.14.0.133")]
[assembly: AssemblyVersion("1.20.0.140")]
[assembly: AssemblyFileVersion("1.20.0.140")]

// Set usage and compatibility information to MediaPortal v1.3.0 beta and above
[assembly: CompatibleVersion("1.9.100.0", "1.5.0.0")]
Binary file modified TVServerKodi/References/Common.Utils.dll
Binary file not shown.
Binary file modified TVServerKodi/References/PluginBase.dll
Binary file not shown.
Binary file modified TVServerKodi/References/SetupControls.dll
Binary file not shown.
Binary file modified TVServerKodi/References/TVDatabase.dll
Binary file not shown.
Binary file modified TVServerKodi/References/TVLibrary.dll
Binary file not shown.
Binary file modified TVServerKodi/References/TvBusinessLayer.dll
Binary file not shown.
Binary file modified TVServerKodi/References/TvControl.dll
Binary file not shown.
Binary file modified TVServerKodi/References/TvLibrary.Interfaces.dll
Binary file not shown.
227 changes: 163 additions & 64 deletions TVServerKodi/TV/ServerInterface.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions TVServerKodi/TVServerConnection.cs
Original file line number Diff line number Diff line change
@@ -141,9 +141,9 @@ public static bool StopRecording(int schedId)
return serverIntf.StopRecording(schedId);
}

public static string getRecordingInfo(int recordingId, bool withRTSPurl)
public static string getRecordingInfo(int recordingId, bool withRTSPurl, bool resolveRTSPurlToIP)
{
return serverIntf.GetRecordingInfo(recordingId, withRTSPurl);
return serverIntf.GetRecordingInfo(recordingId, withRTSPurl, resolveRTSPurlToIP);
}

public static bool SetRecordingTimesWatched(int recordingId, int timesWatched)
4 changes: 3 additions & 1 deletion TVServerKodi/TVServerKodi.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVServerKodi", "TVServerKodi.csproj", "{CE292E6A-53E2-459D-8C87-673073182152}"
EndProject
Global