From d4179818cc3d9f7636428d51f5088aedc6def475 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Mon, 28 Mar 2011 21:23:11 -0700 Subject: [PATCH] removed upnp code --- NzbDrone.Core/NzbDrone.Core.csproj | 4 - .../Providers/IMediaDiscoveryProvider.cs | 13 --- NzbDrone.Core/Providers/IMediaProvider.cs | 35 ------ .../Providers/MediaDiscoveryProvider.cs | 40 ------- NzbDrone.Core/Providers/XBMCMediaProvider.cs | 109 ------------------ 5 files changed, 201 deletions(-) delete mode 100644 NzbDrone.Core/Providers/IMediaDiscoveryProvider.cs delete mode 100644 NzbDrone.Core/Providers/IMediaProvider.cs delete mode 100644 NzbDrone.Core/Providers/MediaDiscoveryProvider.cs delete mode 100644 NzbDrone.Core/Providers/XBMCMediaProvider.cs diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index f91a198ed..1ce775137 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -217,13 +217,9 @@ - - - - diff --git a/NzbDrone.Core/Providers/IMediaDiscoveryProvider.cs b/NzbDrone.Core/Providers/IMediaDiscoveryProvider.cs deleted file mode 100644 index ad009f983..000000000 --- a/NzbDrone.Core/Providers/IMediaDiscoveryProvider.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NzbDrone.Core.Providers -{ - public interface IMediaDiscoveryProvider - { - bool DiscoveredMedia { get; } - List Providers { get; } - } -} diff --git a/NzbDrone.Core/Providers/IMediaProvider.cs b/NzbDrone.Core/Providers/IMediaProvider.cs deleted file mode 100644 index d3789b63b..000000000 --- a/NzbDrone.Core/Providers/IMediaProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NzbDrone.Core.Providers -{ - public interface IMediaProvider - { - void Play(); - void Play(string Location); - void Play(string Location, bool AddToQueue); - void Pause(); - void Stop(); - - void Next(); - void Previous(); - void Seek(string RawTime); - void Seek(int Hour, int Minute, int Second); - void Seek(System.TimeSpan SeekTime); - - void Queue(string Location); - - System.Uri Uri { get; } - string UniqueDeviceName { get; } - OpenSource.UPnP.UPnPDevice Device { get; } - OpenSource.UPnP.AV.CpAVTransport Transport { get; } - string FriendlyName { get; } - - DateTime FirstSeen { get; } - DateTime LastSeen { get; } - bool IsActive { get; } - - } -} diff --git a/NzbDrone.Core/Providers/MediaDiscoveryProvider.cs b/NzbDrone.Core/Providers/MediaDiscoveryProvider.cs deleted file mode 100644 index 76a1b8f55..000000000 --- a/NzbDrone.Core/Providers/MediaDiscoveryProvider.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NzbDrone.Core.Providers -{ - public class MediaDiscoveryProvider : IMediaDiscoveryProvider - { - #region IMediaDiscoveryProvider Members - - public bool DiscoveredMedia - { - get { return (OpenSource.UPnP.AudioVideoDevices.Instance.Devices.Count > 0); } - } - - private object _lock = new object(); - public List Providers - { - get { - lock (_lock) - { - List list = new List(); - foreach (OpenSource.UPnP.IAVDevice device in OpenSource.UPnP.AudioVideoDevices.Instance.Devices) - { - OpenSource.XBMC.XBMCAVDevice xbmc = (device as OpenSource.XBMC.XBMCAVDevice); - if (xbmc != null) - { - XBMCMediaProvider newX = new XBMCMediaProvider(xbmc); - list.Add(newX); - } - } - return list; - } - } - } - - #endregion - } -} diff --git a/NzbDrone.Core/Providers/XBMCMediaProvider.cs b/NzbDrone.Core/Providers/XBMCMediaProvider.cs deleted file mode 100644 index 9bd16af05..000000000 --- a/NzbDrone.Core/Providers/XBMCMediaProvider.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NzbDrone.Core.Providers -{ - public class XBMCMediaProvider : IMediaProvider - { - public OpenSource.XBMC.XBMCAVDevice XBMCDevice{ get; set; } - public XBMCMediaProvider(OpenSource.XBMC.XBMCAVDevice XBMCDevice) - { - this.XBMCDevice = XBMCDevice; - } - - #region IAVDevice Members - - public DateTime FirstSeen { get { return XBMCDevice.FirstSeen; } } - public DateTime LastSeen { get { return XBMCDevice.LastSeen; } } - public bool IsActive - { - get - { - return XBMCDevice.IsActive; - } - } - -public void Play() - { - XBMCDevice.Play(); - } - public void Play(string Location) - { - XBMCDevice.Play(Location); - } - public void Play(string Location, bool AddToQueue) - { - XBMCDevice.Play(Location, AddToQueue); - } - public void Stop() - { - XBMCDevice.Stop(); - - } - - public void Next() - { - XBMCDevice.Next(); - } - public void Previous() - { - XBMCDevice.Previous(); - } - public void Seek(string RawTime) - { - XBMCDevice.Seek(RawTime); - } - public void Seek(int Hour, int Minute, int Second) - { - XBMCDevice.Seek(Hour, Minute, Second); - } - public void Seek(System.TimeSpan SeekTime) - { - XBMCDevice.Seek(SeekTime); - } - - - public void Queue(string Location) - { - XBMCDevice.Queue(Location); - } - - - public OpenSource.UPnP.UPnPDevice Device { - get { return XBMCDevice.Device; } - } - public void Pause() - { - XBMCDevice.Pause(); - } - - public System.Uri Uri - { - get { return XBMCDevice.Uri; } - } - public string UniqueDeviceName - { - get { return XBMCDevice.UniqueDeviceName; } - } - - public OpenSource.UPnP.AV.CpAVTransport Transport - { - get - { - return XBMCDevice.Transport; - } - } - - public string FriendlyName - { - get - { - return XBMCDevice.FriendlyName; - } - } - - #endregion - } -}