updated nuget

pull/702/head
Luke Pulverenti 10 years ago
parent cf4adb8438
commit 708d5a416e

@ -15,6 +15,12 @@ namespace MediaBrowser.Controller.Channels
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Gets the data version.
/// </summary>
/// <value>The data version.</value>
string DataVersion { get; }
/// <summary>
/// Gets the channel information.
/// </summary>

@ -162,9 +162,9 @@ namespace MediaBrowser.Server.Implementations.Channels
var channelGuid = new Guid(item.ChannelId);
var channel = _channelEntities.First(i => i.Id == channelGuid);
var internalChannel = _channels.First(i => string.Equals(i.Name, channel.OriginalChannelName, StringComparison.OrdinalIgnoreCase));
var channelPlugin = GetChannelProvider(channel);
var requiresCallback = internalChannel as IRequiresMediaInfoCallback;
var requiresCallback = channelPlugin as IRequiresMediaInfoCallback;
if (requiresCallback != null)
{
@ -264,7 +264,9 @@ namespace MediaBrowser.Server.Implementations.Channels
var channelId = channel.Id.ToString("N");
var tasks = items.Select(i => GetChannelItemEntity(i, channelId, cancellationToken));
var channelPlugin = GetChannelProvider(channel);
var tasks = items.Select(i => GetChannelItemEntity(i, channelPlugin, channelId, cancellationToken));
return await Task.WhenAll(tasks).ConfigureAwait(false);
});
@ -363,7 +365,9 @@ namespace MediaBrowser.Server.Implementations.Channels
var categoryKey = string.IsNullOrWhiteSpace(categoryId) ? "root" : categoryId.GetMD5().ToString("N");
return Path.Combine(_config.ApplicationPaths.CachePath, "channels", channelId, categoryKey, user.Id.ToString("N") + ".json");
var version = string.IsNullOrWhiteSpace(channel.DataVersion) ? "0" : channel.DataVersion;
return Path.Combine(_config.ApplicationPaths.CachePath, "channels", channelId, version, categoryKey, user.Id.ToString("N") + ".json");
}
private async Task<QueryResult<BaseItemDto>> GetReturnItems(IEnumerable<BaseItem> items, User user, ChannelItemQuery query, CancellationToken cancellationToken)
@ -401,13 +405,14 @@ namespace MediaBrowser.Server.Implementations.Channels
};
}
private string GetIdToHash(string externalId)
private string GetIdToHash(string externalId, IChannel channelProvider)
{
// Increment this as needed to force new downloads
return externalId + "8";
// Incorporate Name because it's being used to convert channel entity to provider
return externalId + (channelProvider.DataVersion ?? string.Empty) + (channelProvider.Name ?? string.Empty) + "11";
}
private async Task<BaseItem> GetChannelItemEntity(ChannelItemInfo info, string internalChannnelId, CancellationToken cancellationToken)
private async Task<BaseItem> GetChannelItemEntity(ChannelItemInfo info, IChannel channelProvider, string internalChannnelId, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(internalChannnelId))
{
@ -418,9 +423,11 @@ namespace MediaBrowser.Server.Implementations.Channels
Guid id;
var isNew = false;
var idToHash = GetIdToHash(info.Id, channelProvider);
if (info.Type == ChannelItemType.Category)
{
id = GetIdToHash(info.Id).GetMBId(typeof(ChannelCategoryItem));
id = idToHash.GetMBId(typeof(ChannelCategoryItem));
item = _libraryManager.GetItemById(id) as ChannelCategoryItem;
@ -432,7 +439,7 @@ namespace MediaBrowser.Server.Implementations.Channels
}
else if (info.MediaType == ChannelMediaType.Audio)
{
id = GetIdToHash(info.Id).GetMBId(typeof(ChannelCategoryItem));
id = idToHash.GetMBId(typeof(ChannelCategoryItem));
item = _libraryManager.GetItemById(id) as ChannelAudioItem;
@ -444,7 +451,7 @@ namespace MediaBrowser.Server.Implementations.Channels
}
else
{
id = GetIdToHash(info.Id).GetMBId(typeof(ChannelVideoItem));
id = idToHash.GetMBId(typeof(ChannelVideoItem));
item = _libraryManager.GetItemById(id) as ChannelVideoItem;

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.369</version>
<version>3.0.371</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.369" />
<dependency id="MediaBrowser.Common" version="3.0.371" />
<dependency id="NLog" version="2.1.0" />
<dependency id="SimpleInjector" version="2.5.0" />
<dependency id="sharpcompress" version="0.10.2" />

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
<version>3.0.369</version>
<version>3.0.371</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.369</version>
<version>3.0.371</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.369" />
<dependency id="MediaBrowser.Common" version="3.0.371" />
</dependencies>
</metadata>
<files>

Loading…
Cancel
Save