diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-19 00:05:33 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-19 00:05:33 -0400 |
| commit | 9e495d38868cdcb127edc5002187f546044f7477 (patch) | |
| tree | f1594d605a188e9cf280d2ecacd337a042bb5963 /MediaBrowser.Controller | |
| parent | bd06308f2c8f33eb646ea07a38157c5a8239ee59 (diff) | |
remove IChannelItem interface
Diffstat (limited to 'MediaBrowser.Controller')
7 files changed, 24 insertions, 17 deletions
diff --git a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs index f662020bb..174cd282a 100644 --- a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs +++ b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs @@ -11,7 +11,7 @@ using MediaBrowser.Model.Entities; namespace MediaBrowser.Controller.Channels { - public class ChannelFolderItem : Folder, IChannelItem + public class ChannelFolderItem : Folder { public ChannelFolderType ChannelFolderType { get; set; } diff --git a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs index 79ad4b36b..098db1891 100644 --- a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs +++ b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs @@ -132,9 +132,9 @@ namespace MediaBrowser.Controller.Channels return IsVisibleStandaloneInternal(user, false) && IsChannelVisible(this, user); } - internal static bool IsChannelVisible(IChannelItem item, User user) + internal static bool IsChannelVisible(BaseItem channelItem, User user) { - var channel = ChannelManager.GetChannel(item.ChannelId); + var channel = ChannelManager.GetChannel(channelItem.ChannelId); return channel.IsVisible(user); } diff --git a/MediaBrowser.Controller/Channels/IChannelItem.cs b/MediaBrowser.Controller/Channels/IChannelItem.cs deleted file mode 100644 index 9b5f0359b..000000000 --- a/MediaBrowser.Controller/Channels/IChannelItem.cs +++ /dev/null @@ -1,11 +0,0 @@ -using MediaBrowser.Controller.Entities; - -namespace MediaBrowser.Controller.Channels -{ - public interface IChannelItem : IHasImages, IHasTags - { - string ChannelId { get; set; } - - string ExternalId { get; set; } - } -} diff --git a/MediaBrowser.Controller/Channels/IChannelMediaItem.cs b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs index 60a29da90..8970879c9 100644 --- a/MediaBrowser.Controller/Channels/IChannelMediaItem.cs +++ b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs @@ -1,11 +1,16 @@ -using MediaBrowser.Model.Channels; +using System; +using MediaBrowser.Model.Channels; using MediaBrowser.Model.Entities; using System.Collections.Generic; namespace MediaBrowser.Controller.Channels { - public interface IChannelMediaItem : IChannelItem + public interface IChannelMediaItem { + string ChannelId { get; set; } + Guid Id { get; set; } + string ExternalId { get; set; } + long? RunTimeTicks { get; set; } string MediaType { get; } diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 4106c7197..d607facf1 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -169,6 +169,9 @@ namespace MediaBrowser.Controller.Entities [IgnoreDataMember] public bool IsOffline { get; set; } + [IgnoreDataMember] + public SourceType SourceType { get; set; } + /// <summary> /// Returns the folder containing the item. /// If the item is a folder, it returns the folder itself diff --git a/MediaBrowser.Controller/Entities/SourceType.cs b/MediaBrowser.Controller/Entities/SourceType.cs new file mode 100644 index 000000000..9c307b4e6 --- /dev/null +++ b/MediaBrowser.Controller/Entities/SourceType.cs @@ -0,0 +1,10 @@ + +namespace MediaBrowser.Controller.Entities +{ + public enum SourceType + { + Library = 0, + Channel = 1, + LiveTV = 2 + } +} diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index f74d82caa..a4f30224b 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -84,7 +84,6 @@ <Compile Include="Channels\ChannelSearchInfo.cs" /> <Compile Include="Channels\IChannel.cs" /> <Compile Include="Channels\IChannelManager.cs" /> - <Compile Include="Channels\IChannelItem.cs" /> <Compile Include="Channels\ChannelAudioItem.cs" /> <Compile Include="Channels\ChannelVideoItem.cs" /> <Compile Include="Channels\Channel.cs" /> @@ -180,6 +179,7 @@ <Compile Include="Entities\Photo.cs" /> <Compile Include="Entities\PhotoAlbum.cs" /> <Compile Include="Entities\Share.cs" /> + <Compile Include="Entities\SourceType.cs" /> <Compile Include="Entities\UserView.cs" /> <Compile Include="Entities\UserViewBuilder.cs" /> <Compile Include="FileOrganization\IFileOrganizationService.cs" /> |
