diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.cs index 10bc53b74..30db91da8 100644 --- a/MediaBrowser.Api/Images/ImageService.cs +++ b/MediaBrowser.Api/Images/ImageService.cs @@ -535,9 +535,6 @@ namespace MediaBrowser.Api.Images throw new ResourceNotFoundException(string.Format("{0} does not have an image of type {1}", item.Name, request.Type)); } - // See if we can avoid a file system lookup by looking for the file in ResolveArgs - var originalFileImageDateModified = imageInfo.DateModified; - var supportedImageEnhancers = request.EnableImageEnhancers ? _imageProcessor.ImageEnhancers.Where(i => { try diff --git a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs index afc6493e4..d6e315fd1 100644 --- a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs +++ b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs @@ -15,7 +15,6 @@ namespace MediaBrowser.Controller.Channels public ChannelFolderType ChannelFolderType { get; set; } public string OriginalImageUrl { get; set; } - public List Tags { get; set; } protected override bool GetBlockUnratedValue(UserConfiguration config) { @@ -31,11 +30,6 @@ namespace MediaBrowser.Controller.Channels } } - public ChannelFolderItem() - { - Tags = new List(); - } - public override string GetUserDataKey() { return ExternalId; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 9ddd10f4a..695b1fd57 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// /// Class MusicAlbum /// - public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasTags, IHasLookupInfo + public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasLookupInfo { public List SoundtrackIds { get; set; } @@ -19,7 +19,6 @@ namespace MediaBrowser.Controller.Entities.Audio { Artists = new List(); SoundtrackIds = new List(); - Tags = new List(); } [IgnoreDataMember] @@ -65,12 +64,6 @@ namespace MediaBrowser.Controller.Entities.Audio } } - /// - /// Gets or sets the tags. - /// - /// The tags. - public List Tags { get; set; } - /// /// Gets the tracks. /// diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index 0a5d8eec0..1544da7bc 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -13,16 +13,9 @@ namespace MediaBrowser.Controller.Entities.Audio /// /// Class MusicArtist /// - public class MusicArtist : Folder, IMetadataContainer, IItemByName, IHasMusicGenres, IHasDualAccess, IHasTags, IHasProductionLocations, IHasLookupInfo + public class MusicArtist : Folder, IMetadataContainer, IItemByName, IHasMusicGenres, IHasDualAccess, IHasProductionLocations, IHasLookupInfo { public bool IsAccessedByName { get; set; } - - /// - /// Gets or sets the tags. - /// - /// The tags. - public List Tags { get; set; } - public List ProductionLocations { get; set; } public override bool IsFolder @@ -60,7 +53,6 @@ namespace MediaBrowser.Controller.Entities.Audio public MusicArtist() { - Tags = new List(); ProductionLocations = new List(); } diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index b0cb549f4..0d2be9f74 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -14,13 +14,12 @@ namespace MediaBrowser.Controller.Entities.Movies /// /// Class BoxSet /// - public class BoxSet : Folder, IHasTrailers, IHasTags, IHasKeywords, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo, IMetadataContainer + public class BoxSet : Folder, IHasTrailers, IHasKeywords, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo, IMetadataContainer { public BoxSet() { RemoteTrailers = new List(); LocalTrailerIds = new List(); - Tags = new List(); DisplayOrder = ItemSortBy.PremiereDate; Keywords = new List(); @@ -38,7 +37,6 @@ namespace MediaBrowser.Controller.Entities.Movies /// Gets or sets the tags. /// /// The tags. - public List Tags { get; set; } public List Keywords { get; set; } public string PreferredMetadataLanguage { get; set; } diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index a9a2b024f..9c2ed27bb 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -13,7 +13,7 @@ namespace MediaBrowser.Controller.Entities.TV /// /// Class Series /// - public class Series : Folder, IHasSoundtracks, IHasTrailers, IHasTags, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo + public class Series : Folder, IHasSoundtracks, IHasTrailers, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo { public List SpecialFeatureIds { get; set; } public List SoundtrackIds { get; set; } @@ -36,7 +36,6 @@ namespace MediaBrowser.Controller.Entities.TV SoundtrackIds = new List(); RemoteTrailers = new List(); LocalTrailerIds = new List(); - Tags = new List(); DisplaySpecialsWithSeasons = true; } @@ -51,12 +50,6 @@ namespace MediaBrowser.Controller.Entities.TV /// public string DisplayOrder { get; set; } - /// - /// Gets or sets the tags. - /// - /// The tags. - public List Tags { get; set; } - /// /// Gets or sets the status. /// diff --git a/MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs b/MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs new file mode 100644 index 000000000..24e864c27 --- /dev/null +++ b/MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs @@ -0,0 +1,88 @@ +using MediaBrowser.Controller.Channels; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Entities; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Dlna.Channels +{ + public class DlnaChannelFactory : IChannelFactory + { + public IEnumerable GetChannels() + { + // Check config here + // If user wants all channels separate, return them all + // If user wants one parent channel, return just that one + + return new List() + { + //new DummyChannel("test 1"), + //new DummyChannel("test 2") + }; + } + } + + public class DummyChannel : IChannel + { + private readonly string _name; + + public DummyChannel(string name) + { + _name = name; + } + + public string Name + { + get { return _name; } + } + + public string Description + { + get { return "Dummy Channel"; } + } + + public string DataVersion + { + get { return "1"; } + } + + public string HomePageUrl + { + get { return "http://www.google.com"; } + } + + public ChannelParentalRating ParentalRating + { + get { return ChannelParentalRating.GeneralAudience; } + } + + public InternalChannelFeatures GetChannelFeatures() + { + return new InternalChannelFeatures + { + + }; + } + + public bool IsEnabledFor(string userId) + { + return true; + } + + public Task GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken) + { + return Task.FromResult(new ChannelItemResult()); + } + + public Task GetChannelImage(ImageType type, CancellationToken cancellationToken) + { + return Task.FromResult(new DynamicImageResponse()); + } + + public IEnumerable GetSupportedChannelImages() + { + return new List(); + } + } +} diff --git a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj index e3a5289f5..effa9f755 100644 --- a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj +++ b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj @@ -51,6 +51,7 @@ Properties\SharedVersion.cs + diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs index 79a251d1b..bf48af4fb 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs @@ -542,7 +542,7 @@ namespace MediaBrowser.Server.Implementations.Channels throw new ArgumentException("User not found."); } - var channels = _channels; + var channels = GetAllChannels(); if (query.ChannelIds.Length > 0) { @@ -696,7 +696,7 @@ namespace MediaBrowser.Server.Implementations.Channels ? null : _userManager.GetUserById(new Guid(query.UserId)); - var channels = _channels; + var channels = GetAllChannels(); if (query.ChannelIds.Length > 0) { diff --git a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs b/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs index b832f3a06..7286846db 100644 --- a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs +++ b/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs @@ -94,8 +94,9 @@ namespace MediaBrowser.Server.Implementations.Notifications { var config = GetConfiguration(); - return _userManager.Users.Where(i => config.IsEnabledToSendToUser(request.NotificationType, i.Id.ToString("N"), i.Configuration)) - .Select(i => i.Id.ToString("N")); + return _userManager.Users + .Where(i => config.IsEnabledToSendToUser(request.NotificationType, i.Id.ToString("N"), i.Configuration)) + .Select(i => i.Id.ToString("N")); } return request.UserIds;