From d091fe0e6e5923bd0ce597c83d9a76650e3dc7f9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 8 Oct 2014 19:31:44 -0400 Subject: extract classes --- .../Channels/AllChannelMediaQuery.cs | 61 +++++++++++++++++++++ MediaBrowser.Model/Channels/ChannelFeatures.cs | 11 ---- MediaBrowser.Model/Channels/ChannelFolderType.cs | 11 ++++ .../Channels/ChannelItemSortField.cs | 13 +++++ MediaBrowser.Model/Channels/ChannelMediaType.cs | 9 ---- MediaBrowser.Model/Channels/ChannelQuery.cs | 62 +--------------------- 6 files changed, 86 insertions(+), 81 deletions(-) create mode 100644 MediaBrowser.Model/Channels/AllChannelMediaQuery.cs create mode 100644 MediaBrowser.Model/Channels/ChannelFolderType.cs create mode 100644 MediaBrowser.Model/Channels/ChannelItemSortField.cs (limited to 'MediaBrowser.Model/Channels') diff --git a/MediaBrowser.Model/Channels/AllChannelMediaQuery.cs b/MediaBrowser.Model/Channels/AllChannelMediaQuery.cs new file mode 100644 index 000000000..c5631899e --- /dev/null +++ b/MediaBrowser.Model/Channels/AllChannelMediaQuery.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Querying; + +namespace MediaBrowser.Model.Channels +{ + public class AllChannelMediaQuery + { + /// + /// Gets or sets the channel ids. + /// + /// The channel ids. + public string[] ChannelIds { get; set; } + + /// + /// Gets or sets the user identifier. + /// + /// The user identifier. + public string UserId { get; set; } + + /// + /// Skips over a given number of items within the results. Use for paging. + /// + /// The start index. + public int? StartIndex { get; set; } + + /// + /// The maximum number of items to return + /// + /// The limit. + public int? Limit { get; set; } + + /// + /// Gets or sets the content types. + /// + /// The content types. + public ChannelMediaContentType[] ContentTypes { get; set; } + + /// + /// Gets or sets the extra types. + /// + /// The extra types. + public ExtraType[] ExtraTypes { get; set; } + public TrailerType[] TrailerTypes { get; set; } + + public AllChannelMediaQuery() + { + ChannelIds = new string[] { }; + + ContentTypes = new ChannelMediaContentType[] { }; + ExtraTypes = new ExtraType[] { }; + TrailerTypes = new TrailerType[] { }; + + Filters = new ItemFilter[] { }; + Fields = new List(); + } + + public ItemFilter[] Filters { get; set; } + public List Fields { get; set; } + } +} \ No newline at end of file diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.cs index ef9ef67f2..8dfdbcd7a 100644 --- a/MediaBrowser.Model/Channels/ChannelFeatures.cs +++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs @@ -82,15 +82,4 @@ namespace MediaBrowser.Model.Channels DefaultSortFields = new List(); } } - - public enum ChannelItemSortField - { - Name = 0, - CommunityRating = 1, - PremiereDate = 2, - DateCreated = 3, - Runtime = 4, - PlayCount = 5, - CommunityPlayCount = 6 - } } diff --git a/MediaBrowser.Model/Channels/ChannelFolderType.cs b/MediaBrowser.Model/Channels/ChannelFolderType.cs new file mode 100644 index 000000000..9261cb5cd --- /dev/null +++ b/MediaBrowser.Model/Channels/ChannelFolderType.cs @@ -0,0 +1,11 @@ +namespace MediaBrowser.Model.Channels +{ + public enum ChannelFolderType + { + Container = 0, + + MusicAlbum = 1, + + PhotoAlbum = 2 + } +} \ No newline at end of file diff --git a/MediaBrowser.Model/Channels/ChannelItemSortField.cs b/MediaBrowser.Model/Channels/ChannelItemSortField.cs new file mode 100644 index 000000000..6b5015b77 --- /dev/null +++ b/MediaBrowser.Model/Channels/ChannelItemSortField.cs @@ -0,0 +1,13 @@ +namespace MediaBrowser.Model.Channels +{ + public enum ChannelItemSortField + { + Name = 0, + CommunityRating = 1, + PremiereDate = 2, + DateCreated = 3, + Runtime = 4, + PlayCount = 5, + CommunityPlayCount = 6 + } +} \ No newline at end of file diff --git a/MediaBrowser.Model/Channels/ChannelMediaType.cs b/MediaBrowser.Model/Channels/ChannelMediaType.cs index cf3239c9b..102cb6644 100644 --- a/MediaBrowser.Model/Channels/ChannelMediaType.cs +++ b/MediaBrowser.Model/Channels/ChannelMediaType.cs @@ -8,13 +8,4 @@ Photo = 2 } - - public enum ChannelFolderType - { - Container = 0, - - MusicAlbum = 1, - - PhotoAlbum = 2 - } } \ No newline at end of file diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.cs index cb61f358c..3c6e43fde 100644 --- a/MediaBrowser.Model/Channels/ChannelQuery.cs +++ b/MediaBrowser.Model/Channels/ChannelQuery.cs @@ -1,8 +1,4 @@ -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Querying; -using System.Collections.Generic; - -namespace MediaBrowser.Model.Channels +namespace MediaBrowser.Model.Channels { public class ChannelQuery { @@ -36,60 +32,4 @@ namespace MediaBrowser.Model.Channels /// null if [is favorite] contains no value, true if [is favorite]; otherwise, false. public bool? IsFavorite { get; set; } } - - public class AllChannelMediaQuery - { - /// - /// Gets or sets the channel ids. - /// - /// The channel ids. - public string[] ChannelIds { get; set; } - - /// - /// Gets or sets the user identifier. - /// - /// The user identifier. - public string UserId { get; set; } - - /// - /// Skips over a given number of items within the results. Use for paging. - /// - /// The start index. - public int? StartIndex { get; set; } - - /// - /// The maximum number of items to return - /// - /// The limit. - public int? Limit { get; set; } - - /// - /// Gets or sets the content types. - /// - /// The content types. - public ChannelMediaContentType[] ContentTypes { get; set; } - - /// - /// Gets or sets the extra types. - /// - /// The extra types. - public ExtraType[] ExtraTypes { get; set; } - public TrailerType[] TrailerTypes { get; set; } - - public AllChannelMediaQuery() - { - ChannelIds = new string[] { }; - - ContentTypes = new ChannelMediaContentType[] { }; - ExtraTypes = new ExtraType[] { }; - TrailerTypes = new TrailerType[] { }; - - Filters = new ItemFilter[] { }; - Fields = new List(); - } - - public ItemFilter[] Filters { get; set; } - public List Fields { get; set; } - } - } -- cgit v1.2.3