diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-06 13:14:02 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-06-06 13:14:02 -0400 |
| commit | f271e358a195c8bb3e931e22ca813265c7bc1f05 (patch) | |
| tree | 5a126dee9cd8cdd958a2a0c32386361c0ec02bf6 | |
| parent | 6120286bfdc274b8cb388b1d67bf616b6c2d09d0 (diff) | |
update channels
24 files changed, 202 insertions, 103 deletions
diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs index 7983c1f6a..08dfc87bd 100644 --- a/MediaBrowser.Api/Playback/StreamState.cs +++ b/MediaBrowser.Api/Playback/StreamState.cs @@ -204,6 +204,11 @@ namespace MediaBrowser.Api.Playback return Convert.ToInt32(newSize.Width); } + if (VideoRequest == null) + { + return null; + } + return VideoRequest.MaxWidth ?? VideoRequest.Width; } } @@ -229,6 +234,11 @@ namespace MediaBrowser.Api.Playback return Convert.ToInt32(newSize.Height); } + if (VideoRequest == null) + { + return null; + } + return VideoRequest.MaxHeight ?? VideoRequest.Height; } } diff --git a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj index fcb66d0bd..f06d1bc67 100644 --- a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj +++ b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj @@ -48,6 +48,10 @@ <RunPostBuildEvent>Always</RunPostBuildEvent> </PropertyGroup> <ItemGroup> + <Reference Include="NLog, Version=3.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\NLog.3.0.0.0\lib\net45\NLog.dll</HintPath> + </Reference> <Reference Include="SimpleInjector, Version=2.5.0.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\packages\SimpleInjector.2.5.0\lib\net45\SimpleInjector.dll</HintPath> @@ -63,9 +67,6 @@ <Reference Include="System.Net" /> <Reference Include="System.Net.Http" /> <Reference Include="System.Xml" /> - <Reference Include="NLog"> - <HintPath>..\packages\NLog.2.1.0\lib\net45\NLog.dll</HintPath> - </Reference> <Reference Include="SharpCompress"> <HintPath>..\packages\sharpcompress.0.10.2\lib\net40\SharpCompress.dll</HintPath> </Reference> diff --git a/MediaBrowser.Common.Implementations/packages.config b/MediaBrowser.Common.Implementations/packages.config index 38d6be2ef..f00c85d71 100644 --- a/MediaBrowser.Common.Implementations/packages.config +++ b/MediaBrowser.Common.Implementations/packages.config @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="NLog" version="2.1.0" targetFramework="net45" /> + <package id="NLog" version="3.0.0.0" targetFramework="net45" /> <package id="sharpcompress" version="0.10.2" targetFramework="net45" /> <package id="SimpleInjector" version="2.5.0" targetFramework="net45" /> </packages>
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/ChannelItemResult.cs b/MediaBrowser.Controller/Channels/ChannelItemResult.cs index 15f0a34a0..3ec5b7c24 100644 --- a/MediaBrowser.Controller/Channels/ChannelItemResult.cs +++ b/MediaBrowser.Controller/Channels/ChannelItemResult.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Controller.Channels { @@ -7,8 +6,6 @@ namespace MediaBrowser.Controller.Channels { public List<ChannelItemInfo> Items { get; set; } - public TimeSpan CacheLength { get; set; } - public int? TotalRecordCount { get; set; } } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/ChannelParentalRating.cs b/MediaBrowser.Controller/Channels/ChannelParentalRating.cs new file mode 100644 index 000000000..d9cc521b3 --- /dev/null +++ b/MediaBrowser.Controller/Channels/ChannelParentalRating.cs @@ -0,0 +1,15 @@ +namespace MediaBrowser.Controller.Channels +{ + public enum ChannelParentalRating + { + GeneralAudience = 0, + + UsPG = 1, + + UsPG13 = 2, + + UsR = 3, + + Adult = 4 + } +}
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs b/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs index bf7461327..a291d6e27 100644 --- a/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs +++ b/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs @@ -3,5 +3,7 @@ public class ChannelSearchInfo { public string SearchTerm { get; set; } + + public string UserId { get; set; } } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/IChannel.cs b/MediaBrowser.Controller/Channels/IChannel.cs index 1d7c298fa..cce341e43 100644 --- a/MediaBrowser.Controller/Channels/IChannel.cs +++ b/MediaBrowser.Controller/Channels/IChannel.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Providers; +using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; using System.Collections.Generic; using System.Threading; @@ -28,6 +27,12 @@ namespace MediaBrowser.Controller.Channels string HomePageUrl { get; } /// <summary> + /// Gets the parental rating. + /// </summary> + /// <value>The parental rating.</value> + ChannelParentalRating ParentalRating { get; } + + /// <summary> /// Gets the channel information. /// </summary> /// <returns>ChannelFeatures.</returns> @@ -36,26 +41,9 @@ namespace MediaBrowser.Controller.Channels /// <summary> /// Determines whether [is enabled for] [the specified user]. /// </summary> - /// <param name="user">The user.</param> + /// <param name="userId">The user identifier.</param> /// <returns><c>true</c> if [is enabled for] [the specified user]; otherwise, <c>false</c>.</returns> - bool IsEnabledFor(User user); - - /// <summary> - /// Searches the specified search term. - /// </summary> - /// <param name="searchInfo">The search information.</param> - /// <param name="user">The user.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns> - Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken); - - /// <summary> - /// Gets all media. - /// </summary> - /// <param name="query">The query.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task{ChannelItemResult}.</returns> - Task<ChannelItemResult> GetAllMedia(InternalAllChannelMediaQuery query, CancellationToken cancellationToken); + bool IsEnabledFor(string userId); /// <summary> /// Gets the channel items. @@ -79,15 +67,4 @@ namespace MediaBrowser.Controller.Channels /// <returns>IEnumerable{ImageType}.</returns> IEnumerable<ImageType> GetSupportedChannelImages(); } - - public interface IRequiresMediaInfoCallback - { - /// <summary> - /// Gets the channel item media information. - /// </summary> - /// <param name="id">The identifier.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task{IEnumerable{ChannelMediaInfo}}.</returns> - Task<IEnumerable<ChannelMediaInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken); - } } diff --git a/MediaBrowser.Controller/Channels/IHasCacheKey.cs b/MediaBrowser.Controller/Channels/IHasCacheKey.cs new file mode 100644 index 000000000..6376d2f91 --- /dev/null +++ b/MediaBrowser.Controller/Channels/IHasCacheKey.cs @@ -0,0 +1,13 @@ + +namespace MediaBrowser.Controller.Channels +{ + public interface IHasCacheKey + { + /// <summary> + /// Gets the cache key. + /// </summary> + /// <param name="userId">The user identifier.</param> + /// <returns>System.String.</returns> + string GetCacheKey(string userId); + } +} diff --git a/MediaBrowser.Controller/Channels/IIndexableChannel.cs b/MediaBrowser.Controller/Channels/IIndexableChannel.cs new file mode 100644 index 000000000..0b52585e8 --- /dev/null +++ b/MediaBrowser.Controller/Channels/IIndexableChannel.cs @@ -0,0 +1,16 @@ +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Channels +{ + public interface IIndexableChannel + { + /// <summary> + /// Gets all media. + /// </summary> + /// <param name="query">The query.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{ChannelItemResult}.</returns> + Task<ChannelItemResult> GetAllMedia(InternalAllChannelMediaQuery query, CancellationToken cancellationToken); + } +}
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs b/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs new file mode 100644 index 000000000..b4b6be9ba --- /dev/null +++ b/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Channels +{ + public interface IRequiresMediaInfoCallback + { + /// <summary> + /// Gets the channel item media information. + /// </summary> + /// <param name="id">The identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{IEnumerable{ChannelMediaInfo}}.</returns> + Task<IEnumerable<ChannelMediaInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken); + } +}
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/ISearchableChannel.cs b/MediaBrowser.Controller/Channels/ISearchableChannel.cs new file mode 100644 index 000000000..c5fb3a4f1 --- /dev/null +++ b/MediaBrowser.Controller/Channels/ISearchableChannel.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Channels +{ + public interface ISearchableChannel + { + /// <summary> + /// Searches the specified search term. + /// </summary> + /// <param name="searchInfo">The search information.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns> + Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, CancellationToken cancellationToken); + } +}
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/InternalAllChannelMediaQuery.cs b/MediaBrowser.Controller/Channels/InternalAllChannelMediaQuery.cs new file mode 100644 index 000000000..de99c16c4 --- /dev/null +++ b/MediaBrowser.Controller/Channels/InternalAllChannelMediaQuery.cs @@ -0,0 +1,8 @@ + +namespace MediaBrowser.Controller.Channels +{ + public class InternalAllChannelMediaQuery + { + public string UserId { get; set; } + } +}
\ No newline at end of file diff --git a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs index 44da646d0..814c56577 100644 --- a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs +++ b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs @@ -6,18 +6,6 @@ namespace MediaBrowser.Controller.Channels public class InternalChannelFeatures { /// <summary> - /// Gets or sets a value indicating whether this instance can search. - /// </summary> - /// <value><c>true</c> if this instance can search; otherwise, <c>false</c>.</value> - public bool CanSearch { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether this instance can get all media. - /// </summary> - /// <value><c>true</c> if this instance can get all media; otherwise, <c>false</c>.</value> - public bool CanGetAllMedia { get; set; } - - /// <summary> /// Gets or sets the media types. /// </summary> /// <value>The media types.</value> diff --git a/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs b/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs index dceced14c..82ef6b946 100644 --- a/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs +++ b/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Model.Channels; +using MediaBrowser.Model.Channels; namespace MediaBrowser.Controller.Channels { @@ -7,7 +6,7 @@ namespace MediaBrowser.Controller.Channels { public string FolderId { get; set; } - public User User { get; set; } + public string UserId { get; set; } public int? StartIndex { get; set; } @@ -17,9 +16,4 @@ namespace MediaBrowser.Controller.Channels public bool SortDescending { get; set; } } - - public class InternalAllChannelMediaQuery - { - public User User { get; set; } - } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 38db9e881..5d8d62eb9 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -73,6 +73,7 @@ <Compile Include="Channels\ChannelItemResult.cs" /> <Compile Include="Channels\ChannelItemType.cs" /> <Compile Include="Channels\ChannelMediaInfo.cs" /> + <Compile Include="Channels\ChannelParentalRating.cs" /> <Compile Include="Channels\ChannelSearchInfo.cs" /> <Compile Include="Channels\IChannel.cs" /> <Compile Include="Channels\IChannelFactory.cs" /> @@ -82,8 +83,13 @@ <Compile Include="Channels\ChannelVideoItem.cs" /> <Compile Include="Channels\Channel.cs" /> <Compile Include="Channels\IChannelMediaItem.cs" /> + <Compile Include="Channels\IHasCacheKey.cs" /> + <Compile Include="Channels\IIndexableChannel.cs" /> + <Compile Include="Channels\InternalAllChannelMediaQuery.cs" /> <Compile Include="Channels\InternalChannelFeatures.cs" /> <Compile Include="Channels\InternalChannelItemQuery.cs" /> + <Compile Include="Channels\IRequiresMediaInfoCallback.cs" /> + <Compile Include="Channels\ISearchableChannel.cs" /> <Compile Include="Chapters\ChapterSearchRequest.cs" /> <Compile Include="Chapters\IChapterProvider.cs" /> <Compile Include="Chapters\ChapterResponse.cs" /> diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.cs index 2acbdf9c3..333362688 100644 --- a/MediaBrowser.Model/Channels/ChannelFeatures.cs +++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs @@ -23,12 +23,6 @@ namespace MediaBrowser.Model.Channels public bool CanSearch { get; set; } /// <summary> - /// Gets or sets a value indicating whether this instance can get all media. - /// </summary> - /// <value><c>true</c> if this instance can get all media; otherwise, <c>false</c>.</value> - public bool CanGetAllMedia { get; set; } - - /// <summary> /// Gets or sets the media types. /// </summary> /// <value>The media types.</value> diff --git a/MediaBrowser.Model/Querying/ItemFilter.cs b/MediaBrowser.Model/Querying/ItemFilter.cs index d30978ebf..83d61ae51 100644 --- a/MediaBrowser.Model/Querying/ItemFilter.cs +++ b/MediaBrowser.Model/Querying/ItemFilter.cs @@ -45,6 +45,6 @@ namespace MediaBrowser.Model.Querying /// <summary> /// The is favorite or likes /// </summary> - IsFavoriteOrLikes = 10, + IsFavoriteOrLikes = 10 } } diff --git a/MediaBrowser.Model/Tasks/SystemEvent.cs b/MediaBrowser.Model/Tasks/SystemEvent.cs index dbb115962..4d49a38cc 100644 --- a/MediaBrowser.Model/Tasks/SystemEvent.cs +++ b/MediaBrowser.Model/Tasks/SystemEvent.cs @@ -9,6 +9,6 @@ namespace MediaBrowser.Model.Tasks /// <summary> /// The wake from sleep /// </summary> - WakeFromSleep + WakeFromSleep = 0 } } diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs index 9f4db175e..964a4bbf6 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs @@ -97,7 +97,7 @@ namespace MediaBrowser.Server.Implementations.Channels if (user != null) { - channels = channels.Where(i => GetChannelProvider(i).IsEnabledFor(user) && i.IsVisible(user)) + channels = channels.Where(i => GetChannelProvider(i).IsEnabledFor(user.Id.ToString("N")) && i.IsVisible(user)) .ToList(); } @@ -371,7 +371,8 @@ namespace MediaBrowser.Server.Implementations.Channels Id = id, DateCreated = _fileSystem.GetCreationTimeUtc(fileInfo), DateModified = _fileSystem.GetLastWriteTimeUtc(fileInfo), - Path = path + Path = path, + OfficialRating = GetOfficialRating(channelInfo.ParentalRating) }; isNew = true; @@ -394,6 +395,23 @@ namespace MediaBrowser.Server.Implementations.Channels return item; } + private string GetOfficialRating(ChannelParentalRating rating) + { + switch (rating) + { + case ChannelParentalRating.Adult: + return "XXX"; + case ChannelParentalRating.UsR: + return "R"; + case ChannelParentalRating.UsPG13: + return "PG-13"; + case ChannelParentalRating.UsPG: + return "PG"; + default: + return null; + } + } + public Channel GetChannel(string id) { return (Channel)_libraryManager.GetItemById(new Guid(id)); @@ -412,16 +430,19 @@ namespace MediaBrowser.Server.Implementations.Channels var channelProvider = GetChannelProvider(channel); - return GetChannelFeaturesDto(channel, channelProvider.GetChannelFeatures()); + return GetChannelFeaturesDto(channel, channelProvider, channelProvider.GetChannelFeatures()); } - public ChannelFeatures GetChannelFeaturesDto(Channel channel, InternalChannelFeatures features) + public ChannelFeatures GetChannelFeaturesDto(Channel channel, + IChannel provider, + InternalChannelFeatures features) { + var isIndexable = provider is IIndexableChannel; + return new ChannelFeatures { CanFilter = !features.MaxPageSize.HasValue, - CanGetAllMedia = features.CanGetAllMedia, - CanSearch = features.CanSearch, + CanSearch = provider is ISearchableChannel, ContentTypes = features.ContentTypes, DefaultSortFields = features.DefaultSortFields, MaxPageSize = features.MaxPageSize, @@ -429,7 +450,7 @@ namespace MediaBrowser.Server.Implementations.Channels SupportsSortOrderToggle = features.SupportsSortOrderToggle, Name = channel.Name, Id = channel.Id.ToString("N"), - CanDownloadAllMedia = features.CanGetAllMedia + CanDownloadAllMedia = isIndexable }; } @@ -459,24 +480,28 @@ namespace MediaBrowser.Server.Implementations.Channels } var tasks = channels - .Where(i => i.GetChannelFeatures().CanGetAllMedia) .Select(async i => { - try + var indexable = i as IIndexableChannel; + + if (indexable != null) { - var result = await i.GetAllMedia(new InternalAllChannelMediaQuery + try { - User = user + var result = await indexable.GetAllMedia(new InternalAllChannelMediaQuery + { + UserId = query.UserId - }, cancellationToken).ConfigureAwait(false); + }, cancellationToken).ConfigureAwait(false); - return new Tuple<IChannel, ChannelItemResult>(i, result); - } - catch (Exception ex) - { - _logger.ErrorException("Error getting all media from {0}", ex, i.Name); - return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult { }); + return new Tuple<IChannel, ChannelItemResult>(i, result); + } + catch (Exception ex) + { + _logger.ErrorException("Error getting all media from {0}", ex, i.Name); + } } + return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult { }); }); var results = await Task.WhenAll(tasks).ConfigureAwait(false); @@ -600,7 +625,10 @@ namespace MediaBrowser.Server.Implementations.Channels bool sortDescending, CancellationToken cancellationToken) { - var cachePath = GetChannelDataCachePath(channel, user, folderId, sortField, sortDescending); + var userId = user.Id.ToString("N"); + + var cacheLength = TimeSpan.FromDays(1); + var cachePath = GetChannelDataCachePath(channel, userId, folderId, sortField, sortDescending); try { @@ -608,7 +636,7 @@ namespace MediaBrowser.Server.Implementations.Channels { var channelItemResult = _jsonSerializer.DeserializeFromFile<ChannelItemResult>(cachePath); - if (_fileSystem.GetLastWriteTimeUtc(cachePath).Add(channelItemResult.CacheLength) > DateTime.UtcNow) + if (_fileSystem.GetLastWriteTimeUtc(cachePath).Add(cacheLength) > DateTime.UtcNow) { return channelItemResult; } @@ -633,7 +661,7 @@ namespace MediaBrowser.Server.Implementations.Channels { var channelItemResult = _jsonSerializer.DeserializeFromFile<ChannelItemResult>(cachePath); - if (_fileSystem.GetLastWriteTimeUtc(cachePath).Add(channelItemResult.CacheLength) > DateTime.UtcNow) + if (_fileSystem.GetLastWriteTimeUtc(cachePath).Add(cacheLength) > DateTime.UtcNow) { return channelItemResult; } @@ -650,7 +678,7 @@ namespace MediaBrowser.Server.Implementations.Channels var query = new InternalChannelItemQuery { - User = user, + UserId = userId, StartIndex = startIndex, Limit = limit, SortBy = sortField, @@ -694,18 +722,27 @@ namespace MediaBrowser.Server.Implementations.Channels } private string GetChannelDataCachePath(IChannel channel, - User user, + string userId, string folderId, ChannelItemSortField? sortField, bool sortDescending) { var channelId = GetInternalChannelId(channel.Name).ToString("N"); - var folderKey = string.IsNullOrWhiteSpace(folderId) ? "root" : folderId.GetMD5().ToString("N"); + var userCacheKey = string.Empty; + + var hasCacheKey = channel as IHasCacheKey; + if (hasCacheKey != null) + { + userCacheKey = hasCacheKey.GetCacheKey(userId) ?? string.Empty; + } + + var folderKey = string.IsNullOrWhiteSpace(folderId) ? "root" : folderId; + folderKey = (folderKey + userCacheKey).GetMD5().ToString("N"); var version = string.IsNullOrWhiteSpace(channel.DataVersion) ? "0" : channel.DataVersion; - var filename = user.Id.ToString("N"); + var filename = userId; var hashfilename = false; if (sortField.HasValue) @@ -724,7 +761,12 @@ namespace MediaBrowser.Server.Implementations.Channels filename = filename.GetMD5().ToString("N"); } - return Path.Combine(_config.ApplicationPaths.CachePath, "channels", channelId, version, folderKey, filename + ".json"); + return Path.Combine(_config.ApplicationPaths.CachePath, + "channels", + channelId, + version, + folderKey, + filename + ".json"); } private async Task<QueryResult<BaseItemDto>> GetReturnItems(IEnumerable<BaseItem> items, int? totalCountFromProvider, User user, ChannelItemQuery query, CancellationToken cancellationToken) @@ -770,7 +812,8 @@ namespace MediaBrowser.Server.Implementations.Channels { // Increment this as needed to force new downloads // Incorporate Name because it's being used to convert channel entity to provider - return externalId + (channelProvider.DataVersion ?? string.Empty) + (channelProvider.Name ?? string.Empty) + "14"; + return externalId + (channelProvider.DataVersion ?? string.Empty) + + (channelProvider.Name ?? string.Empty) + "15"; } private async Task<BaseItem> GetChannelItemEntity(ChannelItemInfo info, IChannel channelProvider, Channel internalChannel, CancellationToken cancellationToken) diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index 7fdea66f6..2ab245c66 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -63,8 +63,9 @@ <Reference Include="MediaBrowser.IsoMounter"> <HintPath>..\packages\MediaBrowser.IsoMounting.3.0.65\lib\net45\MediaBrowser.IsoMounter.dll</HintPath> </Reference> - <Reference Include="NLog"> - <HintPath>..\packages\NLog.2.1.0\lib\net45\NLog.dll</HintPath> + <Reference Include="NLog, Version=3.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\NLog.3.0.0.0\lib\net45\NLog.dll</HintPath> </Reference> <Reference Include="pfmclrapi"> <HintPath>..\packages\MediaBrowser.IsoMounting.3.0.65\lib\net45\pfmclrapi.dll</HintPath> diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index f62249aa3..8a9f17d96 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="MediaBrowser.IsoMounting" version="3.0.65" targetFramework="net45" /> - <package id="NLog" version="2.1.0" targetFramework="net45" /> + <package id="NLog" version="3.0.0.0" targetFramework="net45" /> </packages>
\ No newline at end of file diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index 930646205..7b4935614 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>MediaBrowser.Common.Internal</id> - <version>3.0.394</version> + <version>3.0.397</version> <title>MediaBrowser.Common.Internal</title> <authors>Luke</authors> <owners>ebr,Luke,scottisafool</owners> @@ -12,7 +12,7 @@ <description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description> <copyright>Copyright © Media Browser 2013</copyright> <dependencies> - <dependency id="MediaBrowser.Common" version="3.0.394" /> + <dependency id="MediaBrowser.Common" version="3.0.397" /> <dependency id="NLog" version="2.1.0" /> <dependency id="SimpleInjector" version="2.5.0" /> <dependency id="sharpcompress" version="0.10.2" /> diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 95acf20cf..57a8aae30 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>MediaBrowser.Common</id> - <version>3.0.394</version> + <version>3.0.397</version> <title>MediaBrowser.Common</title> <authors>Media Browser Team</authors> <owners>ebr,Luke,scottisafool</owners> diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 9dcdac515..4720b6b36 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>MediaBrowser.Server.Core</id> - <version>3.0.394</version> + <version>3.0.397</version> <title>Media Browser.Server.Core</title> <authors>Media Browser Team</authors> <owners>ebr,Luke,scottisafool</owners> @@ -12,7 +12,7 @@ <description>Contains core components required to build plugins for Media Browser Server.</description> <copyright>Copyright © Media Browser 2013</copyright> <dependencies> - <dependency id="MediaBrowser.Common" version="3.0.394" /> + <dependency id="MediaBrowser.Common" version="3.0.396" /> </dependencies> </metadata> <files> |
