mirror of https://github.com/jellyfin/jellyfin.git
channel improvements
This commit is contained in:
parent
eab030df7f
commit
3be25f8bfb
|
@ -405,7 +405,7 @@ namespace MediaBrowser.Api.Images
|
||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
public object Get(GetUserImage request)
|
public object Get(GetUserImage request)
|
||||||
{
|
{
|
||||||
var item = _userManager.Users.First(i => i.Id == request.Id);
|
var item = _userManager.GetUserById(request.Id);
|
||||||
|
|
||||||
return GetImage(request, item, false);
|
return GetImage(request, item, false);
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ namespace MediaBrowser.Api.Images
|
||||||
|
|
||||||
request.Type = (ImageType)Enum.Parse(typeof(ImageType), pathInfo.GetArgumentValue<string>(3), true);
|
request.Type = (ImageType)Enum.Parse(typeof(ImageType), pathInfo.GetArgumentValue<string>(3), true);
|
||||||
|
|
||||||
var item = _userManager.Users.First(i => i.Id == id);
|
var item = _userManager.GetUserById(id);
|
||||||
|
|
||||||
var task = PostImage(item, request.RequestStream, request.Type, Request.ContentType);
|
var task = PostImage(item, request.RequestStream, request.Type, Request.ContentType);
|
||||||
|
|
||||||
|
@ -472,7 +472,7 @@ namespace MediaBrowser.Api.Images
|
||||||
/// <param name="request">The request.</param>
|
/// <param name="request">The request.</param>
|
||||||
public void Delete(DeleteUserImage request)
|
public void Delete(DeleteUserImage request)
|
||||||
{
|
{
|
||||||
var item = _userManager.Users.First(i => i.Id == request.Id);
|
var item = _userManager.GetUserById(request.Id);
|
||||||
|
|
||||||
var task = item.DeleteImage(request.Type, request.Index ?? 0);
|
var task = item.DeleteImage(request.Type, request.Index ?? 0);
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,14 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
{
|
{
|
||||||
key = hasKey.Key;
|
key = hasKey.Key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var triggers = task.Triggers
|
||||||
|
.Select(GetTriggerInfo)
|
||||||
|
.OrderBy(i => i.Type)
|
||||||
|
.ThenBy(i => i.DayOfWeek ?? DayOfWeek.Sunday)
|
||||||
|
.ThenBy(i => i.TimeOfDayTicks ?? 0)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
return new TaskInfo
|
return new TaskInfo
|
||||||
{
|
{
|
||||||
Name = task.Name,
|
Name = task.Name,
|
||||||
|
@ -40,7 +48,9 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
State = task.State,
|
State = task.State,
|
||||||
Id = task.Id,
|
Id = task.Id,
|
||||||
LastExecutionResult = task.LastExecutionResult,
|
LastExecutionResult = task.LastExecutionResult,
|
||||||
Triggers = task.Triggers.Select(GetTriggerInfo).ToList(),
|
|
||||||
|
Triggers = triggers,
|
||||||
|
|
||||||
Description = task.Description,
|
Description = task.Description,
|
||||||
Category = task.Category,
|
Category = task.Category,
|
||||||
IsHidden = isHidden,
|
IsHidden = isHidden,
|
||||||
|
|
|
@ -47,5 +47,10 @@ namespace MediaBrowser.Controller.Channels
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string GetInternalMetadataPath(string basePath)
|
||||||
|
{
|
||||||
|
return System.IO.Path.Combine(basePath, "channels", Id.ToString("N"), "metadata");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace MediaBrowser.Controller.Channels
|
||||||
public string ExternalId { get; set; }
|
public string ExternalId { get; set; }
|
||||||
|
|
||||||
public string ChannelId { get; set; }
|
public string ChannelId { get; set; }
|
||||||
|
public string DataVersion { get; set; }
|
||||||
|
|
||||||
public ChannelItemType ChannelItemType { get; set; }
|
public ChannelItemType ChannelItemType { get; set; }
|
||||||
|
|
||||||
|
@ -41,6 +42,11 @@ namespace MediaBrowser.Controller.Channels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool IsSaveLocalMetadataEnabled()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public ChannelAudioItem()
|
public ChannelAudioItem()
|
||||||
{
|
{
|
||||||
ChannelMediaSources = new List<ChannelMediaInfo>();
|
ChannelMediaSources = new List<ChannelMediaInfo>();
|
||||||
|
@ -58,5 +64,10 @@ namespace MediaBrowser.Controller.Channels
|
||||||
return base.LocationType;
|
return base.LocationType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string GetInternalMetadataPath(string basePath)
|
||||||
|
{
|
||||||
|
return System.IO.Path.Combine(basePath, "channels", ChannelId, Id.ToString("N"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace MediaBrowser.Controller.Channels
|
||||||
public string ExternalId { get; set; }
|
public string ExternalId { get; set; }
|
||||||
|
|
||||||
public string ChannelId { get; set; }
|
public string ChannelId { get; set; }
|
||||||
|
public string DataVersion { get; set; }
|
||||||
|
|
||||||
public ChannelItemType ChannelItemType { get; set; }
|
public ChannelItemType ChannelItemType { get; set; }
|
||||||
public ChannelFolderType ChannelFolderType { get; set; }
|
public ChannelFolderType ChannelFolderType { get; set; }
|
||||||
|
@ -32,6 +33,11 @@ namespace MediaBrowser.Controller.Channels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool IsSaveLocalMetadataEnabled()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public override string GetUserDataKey()
|
public override string GetUserDataKey()
|
||||||
{
|
{
|
||||||
return ExternalId;
|
return ExternalId;
|
||||||
|
@ -63,5 +69,10 @@ namespace MediaBrowser.Controller.Channels
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string GetInternalMetadataPath(string basePath)
|
||||||
|
{
|
||||||
|
return System.IO.Path.Combine(basePath, "channels", ChannelId, Id.ToString("N"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ namespace MediaBrowser.Controller.Channels
|
||||||
public ChannelFolderType FolderType { get; set; }
|
public ChannelFolderType FolderType { get; set; }
|
||||||
|
|
||||||
public ChannelMediaContentType ContentType { get; set; }
|
public ChannelMediaContentType ContentType { get; set; }
|
||||||
|
public ExtraType ExtraType { get; set; }
|
||||||
|
public TrailerType TrailerType { get; set; }
|
||||||
|
|
||||||
public Dictionary<string, string> ProviderIds { get; set; }
|
public Dictionary<string, string> ProviderIds { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace MediaBrowser.Controller.Channels
|
||||||
public string ExternalId { get; set; }
|
public string ExternalId { get; set; }
|
||||||
|
|
||||||
public string ChannelId { get; set; }
|
public string ChannelId { get; set; }
|
||||||
|
public string DataVersion { get; set; }
|
||||||
|
|
||||||
public ChannelItemType ChannelItemType { get; set; }
|
public ChannelItemType ChannelItemType { get; set; }
|
||||||
|
|
||||||
|
@ -28,13 +29,13 @@ namespace MediaBrowser.Controller.Channels
|
||||||
|
|
||||||
public override string GetUserDataKey()
|
public override string GetUserDataKey()
|
||||||
{
|
{
|
||||||
if (ContentType == ChannelMediaContentType.Trailer)
|
if (ContentType == ChannelMediaContentType.MovieExtra)
|
||||||
{
|
{
|
||||||
var key = this.GetProviderId(MetadataProviders.Tmdb) ?? this.GetProviderId(MetadataProviders.Tvdb) ?? this.GetProviderId(MetadataProviders.Imdb) ?? this.GetProviderId(MetadataProviders.Tvcom);
|
var key = this.GetProviderId(MetadataProviders.Tmdb) ?? this.GetProviderId(MetadataProviders.Tvdb) ?? this.GetProviderId(MetadataProviders.Imdb) ?? this.GetProviderId(MetadataProviders.Tvcom);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(key))
|
if (!string.IsNullOrWhiteSpace(key))
|
||||||
{
|
{
|
||||||
key = key + "-trailer";
|
key = key + "-" + ExtraType.ToString().ToLower();
|
||||||
|
|
||||||
// Make sure different trailers have their own data.
|
// Make sure different trailers have their own data.
|
||||||
if (RunTimeTicks.HasValue)
|
if (RunTimeTicks.HasValue)
|
||||||
|
@ -62,6 +63,11 @@ namespace MediaBrowser.Controller.Channels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool IsSaveLocalMetadataEnabled()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public ChannelVideoItem()
|
public ChannelVideoItem()
|
||||||
{
|
{
|
||||||
ChannelMediaSources = new List<ChannelMediaInfo>();
|
ChannelMediaSources = new List<ChannelMediaInfo>();
|
||||||
|
@ -94,8 +100,14 @@ namespace MediaBrowser.Controller.Channels
|
||||||
var info = GetItemLookupInfo<ChannelItemLookupInfo>();
|
var info = GetItemLookupInfo<ChannelItemLookupInfo>();
|
||||||
|
|
||||||
info.ContentType = ContentType;
|
info.ContentType = ContentType;
|
||||||
|
info.ExtraType = ExtraType;
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string GetInternalMetadataPath(string basePath)
|
||||||
|
{
|
||||||
|
return System.IO.Path.Combine(basePath, "channels", ChannelId, Id.ToString("N"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,7 @@ namespace MediaBrowser.Controller.Channels
|
||||||
ChannelItemType ChannelItemType { get; set; }
|
ChannelItemType ChannelItemType { get; set; }
|
||||||
|
|
||||||
string OriginalImageUrl { get; set; }
|
string OriginalImageUrl { get; set; }
|
||||||
|
|
||||||
|
string DataVersion { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using MediaBrowser.Model.Channels;
|
||||||
using MediaBrowser.Model.Channels;
|
using MediaBrowser.Model.Entities;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Channels
|
namespace MediaBrowser.Controller.Channels
|
||||||
{
|
{
|
||||||
|
@ -10,6 +11,8 @@ namespace MediaBrowser.Controller.Channels
|
||||||
|
|
||||||
ChannelMediaContentType ContentType { get; set; }
|
ChannelMediaContentType ContentType { get; set; }
|
||||||
|
|
||||||
|
ExtraType ExtraType { get; set; }
|
||||||
|
|
||||||
List<ChannelMediaInfo> ChannelMediaSources { get; set; }
|
List<ChannelMediaInfo> ChannelMediaSources { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -32,6 +32,11 @@ namespace MediaBrowser.Controller.Channels
|
||||||
/// Indicates if a sort ascending/descending toggle is supported or not.
|
/// Indicates if a sort ascending/descending toggle is supported or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SupportsSortOrderToggle { get; set; }
|
public bool SupportsSortOrderToggle { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the automatic refresh levels.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The automatic refresh levels.</value>
|
||||||
|
public int? AutoRefreshLevels { get; set; }
|
||||||
|
|
||||||
public InternalChannelFeatures()
|
public InternalChannelFeatures()
|
||||||
{
|
{
|
||||||
|
|
|
@ -351,6 +351,18 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetInternalMetadataPath()
|
||||||
|
{
|
||||||
|
return GetInternalMetadataPath(ConfigurationManager.ApplicationPaths.InternalMetadataPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual string GetInternalMetadataPath(string basePath)
|
||||||
|
{
|
||||||
|
var idString = Id.ToString("N");
|
||||||
|
|
||||||
|
return System.IO.Path.Combine(basePath, idString.Substring(0, 2), idString);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -160,6 +160,12 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if [supports remote image downloading]; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if [supports remote image downloading]; otherwise, <c>false</c>.</value>
|
||||||
bool SupportsRemoteImageDownloading { get; }
|
bool SupportsRemoteImageDownloading { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the internal metadata path.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>System.String.</returns>
|
||||||
|
string GetInternalMetadataPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HasImagesExtensions
|
public static class HasImagesExtensions
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Configuration;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller
|
namespace MediaBrowser.Controller
|
||||||
{
|
{
|
||||||
|
@ -106,12 +105,5 @@ namespace MediaBrowser.Controller
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The internal metadata path.</value>
|
/// <value>The internal metadata path.</value>
|
||||||
string InternalMetadataPath { get; }
|
string InternalMetadataPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the internal metadata path.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id">The identifier.</param>
|
|
||||||
/// <returns>System.String.</returns>
|
|
||||||
string GetInternalMetadataPath(Guid id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -241,5 +241,6 @@ namespace MediaBrowser.Controller.Providers
|
||||||
public class ChannelItemLookupInfo : ItemLookupInfo
|
public class ChannelItemLookupInfo : ItemLookupInfo
|
||||||
{
|
{
|
||||||
public ChannelMediaContentType ContentType { get; set; }
|
public ChannelMediaContentType ContentType { get; set; }
|
||||||
|
public ExtraType ExtraType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Common.IO;
|
||||||
|
using MediaBrowser.Controller.Channels;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
|
@ -56,7 +57,12 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||||
|
|
||||||
public List<LocalImageInfo> GetImages(IHasImages item, IDirectoryService directoryService)
|
public List<LocalImageInfo> GetImages(IHasImages item, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
var path = _config.ApplicationPaths.GetInternalMetadataPath(item.Id);
|
var path = item.GetInternalMetadataPath();
|
||||||
|
|
||||||
|
if (item is IChannelItem)
|
||||||
|
{
|
||||||
|
var b = true;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,12 @@ namespace MediaBrowser.Model.Channels
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? MaxPageSize { get; set; }
|
public int? MaxPageSize { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the automatic refresh levels.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The automatic refresh levels.</value>
|
||||||
|
public int? AutoRefreshLevels { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the default sort orders.
|
/// Gets or sets the default sort orders.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
|
|
||||||
Episode = 4,
|
Episode = 4,
|
||||||
|
|
||||||
Song = 5
|
Song = 5,
|
||||||
|
|
||||||
|
MovieExtra = 6,
|
||||||
|
|
||||||
|
TvExtra = 7,
|
||||||
|
|
||||||
|
GameExtra = 8
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Entities;
|
||||||
|
using MediaBrowser.Model.Querying;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Channels
|
namespace MediaBrowser.Model.Channels
|
||||||
|
@ -68,11 +69,18 @@ namespace MediaBrowser.Model.Channels
|
||||||
/// <value>The content types.</value>
|
/// <value>The content types.</value>
|
||||||
public ChannelMediaContentType[] ContentTypes { get; set; }
|
public ChannelMediaContentType[] ContentTypes { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the extra types.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The extra types.</value>
|
||||||
|
public ExtraType[] ExtraTypes { get; set; }
|
||||||
|
|
||||||
public AllChannelMediaQuery()
|
public AllChannelMediaQuery()
|
||||||
{
|
{
|
||||||
ChannelIds = new string[] { };
|
ChannelIds = new string[] { };
|
||||||
|
|
||||||
ContentTypes = new ChannelMediaContentType[] { };
|
ContentTypes = new ChannelMediaContentType[] { };
|
||||||
|
ExtraTypes = new ExtraType[] { };
|
||||||
|
|
||||||
Filters = new ItemFilter[] { };
|
Filters = new ItemFilter[] { };
|
||||||
Fields = new List<ItemFields>();
|
Fields = new List<ItemFields>();
|
||||||
|
|
|
@ -13,4 +13,12 @@ namespace MediaBrowser.Model.Entities
|
||||||
ThemeSong = 8,
|
ThemeSong = 8,
|
||||||
ThemeVideo = 9
|
ThemeVideo = 9
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum TrailerType
|
||||||
|
{
|
||||||
|
ComingSoonToTheaters = 1,
|
||||||
|
ComingSoonToDvd = 2,
|
||||||
|
ComingSoonToStreaming = 3,
|
||||||
|
Archive = 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,7 +362,7 @@ namespace MediaBrowser.Providers.Manager
|
||||||
{
|
{
|
||||||
filename = "folder";
|
filename = "folder";
|
||||||
}
|
}
|
||||||
path = Path.Combine(_config.ApplicationPaths.GetInternalMetadataPath(item.Id), filename + extension);
|
path = Path.Combine(item.GetInternalMetadataPath(), filename + extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.IO;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Common.Extensions;
|
|
||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Common.IO;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
|
|
@ -357,11 +357,6 @@ namespace MediaBrowser.Providers.Manager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.SupportsLocalMetadata && provider is ILocalImageProvider)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return provider.Supports(item);
|
return provider.Supports(item);
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace MediaBrowser.Providers.Movies
|
||||||
|
|
||||||
var channelItem = item as ChannelVideoItem;
|
var channelItem = item as ChannelVideoItem;
|
||||||
|
|
||||||
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.Trailer)
|
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.MovieExtra && channelItem.ExtraType == ExtraType.Trailer)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,17 @@ namespace MediaBrowser.Providers.Movies
|
||||||
|
|
||||||
public IEnumerable<ImageType> GetSupportedImages(IHasImages item)
|
public IEnumerable<ImageType> GetSupportedImages(IHasImages item)
|
||||||
{
|
{
|
||||||
|
var channelItem = item as ChannelVideoItem;
|
||||||
|
|
||||||
|
if (channelItem != null)
|
||||||
|
{
|
||||||
|
// Too many channel items to allow backdrops here
|
||||||
|
return new List<ImageType>
|
||||||
|
{
|
||||||
|
ImageType.Primary
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return new List<ImageType>
|
return new List<ImageType>
|
||||||
{
|
{
|
||||||
ImageType.Primary,
|
ImageType.Primary,
|
||||||
|
@ -82,30 +93,38 @@ namespace MediaBrowser.Providers.Movies
|
||||||
|
|
||||||
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
|
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
|
||||||
|
|
||||||
list.AddRange(GetPosters(results).Select(i => new RemoteImageInfo
|
var supportedImages = GetSupportedImages(item).ToList();
|
||||||
{
|
|
||||||
Url = tmdbImageUrl + i.file_path,
|
|
||||||
CommunityRating = i.vote_average,
|
|
||||||
VoteCount = i.vote_count,
|
|
||||||
Width = i.width,
|
|
||||||
Height = i.height,
|
|
||||||
Language = i.iso_639_1,
|
|
||||||
ProviderName = Name,
|
|
||||||
Type = ImageType.Primary,
|
|
||||||
RatingType = RatingType.Score
|
|
||||||
}));
|
|
||||||
|
|
||||||
list.AddRange(GetBackdrops(results).Select(i => new RemoteImageInfo
|
if (supportedImages.Contains(ImageType.Primary))
|
||||||
{
|
{
|
||||||
Url = tmdbImageUrl + i.file_path,
|
list.AddRange(GetPosters(results).Select(i => new RemoteImageInfo
|
||||||
CommunityRating = i.vote_average,
|
{
|
||||||
VoteCount = i.vote_count,
|
Url = tmdbImageUrl + i.file_path,
|
||||||
Width = i.width,
|
CommunityRating = i.vote_average,
|
||||||
Height = i.height,
|
VoteCount = i.vote_count,
|
||||||
ProviderName = Name,
|
Width = i.width,
|
||||||
Type = ImageType.Backdrop,
|
Height = i.height,
|
||||||
RatingType = RatingType.Score
|
Language = i.iso_639_1,
|
||||||
}));
|
ProviderName = Name,
|
||||||
|
Type = ImageType.Primary,
|
||||||
|
RatingType = RatingType.Score
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportedImages.Contains(ImageType.Backdrop))
|
||||||
|
{
|
||||||
|
list.AddRange(GetBackdrops(results).Select(i => new RemoteImageInfo
|
||||||
|
{
|
||||||
|
Url = tmdbImageUrl + i.file_path,
|
||||||
|
CommunityRating = i.vote_average,
|
||||||
|
VoteCount = i.vote_count,
|
||||||
|
Width = i.width,
|
||||||
|
Height = i.height,
|
||||||
|
ProviderName = Name,
|
||||||
|
Type = ImageType.Backdrop,
|
||||||
|
RatingType = RatingType.Score
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
var language = item.GetPreferredMetadataLanguage();
|
var language = item.GetPreferredMetadataLanguage();
|
||||||
|
|
||||||
|
|
|
@ -344,8 +344,7 @@ namespace MediaBrowser.Providers.Movies
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Limit to three requests per second
|
var diff = 100 - (DateTime.Now - _lastRequestDate).TotalMilliseconds;
|
||||||
var diff = 340 - (DateTime.Now - _lastRequestDate).TotalMilliseconds;
|
|
||||||
|
|
||||||
if (diff > 0)
|
if (diff > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,7 @@ using MediaBrowser.Controller.Channels;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Channels;
|
using MediaBrowser.Model.Channels;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -32,7 +33,7 @@ namespace MediaBrowser.Providers.Movies
|
||||||
|
|
||||||
public Task<MetadataResult<ChannelVideoItem>> GetMetadata(ChannelItemLookupInfo info, CancellationToken cancellationToken)
|
public Task<MetadataResult<ChannelVideoItem>> GetMetadata(ChannelItemLookupInfo info, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (info.ContentType != Model.Channels.ChannelMediaContentType.Trailer)
|
if (info.ContentType != ChannelMediaContentType.MovieExtra || info.ExtraType != ExtraType.Trailer)
|
||||||
{
|
{
|
||||||
return Task.FromResult(new MetadataResult<ChannelVideoItem>());
|
return Task.FromResult(new MetadataResult<ChannelVideoItem>());
|
||||||
}
|
}
|
||||||
|
@ -40,14 +41,14 @@ namespace MediaBrowser.Providers.Movies
|
||||||
return MovieDbProvider.Current.GetItemMetadata<ChannelVideoItem>(info, cancellationToken);
|
return MovieDbProvider.Current.GetItemMetadata<ChannelVideoItem>(info, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(ChannelItemLookupInfo searchInfo, CancellationToken cancellationToken)
|
public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(ChannelItemLookupInfo info, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (searchInfo.ContentType != ChannelMediaContentType.Trailer)
|
if (info.ContentType != ChannelMediaContentType.MovieExtra || info.ExtraType != ExtraType.Trailer)
|
||||||
{
|
{
|
||||||
return Task.FromResult<IEnumerable<RemoteSearchResult>>(new List<RemoteSearchResult>());
|
return Task.FromResult<IEnumerable<RemoteSearchResult>>(new List<RemoteSearchResult>());
|
||||||
}
|
}
|
||||||
|
|
||||||
return MovieDbProvider.Current.GetMovieSearchResults(searchInfo, cancellationToken);
|
return MovieDbProvider.Current.GetMovieSearchResults(info, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace MediaBrowser.Providers.Movies
|
||||||
{
|
{
|
||||||
var channelItem = item as ChannelVideoItem;
|
var channelItem = item as ChannelVideoItem;
|
||||||
|
|
||||||
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.Trailer)
|
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.MovieExtra && channelItem.ExtraType == ExtraType.Trailer)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ namespace MediaBrowser.Providers.Movies
|
||||||
{
|
{
|
||||||
var channelItem = item as ChannelVideoItem;
|
var channelItem = item as ChannelVideoItem;
|
||||||
|
|
||||||
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.Trailer)
|
if (channelItem != null && channelItem.ContentType == ChannelMediaContentType.MovieExtra && channelItem.ExtraType == ExtraType.Trailer)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
|
|
||||||
public Task<MetadataResult<ChannelVideoItem>> GetMetadata(ChannelItemLookupInfo info, CancellationToken cancellationToken)
|
public Task<MetadataResult<ChannelVideoItem>> GetMetadata(ChannelItemLookupInfo info, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (info.ContentType != ChannelMediaContentType.Trailer)
|
if (info.ContentType != ChannelMediaContentType.MovieExtra || info.ExtraType != ExtraType.Trailer)
|
||||||
{
|
{
|
||||||
return Task.FromResult(new MetadataResult<ChannelVideoItem>());
|
return Task.FromResult(new MetadataResult<ChannelVideoItem>());
|
||||||
}
|
}
|
||||||
|
|
|
@ -547,7 +547,8 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
SupportsLatestMedia = supportsLatest,
|
SupportsLatestMedia = supportsLatest,
|
||||||
Name = channel.Name,
|
Name = channel.Name,
|
||||||
Id = channel.Id.ToString("N"),
|
Id = channel.Id.ToString("N"),
|
||||||
SupportsContentDownloading = isIndexable || supportsLatest
|
SupportsContentDownloading = isIndexable || supportsLatest,
|
||||||
|
AutoRefreshLevels = features.AutoRefreshLevels
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,6 +628,13 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
|
|
||||||
items = items.Where(i => contentTypes.Contains(i.Item2.ContentType));
|
items = items.Where(i => contentTypes.Contains(i.Item2.ContentType));
|
||||||
}
|
}
|
||||||
|
if (query.ExtraTypes.Length > 0)
|
||||||
|
{
|
||||||
|
// Avoid implicitly captured closure
|
||||||
|
var contentTypes = query.ExtraTypes;
|
||||||
|
|
||||||
|
items = items.Where(i => contentTypes.Contains(i.Item2.ExtraType));
|
||||||
|
}
|
||||||
|
|
||||||
// Avoid implicitly captured closure
|
// Avoid implicitly captured closure
|
||||||
var token = cancellationToken;
|
var token = cancellationToken;
|
||||||
|
@ -776,6 +784,13 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
|
|
||||||
items = items.Where(i => contentTypes.Contains(i.Item2.ContentType));
|
items = items.Where(i => contentTypes.Contains(i.Item2.ContentType));
|
||||||
}
|
}
|
||||||
|
if (query.ExtraTypes.Length > 0)
|
||||||
|
{
|
||||||
|
// Avoid implicitly captured closure
|
||||||
|
var contentTypes = query.ExtraTypes;
|
||||||
|
|
||||||
|
items = items.Where(i => contentTypes.Contains(i.Item2.ExtraType));
|
||||||
|
}
|
||||||
|
|
||||||
if (query.StartIndex.HasValue)
|
if (query.StartIndex.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -1161,60 +1176,62 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetIdToHash(string externalId, IChannel channelProvider)
|
private string GetIdToHash(string externalId, string channelName)
|
||||||
{
|
{
|
||||||
// Increment this as needed to force new downloads
|
// Increment this as needed to force new downloads
|
||||||
// Incorporate Name because it's being used to convert channel entity to provider
|
// Incorporate Name because it's being used to convert channel entity to provider
|
||||||
return externalId + (channelProvider.DataVersion ?? string.Empty) +
|
return externalId + (channelName ?? string.Empty) + "16";
|
||||||
(channelProvider.Name ?? string.Empty) + "16";
|
}
|
||||||
|
|
||||||
|
private T GetItemById<T>(string idString, string channelName, string channnelDataVersion, out bool isNew)
|
||||||
|
where T : BaseItem, IChannelItem, new()
|
||||||
|
{
|
||||||
|
var id = GetIdToHash(idString, channelName).GetMBId(typeof(T));
|
||||||
|
|
||||||
|
T item = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
item = _libraryManager.GetItemById(id) as T;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Error retrieving channel item from database", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item == null || !string.Equals(item.DataVersion, channnelDataVersion, StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
item = new T();
|
||||||
|
isNew = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isNew = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
item.DataVersion = channnelDataVersion;
|
||||||
|
item.Id = id;
|
||||||
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<BaseItem> GetChannelItemEntity(ChannelItemInfo info, IChannel channelProvider, Guid internalChannelId, CancellationToken cancellationToken)
|
private async Task<BaseItem> GetChannelItemEntity(ChannelItemInfo info, IChannel channelProvider, Guid internalChannelId, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
BaseItem item;
|
BaseItem item;
|
||||||
Guid id;
|
bool isNew;
|
||||||
var isNew = false;
|
|
||||||
|
|
||||||
var idToHash = GetIdToHash(info.Id, channelProvider);
|
|
||||||
|
|
||||||
if (info.Type == ChannelItemType.Folder)
|
if (info.Type == ChannelItemType.Folder)
|
||||||
{
|
{
|
||||||
id = idToHash.GetMBId(typeof(ChannelFolderItem));
|
item = GetItemById<ChannelFolderItem>(info.Id, channelProvider.Name, channelProvider.DataVersion, out isNew);
|
||||||
|
|
||||||
item = _libraryManager.GetItemById(id) as ChannelFolderItem;
|
|
||||||
|
|
||||||
if (item == null)
|
|
||||||
{
|
|
||||||
isNew = true;
|
|
||||||
item = new ChannelFolderItem();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (info.MediaType == ChannelMediaType.Audio)
|
else if (info.MediaType == ChannelMediaType.Audio)
|
||||||
{
|
{
|
||||||
id = idToHash.GetMBId(typeof(ChannelAudioItem));
|
item = GetItemById<ChannelAudioItem>(info.Id, channelProvider.Name, channelProvider.DataVersion, out isNew);
|
||||||
|
|
||||||
item = _libraryManager.GetItemById(id) as ChannelAudioItem;
|
|
||||||
|
|
||||||
if (item == null)
|
|
||||||
{
|
|
||||||
isNew = true;
|
|
||||||
item = new ChannelAudioItem();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
id = idToHash.GetMBId(typeof(ChannelVideoItem));
|
item = GetItemById<ChannelVideoItem>(info.Id, channelProvider.Name, channelProvider.DataVersion, out isNew);
|
||||||
|
|
||||||
item = _libraryManager.GetItemById(id) as ChannelVideoItem;
|
|
||||||
|
|
||||||
if (item == null)
|
|
||||||
{
|
|
||||||
isNew = true;
|
|
||||||
item = new ChannelVideoItem();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
item.Id = id;
|
|
||||||
item.RunTimeTicks = info.RunTimeTicks;
|
item.RunTimeTicks = info.RunTimeTicks;
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
|
@ -1254,6 +1271,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
if (channelMediaItem != null)
|
if (channelMediaItem != null)
|
||||||
{
|
{
|
||||||
channelMediaItem.ContentType = info.ContentType;
|
channelMediaItem.ContentType = info.ContentType;
|
||||||
|
channelMediaItem.ExtraType = info.ExtraType;
|
||||||
channelMediaItem.ChannelMediaSources = info.MediaSources;
|
channelMediaItem.ChannelMediaSources = info.MediaSources;
|
||||||
|
|
||||||
var mediaSource = info.MediaSources.FirstOrDefault();
|
var mediaSource = info.MediaSources.FirstOrDefault();
|
||||||
|
|
|
@ -64,9 +64,16 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
|
|
||||||
foreach (var channel in channels.Items)
|
foreach (var channel in channels.Items)
|
||||||
{
|
{
|
||||||
|
var channelId = channel.Id.ToString("N");
|
||||||
|
|
||||||
|
var features = _channelManager.GetChannelFeatures(channelId);
|
||||||
|
|
||||||
|
const int currentRefreshLevel = 1;
|
||||||
|
var maxRefreshLevel = features.AutoRefreshLevels ?? 1;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await GetAllItems(user, channel.Id.ToString("N"), null, false, cancellationToken).ConfigureAwait(false);
|
await GetAllItems(user, channelId, null, currentRefreshLevel, maxRefreshLevel, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -83,7 +90,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task GetAllItems(string user, string channelId, string folderId, bool recursive, CancellationToken cancellationToken)
|
private async Task GetAllItems(string user, string channelId, string folderId, int currentRefreshLevel, int maxRefreshLevel, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var folderItems = new List<string>();
|
var folderItems = new List<string>();
|
||||||
|
|
||||||
|
@ -117,13 +124,13 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||||
totalCount = result.TotalRecordCount;
|
totalCount = result.TotalRecordCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (recursive)
|
if (currentRefreshLevel < maxRefreshLevel)
|
||||||
{
|
{
|
||||||
foreach (var folder in folderItems)
|
foreach (var folder in folderItems)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await GetAllItems(user, channelId, folder, false, cancellationToken).ConfigureAwait(false);
|
await GetAllItems(user, channelId, folder, currentRefreshLevel + 1, maxRefreshLevel, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,7 +99,8 @@ namespace MediaBrowser.Server.Implementations.Intros
|
||||||
{
|
{
|
||||||
var channelTrailers = await _channelManager.GetAllMediaInternal(new AllChannelMediaQuery
|
var channelTrailers = await _channelManager.GetAllMediaInternal(new AllChannelMediaQuery
|
||||||
{
|
{
|
||||||
ContentTypes = new[] { ChannelMediaContentType.Trailer },
|
ContentTypes = new[] { ChannelMediaContentType.MovieExtra },
|
||||||
|
ExtraTypes = new[] { ExtraType.Trailer },
|
||||||
UserId = user.Id.ToString("N")
|
UserId = user.Id.ToString("N")
|
||||||
|
|
||||||
}, CancellationToken.None);
|
}, CancellationToken.None);
|
||||||
|
|
|
@ -449,10 +449,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
var list = new List<string>
|
var list = new List<string>
|
||||||
{
|
{
|
||||||
ConfigurationManager.ApplicationPaths.GetInternalMetadataPath(item.Id)
|
item.GetInternalMetadataPath()
|
||||||
};
|
};
|
||||||
|
|
||||||
list.AddRange(children.Select(i => ConfigurationManager.ApplicationPaths.GetInternalMetadataPath(i.Id)));
|
list.AddRange(children.Select(i => i.GetInternalMetadataPath()));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.IO;
|
||||||
using MediaBrowser.Common.IO;
|
|
||||||
using MediaBrowser.Controller.Chapters;
|
using MediaBrowser.Controller.Chapters;
|
||||||
using MediaBrowser.Controller.Configuration;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.MediaEncoding;
|
using MediaBrowser.Controller.MediaEncoding;
|
||||||
using MediaBrowser.Model.Configuration;
|
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
|
@ -22,20 +19,17 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||||
{
|
{
|
||||||
public class EncodingManager : IEncodingManager
|
public class EncodingManager : IEncodingManager
|
||||||
{
|
{
|
||||||
private readonly IServerConfigurationManager _config;
|
|
||||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IMediaEncoder _encoder;
|
private readonly IMediaEncoder _encoder;
|
||||||
private readonly IChapterManager _chapterManager;
|
private readonly IChapterManager _chapterManager;
|
||||||
|
|
||||||
public EncodingManager(IServerConfigurationManager config,
|
public EncodingManager(IFileSystem fileSystem,
|
||||||
IFileSystem fileSystem,
|
|
||||||
ILogger logger,
|
ILogger logger,
|
||||||
IMediaEncoder encoder,
|
IMediaEncoder encoder,
|
||||||
IChapterManager chapterManager)
|
IChapterManager chapterManager)
|
||||||
{
|
{
|
||||||
_config = config;
|
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_encoder = encoder;
|
_encoder = encoder;
|
||||||
|
@ -46,9 +40,9 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||||
/// Gets the chapter images data path.
|
/// Gets the chapter images data path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The chapter images data path.</value>
|
/// <value>The chapter images data path.</value>
|
||||||
private string GetChapterImagesPath(Guid itemId)
|
private string GetChapterImagesPath(IHasImages item)
|
||||||
{
|
{
|
||||||
return Path.Combine(_config.ApplicationPaths.GetInternalMetadataPath(itemId), "chapters");
|
return Path.Combine(item.GetInternalMetadataPath(), "chapters");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -190,12 +184,12 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||||
{
|
{
|
||||||
var filename = video.DateModified.Ticks.ToString(_usCulture) + "_" + chapterPositionTicks.ToString(_usCulture) + ".jpg";
|
var filename = video.DateModified.Ticks.ToString(_usCulture) + "_" + chapterPositionTicks.ToString(_usCulture) + ".jpg";
|
||||||
|
|
||||||
return Path.Combine(GetChapterImagesPath(video.Id), filename);
|
return Path.Combine(GetChapterImagesPath(video), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<string> GetSavedChapterImages(Video video)
|
private List<string> GetSavedChapterImages(Video video)
|
||||||
{
|
{
|
||||||
var path = GetChapterImagesPath(video.Id);
|
var path = GetChapterImagesPath(video);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -251,13 +251,5 @@ namespace MediaBrowser.Server.Implementations
|
||||||
_internalMetadataPath = value;
|
_internalMetadataPath = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public string GetInternalMetadataPath(Guid id)
|
|
||||||
{
|
|
||||||
var idString = id.ToString("N");
|
|
||||||
|
|
||||||
return Path.Combine(InternalMetadataPath, idString.Substring(0, 2), idString);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -508,7 +508,7 @@ namespace MediaBrowser.ServerApplication
|
||||||
ChapterManager = new ChapterManager(LibraryManager, LogManager.GetLogger("ChapterManager"), ServerConfigurationManager, ItemRepository);
|
ChapterManager = new ChapterManager(LibraryManager, LogManager.GetLogger("ChapterManager"), ServerConfigurationManager, ItemRepository);
|
||||||
RegisterSingleInstance(ChapterManager);
|
RegisterSingleInstance(ChapterManager);
|
||||||
|
|
||||||
EncodingManager = new EncodingManager(ServerConfigurationManager, FileSystemManager, Logger,
|
EncodingManager = new EncodingManager(FileSystemManager, Logger,
|
||||||
MediaEncoder, ChapterManager);
|
MediaEncoder, ChapterManager);
|
||||||
RegisterSingleInstance(EncodingManager);
|
RegisterSingleInstance(EncodingManager);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.438</version>
|
<version>3.0.443</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<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>
|
<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>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.438" />
|
<dependency id="MediaBrowser.Common" version="3.0.443" />
|
||||||
<dependency id="NLog" version="3.1.0.0" />
|
<dependency id="NLog" version="3.1.0.0" />
|
||||||
<dependency id="SimpleInjector" version="2.5.2" />
|
<dependency id="SimpleInjector" version="2.5.2" />
|
||||||
<dependency id="sharpcompress" version="0.10.2" />
|
<dependency id="sharpcompress" version="0.10.2" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.438</version>
|
<version>3.0.443</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Model.Signed</id>
|
<id>MediaBrowser.Model.Signed</id>
|
||||||
<version>3.0.438</version>
|
<version>3.0.443</version>
|
||||||
<title>MediaBrowser.Model - Signed Edition</title>
|
<title>MediaBrowser.Model - Signed Edition</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.438</version>
|
<version>3.0.443</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.438" />
|
<dependency id="MediaBrowser.Common" version="3.0.443" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in New Issue