diff --git a/BDInfo/BDInfo.csproj b/BDInfo/BDInfo.csproj index 1d19fec698..c448b8948a 100644 --- a/BDInfo/BDInfo.csproj +++ b/BDInfo/BDInfo.csproj @@ -34,10 +34,10 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/BDInfo/packages.config b/BDInfo/packages.config index c6ba3586c6..2d97e2a363 100644 --- a/BDInfo/packages.config +++ b/BDInfo/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/DvdLib/DvdLib.csproj b/DvdLib/DvdLib.csproj index 350d453a7b..c8b81e0e89 100644 --- a/DvdLib/DvdLib.csproj +++ b/DvdLib/DvdLib.csproj @@ -49,10 +49,10 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/DvdLib/packages.config b/DvdLib/packages.config index c6ba3586c6..2d97e2a363 100644 --- a/DvdLib/packages.config +++ b/DvdLib/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Emby.Dlna/Api/DlnaServerService.cs b/Emby.Dlna/Api/DlnaServerService.cs index 5b011eea5e..de385af485 100644 --- a/Emby.Dlna/Api/DlnaServerService.cs +++ b/Emby.Dlna/Api/DlnaServerService.cs @@ -167,42 +167,42 @@ public object Get(GetContentDirectory request) { var xml = ContentDirectory.GetServiceXml(Request.Headers.ToDictionary()); - return _resultFactory.GetResult(xml, XMLContentType); + return _resultFactory.GetResult(Request, xml, XMLContentType); } public object Get(GetMediaReceiverRegistrar request) { var xml = MediaReceiverRegistrar.GetServiceXml(Request.Headers.ToDictionary()); - return _resultFactory.GetResult(xml, XMLContentType); + return _resultFactory.GetResult(Request, xml, XMLContentType); } public object Get(GetConnnectionManager request) { var xml = ConnectionManager.GetServiceXml(Request.Headers.ToDictionary()); - return _resultFactory.GetResult(xml, XMLContentType); + return _resultFactory.GetResult(Request, xml, XMLContentType); } public object Post(ProcessMediaReceiverRegistrarControlRequest request) { var response = PostAsync(request.RequestStream, MediaReceiverRegistrar); - return _resultFactory.GetResult(response.Xml, XMLContentType); + return _resultFactory.GetResult(Request, response.Xml, XMLContentType); } public object Post(ProcessContentDirectoryControlRequest request) { var response = PostAsync(request.RequestStream, ContentDirectory); - return _resultFactory.GetResult(response.Xml, XMLContentType); + return _resultFactory.GetResult(Request, response.Xml, XMLContentType); } public object Post(ProcessConnectionManagerControlRequest request) { var response = PostAsync(request.RequestStream, ConnectionManager); - return _resultFactory.GetResult(response.Xml, XMLContentType); + return _resultFactory.GetResult(Request, response.Xml, XMLContentType); } private ControlResponse PostAsync(Stream requestStream, IUpnpService service) @@ -314,7 +314,7 @@ private object ProcessEventRequest(IEventManager eventManager) private object GetSubscriptionResponse(EventSubscriptionResponse response) { - return _resultFactory.GetResult(response.Content, response.ContentType, response.Headers); + return _resultFactory.GetResult(Request, response.Content, response.ContentType, response.Headers); } } } diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 9832122bfd..676edf1f6c 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -951,19 +951,6 @@ private void AddCover(BaseItem item, BaseItem context, StubType? stubType, XmlWr { ImageDownloadInfo imageInfo = null; - if (context is UserView) - { - var episode = item as Episode; - if (episode != null) - { - var parent = episode.Series; - if (parent != null) - { - imageInfo = GetImageInfo(parent); - } - } - } - // Finally, just use the image from the item if (imageInfo == null) { diff --git a/Emby.Dlna/Emby.Dlna.csproj b/Emby.Dlna/Emby.Dlna.csproj index 6adc558ecb..90f1171cd4 100644 --- a/Emby.Dlna/Emby.Dlna.csproj +++ b/Emby.Dlna/Emby.Dlna.csproj @@ -174,13 +174,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/Emby.Dlna/packages.config b/Emby.Dlna/packages.config index 7fa2eeafee..f15412e468 100644 --- a/Emby.Dlna/packages.config +++ b/Emby.Dlna/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/Emby.Drawing.ImageMagick/Emby.Drawing.ImageMagick.csproj b/Emby.Drawing.ImageMagick/Emby.Drawing.ImageMagick.csproj index 01006b6306..7219fa676d 100644 --- a/Emby.Drawing.ImageMagick/Emby.Drawing.ImageMagick.csproj +++ b/Emby.Drawing.ImageMagick/Emby.Drawing.ImageMagick.csproj @@ -35,13 +35,13 @@ ..\packages\ImageMagickSharp.1.0.0.19\lib\net45\ImageMagickSharp.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/Emby.Drawing.ImageMagick/packages.config b/Emby.Drawing.ImageMagick/packages.config index 9d33c994b9..d7f3aebcdd 100644 --- a/Emby.Drawing.ImageMagick/packages.config +++ b/Emby.Drawing.ImageMagick/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj b/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj index 21ba38973c..9d4e8068ea 100644 --- a/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj +++ b/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj @@ -43,13 +43,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/Emby.Drawing.Skia/packages.config b/Emby.Drawing.Skia/packages.config index 86da08bfd2..28567d021c 100644 --- a/Emby.Drawing.Skia/packages.config +++ b/Emby.Drawing.Skia/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index e6a3ab2c69..324f7f1d0c 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -41,13 +41,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 1155678c58..eeb5b8f9f6 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -518,19 +518,26 @@ private ImageSize GetImageSize(string path, bool allowSlowMethod) /// item public string GetImageCacheTag(BaseItem item, ItemImageInfo image) { - if (item == null) + var supportedEnhancers = GetSupportedEnhancers(item, image.Type); + + return GetImageCacheTag(item, image, supportedEnhancers); + } + + public string GetImageCacheTag(BaseItem item, ChapterInfo chapter) + { + try { - throw new ArgumentNullException("item"); + return GetImageCacheTag(item, new ItemImageInfo + { + Path = chapter.ImagePath, + Type = ImageType.Chapter, + DateModified = chapter.ImageDateModified + }); } - - if (image == null) + catch { - throw new ArgumentNullException("image"); + return null; } - - var supportedEnhancers = GetSupportedEnhancers(item, image.Type); - - return GetImageCacheTag(item, image, supportedEnhancers); } /// @@ -543,21 +550,6 @@ public string GetImageCacheTag(BaseItem item, ItemImageInfo image) /// item public string GetImageCacheTag(BaseItem item, ItemImageInfo image, IImageEnhancer[] imageEnhancers) { - if (item == null) - { - throw new ArgumentNullException("item"); - } - - if (imageEnhancers == null) - { - throw new ArgumentNullException("imageEnhancers"); - } - - if (image == null) - { - throw new ArgumentNullException("image"); - } - var originalImagePath = image.Path; var dateModified = image.DateModified; var imageType = image.Type; diff --git a/Emby.Drawing/packages.config b/Emby.Drawing/packages.config index b703a4ca6e..6932ba28ad 100644 --- a/Emby.Drawing/packages.config +++ b/Emby.Drawing/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj index 0e28328048..3fa652f062 100644 --- a/Emby.Photos/Emby.Photos.csproj +++ b/Emby.Photos/Emby.Photos.csproj @@ -32,13 +32,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll ..\ThirdParty\taglib\TagLib.Portable.dll diff --git a/Emby.Photos/packages.config b/Emby.Photos/packages.config index b703a4ca6e..6932ba28ad 100644 --- a/Emby.Photos/packages.config +++ b/Emby.Photos/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 45f421676e..8bd4a6e485 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -921,7 +921,7 @@ protected void RegisterResources() ZipClient = new ZipClient(FileSystemManager); RegisterSingleInstance(ZipClient); - HttpResultFactory = new HttpResultFactory(LogManager, FileSystemManager, JsonSerializer); + HttpResultFactory = new HttpResultFactory(LogManager, FileSystemManager, JsonSerializer, CreateBrotliCompressor()); RegisterSingleInstance(HttpResultFactory); RegisterSingleInstance(this); @@ -1091,6 +1091,11 @@ protected void RegisterResources() ((UserManager)UserManager).Initialize(); } + protected virtual IBrotliCompressor CreateBrotliCompressor() + { + return null; + } + private static Func GetParseFn(Type propertyType) { return s => JsvReader.GetParseFn(propertyType)(s); @@ -1361,6 +1366,8 @@ private void ConfigureNotificationsRepository() /// private void SetStaticProperties() { + ((SqliteItemRepository)ItemRepository).ImageProcessor = ImageProcessor; + // For now there's no real way to inject these properly BaseItem.Logger = LogManager.GetLogger("BaseItem"); BaseItem.ConfigurationManager = ServerConfigurationManager; diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 8fc8c2501d..bc62b9057a 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -472,7 +472,6 @@ private async Task GetChannel(IChannel channelInfo, CancellationToken c item.OfficialRating = GetOfficialRating(channelInfo.ParentalRating); item.Overview = channelInfo.Description; - item.HomePageUrl = channelInfo.HomePageUrl; if (string.IsNullOrWhiteSpace(item.Name)) { @@ -1023,7 +1022,6 @@ private BaseItem GetChannelItemEntity(ChannelItemInfo info, IChannel channelProv item.OfficialRating = info.OfficialRating; item.DateCreated = info.DateCreated ?? DateTime.UtcNow; item.Tags = info.Tags.ToArray(info.Tags.Count); - item.HomePageUrl = info.HomePageUrl; item.OriginalTitle = info.OriginalTitle; } else if (info.Type == ChannelItemType.Folder && info.FolderType == ChannelFolderType.Container) @@ -1066,12 +1064,13 @@ private BaseItem GetChannelItemEntity(ChannelItemInfo info, IChannel channelProv forceUpdate = true; } - if (!string.Equals(item.ExternalEtag ?? string.Empty, info.Etag ?? string.Empty, StringComparison.Ordinal)) - { - item.ExternalEtag = info.Etag; - forceUpdate = true; - _logger.Debug("Forcing update due to ExternalEtag {0}", item.Name); - } + // was used for status + //if (!string.Equals(item.ExternalEtag ?? string.Empty, info.Etag ?? string.Empty, StringComparison.Ordinal)) + //{ + // item.ExternalEtag = info.Etag; + // forceUpdate = true; + // _logger.Debug("Forcing update due to ExternalEtag {0}", item.Name); + //} if (!internalChannelId.Equals(item.ChannelId)) { @@ -1087,7 +1086,7 @@ private BaseItem GetChannelItemEntity(ChannelItemInfo info, IChannel channelProv } item.ParentId = parentFolderId; - var hasSeries = item as IHasSeries; + var hasSeries = item as IHasSeriesName; if (hasSeries != null) { if (!string.Equals(hasSeries.SeriesName, info.SeriesName, StringComparison.OrdinalIgnoreCase)) diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 157c52b9b7..08b528d4cf 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -33,6 +33,7 @@ using MediaBrowser.Model.Threading; using MediaBrowser.Model.Extensions; using MediaBrowser.Controller; +using MediaBrowser.Controller.Drawing; namespace Emby.Server.Implementations.Data { @@ -70,6 +71,8 @@ public string Name private readonly IEnvironmentInfo _environmentInfo; private IServerApplicationHost _appHost; + public IImageProcessor ImageProcessor { get; set; } + /// /// Initializes a new instance of the class. /// @@ -180,7 +183,6 @@ var createMediaStreamsTableCommand AddColumn(db, "TypedBaseItems", "SortName", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "ForcedSortName", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "RunTimeTicks", "BIGINT", existingColumnNames); - AddColumn(db, "TypedBaseItems", "HomePageUrl", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "DateCreated", "DATETIME", existingColumnNames); AddColumn(db, "TypedBaseItems", "DateModified", "DATETIME", existingColumnNames); AddColumn(db, "TypedBaseItems", "IsSeries", "BIT", existingColumnNames); @@ -189,7 +191,6 @@ var createMediaStreamsTableCommand AddColumn(db, "TypedBaseItems", "PreferredMetadataLanguage", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "PreferredMetadataCountryCode", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "IsHD", "BIT", existingColumnNames); - AddColumn(db, "TypedBaseItems", "ExternalEtag", "Text", existingColumnNames); AddColumn(db, "TypedBaseItems", "DateLastRefreshed", "DATETIME", existingColumnNames); AddColumn(db, "TypedBaseItems", "DateLastSaved", "DATETIME", existingColumnNames); AddColumn(db, "TypedBaseItems", "IsInMixedFolder", "BIT", existingColumnNames); @@ -362,7 +363,6 @@ var createMediaStreamsTableCommand "PreferredMetadataLanguage", "PreferredMetadataCountryCode", "IsHD", - "ExternalEtag", "DateLastRefreshed", "Name", "Path", @@ -371,7 +371,6 @@ var createMediaStreamsTableCommand "ParentIndexNumber", "ProductionYear", "OfficialRating", - "HomePageUrl", "ForcedSortName", "RunTimeTicks", "DateCreated", @@ -487,13 +486,11 @@ private string GetSaveItemCommandText() "SortName", "ForcedSortName", "RunTimeTicks", - "HomePageUrl", "DateCreated", "DateModified", "PreferredMetadataLanguage", "PreferredMetadataCountryCode", "IsHD", - "ExternalEtag", "DateLastRefreshed", "DateLastSaved", "IsInMixedFolder", @@ -796,14 +793,12 @@ private void SaveItem(BaseItem item, BaseItem topParent, string userDataKey, ISt saveItemStatement.TryBind("@RunTimeTicks", item.RunTimeTicks); - saveItemStatement.TryBind("@HomePageUrl", item.HomePageUrl); saveItemStatement.TryBind("@DateCreated", item.DateCreated); saveItemStatement.TryBind("@DateModified", item.DateModified); saveItemStatement.TryBind("@PreferredMetadataLanguage", item.PreferredMetadataLanguage); saveItemStatement.TryBind("@PreferredMetadataCountryCode", item.PreferredMetadataCountryCode); saveItemStatement.TryBind("@IsHD", item.IsHD); - saveItemStatement.TryBind("@ExternalEtag", item.ExternalEtag); if (item.DateLastRefreshed != default(DateTime)) { @@ -852,7 +847,15 @@ private void SaveItem(BaseItem item, BaseItem topParent, string userDataKey, ISt saveItemStatement.TryBindNull("@Audio"); } - saveItemStatement.TryBind("@ExternalServiceId", item.ServiceName); + var livetvChannel = item as LiveTvChannel; + if (livetvChannel != null) + { + saveItemStatement.TryBind("@ExternalServiceId", livetvChannel.ServiceName); + } + else + { + saveItemStatement.TryBindNull("@ExternalServiceId"); + } if (item.Tags.Length > 0) { @@ -925,10 +928,10 @@ private void SaveItem(BaseItem item, BaseItem topParent, string userDataKey, ISt saveItemStatement.TryBind("@Album", item.Album); saveItemStatement.TryBind("@IsVirtualItem", item.IsVirtualItem); - var hasSeries = item as IHasSeries; - if (hasSeries != null) + var hasSeriesName = item as IHasSeriesName; + if (hasSeriesName != null) { - saveItemStatement.TryBind("@SeriesName", hasSeries.SeriesName); + saveItemStatement.TryBind("@SeriesName", hasSeriesName.SeriesName); } else { @@ -959,6 +962,7 @@ private void SaveItem(BaseItem item, BaseItem topParent, string userDataKey, ISt saveItemStatement.TryBindNull("@SeasonId"); } + var hasSeries = item as IHasSeries; if (hasSeries != null) { var nullableSeriesId = hasSeries.SeriesId.Equals(Guid.Empty) ? (Guid?)null : hasSeries.SeriesId; @@ -1049,7 +1053,7 @@ private void SaveItem(BaseItem item, BaseItem topParent, string userDataKey, ISt } var ownerId = item.OwnerId; - if (ownerId != Guid.Empty) + if (!ownerId.Equals(Guid.Empty)) { saveItemStatement.TryBind("@OwnerId", ownerId); } @@ -1325,10 +1329,10 @@ private bool TypeRequiresDeserialization(Type type) private BaseItem GetItem(IReadOnlyList reader, InternalItemsQuery query) { - return GetItem(reader, query, HasProgramAttributes(query), HasEpisodeAttributes(query), HasStartDate(query), HasTrailerTypes(query), HasArtistFields(query), HasSeriesFields(query)); + return GetItem(reader, query, HasProgramAttributes(query), HasEpisodeAttributes(query), HasServiceName(query), HasStartDate(query), HasTrailerTypes(query), HasArtistFields(query), HasSeriesFields(query)); } - private BaseItem GetItem(IReadOnlyList reader, InternalItemsQuery query, bool enableProgramAttributes, bool hasEpisodeAttributes, bool queryHasStartDate, bool hasTrailerTypes, bool hasArtistFields, bool hasSeriesFields) + private BaseItem GetItem(IReadOnlyList reader, InternalItemsQuery query, bool enableProgramAttributes, bool hasEpisodeAttributes, bool hasServiceName, bool queryHasStartDate, bool hasTrailerTypes, bool hasArtistFields, bool hasSeriesFields) { var typeString = reader.GetString(0); @@ -1486,15 +1490,6 @@ private BaseItem GetItem(IReadOnlyList reader, InternalItemsQue } index++; - if (HasField(query, ItemFields.ExternalEtag)) - { - if (!reader.IsDBNull(index)) - { - item.ExternalEtag = reader.GetString(index); - } - index++; - } - if (HasField(query, ItemFields.DateLastRefreshed)) { if (!reader.IsDBNull(index)) @@ -1549,15 +1544,6 @@ private BaseItem GetItem(IReadOnlyList reader, InternalItemsQue } index++; - if (HasField(query, ItemFields.HomePageUrl)) - { - if (!reader.IsDBNull(index)) - { - item.HomePageUrl = reader.GetString(index); - } - index++; - } - if (HasField(query, ItemFields.SortName)) { if (!reader.IsDBNull(index)) @@ -1618,11 +1604,18 @@ private BaseItem GetItem(IReadOnlyList reader, InternalItemsQue // TODO: Even if not needed by apps, the server needs it internally // But get this excluded from contexts where it is not needed - if (!reader.IsDBNull(index)) + if (hasServiceName) { - item.ServiceName = reader.GetString(index); + var livetvChannel = item as LiveTvChannel; + if (livetvChannel != null) + { + if (!reader.IsDBNull(index)) + { + livetvChannel.ServiceName = reader.GetString(index); + } + } + index++; } - index++; if (!reader.IsDBNull(index)) { @@ -1747,18 +1740,15 @@ private BaseItem GetItem(IReadOnlyList reader, InternalItemsQue } index++; - var hasSeries = item as IHasSeries; - if (hasSeriesFields) + var hasSeriesName = item as IHasSeriesName; + if (hasSeriesName != null) { - if (hasSeries != null) + if (!reader.IsDBNull(index)) { - if (!reader.IsDBNull(index)) - { - hasSeries.SeriesName = reader.GetString(index); - } + hasSeriesName.SeriesName = reader.GetString(index); } - index++; } + index++; if (hasEpisodeAttributes) { @@ -1782,6 +1772,7 @@ private BaseItem GetItem(IReadOnlyList reader, InternalItemsQue index++; } + var hasSeries = item as IHasSeries; if (hasSeriesFields) { if (hasSeries != null) @@ -1969,13 +1960,9 @@ private Guid[] SplitToGuids(string value) /// The id. /// IEnumerable{ChapterInfo}. /// id - public List GetChapters(Guid id) + public List GetChapters(BaseItem item) { CheckDisposed(); - if (id.Equals(Guid.Empty)) - { - throw new ArgumentNullException("id"); - } using (WriteLock.Read()) { @@ -1985,11 +1972,11 @@ public List GetChapters(Guid id) using (var statement = PrepareStatementSafe(connection, "select StartPositionTicks,Name,ImagePath,ImageDateModified from " + ChaptersTableName + " where ItemId = @ItemId order by ChapterIndex asc")) { - statement.TryBind("@ItemId", id); + statement.TryBind("@ItemId", item.Id); foreach (var row in statement.ExecuteQuery()) { - list.Add(GetChapter(row)); + list.Add(GetChapter(row, item)); } } @@ -2005,13 +1992,9 @@ public List GetChapters(Guid id) /// The index. /// ChapterInfo. /// id - public ChapterInfo GetChapter(Guid id, int index) + public ChapterInfo GetChapter(BaseItem item, int index) { CheckDisposed(); - if (id.Equals(Guid.Empty)) - { - throw new ArgumentNullException("id"); - } using (WriteLock.Read()) { @@ -2019,12 +2002,12 @@ public ChapterInfo GetChapter(Guid id, int index) { using (var statement = PrepareStatementSafe(connection, "select StartPositionTicks,Name,ImagePath,ImageDateModified from " + ChaptersTableName + " where ItemId = @ItemId and ChapterIndex=@ChapterIndex")) { - statement.TryBind("@ItemId", id); + statement.TryBind("@ItemId", item.Id); statement.TryBind("@ChapterIndex", index); foreach (var row in statement.ExecuteQuery()) { - return GetChapter(row); + return GetChapter(row, item); } } } @@ -2037,7 +2020,7 @@ public ChapterInfo GetChapter(Guid id, int index) /// /// The reader. /// ChapterInfo. - private ChapterInfo GetChapter(IReadOnlyList reader) + private ChapterInfo GetChapter(IReadOnlyList reader, BaseItem item) { var chapter = new ChapterInfo { @@ -2052,6 +2035,11 @@ private ChapterInfo GetChapter(IReadOnlyList reader) if (!reader.IsDBNull(2)) { chapter.ImagePath = reader.GetString(2); + + if (!string.IsNullOrEmpty(chapter.ImagePath)) + { + chapter.ImageTag = ImageProcessor.GetImageCacheTag(item, chapter); + } } if (!reader.IsDBNull(3)) @@ -2221,7 +2209,6 @@ private bool HasField(InternalItemsQuery query, ItemFields name) { case ItemFields.Tags: return fields.Contains(name) || HasProgramAttributes(query); - case ItemFields.HomePageUrl: case ItemFields.CustomRating: case ItemFields.ProductionLocations: case ItemFields.Settings: @@ -2235,7 +2222,6 @@ private bool HasField(InternalItemsQuery query, ItemFields name) case ItemFields.Overview: case ItemFields.Genres: case ItemFields.DateLastMediaAdded: - case ItemFields.ExternalEtag: case ItemFields.PresentationUniqueKey: case ItemFields.InheritedParentalRatingValue: case ItemFields.ExternalSeriesId: @@ -2244,7 +2230,7 @@ private bool HasField(InternalItemsQuery query, ItemFields name) case ItemFields.DateLastSaved: return fields.Contains(name); case ItemFields.ServiceName: - return true; + return HasServiceName(query); default: return true; } @@ -2274,10 +2260,7 @@ private bool HasProgramAttributes(InternalItemsQuery query) var types = new string[] { "Program", - "Recording", "TvChannel", - "LiveTvAudioRecording", - "LiveTvVideoRecording", "LiveTvProgram", "LiveTvTvChannel" }; @@ -2285,6 +2268,36 @@ private bool HasProgramAttributes(InternalItemsQuery query) return types.Any(i => query.IncludeItemTypes.Contains(i, StringComparer.OrdinalIgnoreCase)); } + private bool HasServiceName(InternalItemsQuery query) + { + var excludeParentTypes = new string[] + { + "Series", + "Season", + "MusicAlbum", + "MusicArtist", + "PhotoAlbum" + }; + + if (excludeParentTypes.Contains(query.ParentType ?? string.Empty, StringComparer.OrdinalIgnoreCase)) + { + return false; + } + + if (query.IncludeItemTypes.Length == 0) + { + return true; + } + + var types = new string[] + { + "TvChannel", + "LiveTvTvChannel" + }; + + return types.Any(i => query.IncludeItemTypes.Contains(i, StringComparer.OrdinalIgnoreCase)); + } + private bool HasStartDate(InternalItemsQuery query) { var excludeParentTypes = new string[] @@ -2309,9 +2322,6 @@ private bool HasStartDate(InternalItemsQuery query) var types = new string[] { "Program", - "Recording", - "LiveTvAudioRecording", - "LiveTvVideoRecording", "LiveTvProgram" }; @@ -2373,9 +2383,7 @@ private bool HasArtistFields(InternalItemsQuery query) "MusicAlbum", "MusicVideo", "AudioBook", - "AudioPodcast", - "LiveTvAudioRecording", - "Recording" + "AudioPodcast" }; return types.Any(i => query.IncludeItemTypes.Contains(i, StringComparer.OrdinalIgnoreCase)); @@ -2458,7 +2466,6 @@ private string[] GetFinalColumnsToSelect(InternalItemsQuery query, string[] star if (!HasSeriesFields(query)) { list.Remove("SeriesId"); - list.Remove("SeriesName"); } if (!HasEpisodeAttributes(query)) @@ -2704,6 +2711,7 @@ public List GetItemList(InternalItemsQuery query) GetWhereClauses(query, statement); var hasEpisodeAttributes = HasEpisodeAttributes(query); + var hasServiceName = HasServiceName(query); var hasProgramAttributes = HasProgramAttributes(query); var hasStartDate = HasStartDate(query); var hasTrailerTypes = HasTrailerTypes(query); @@ -2712,7 +2720,7 @@ public List GetItemList(InternalItemsQuery query) foreach (var row in statement.ExecuteQuery()) { - var item = GetItem(row, query, hasProgramAttributes, hasEpisodeAttributes, hasStartDate, hasTrailerTypes, hasArtistFields, hasSeriesFields); + var item = GetItem(row, query, hasProgramAttributes, hasEpisodeAttributes, hasServiceName, hasStartDate, hasTrailerTypes, hasArtistFields, hasSeriesFields); if (item != null) { list.Add(item); @@ -2916,6 +2924,7 @@ public QueryResult GetItems(InternalItemsQuery query) GetWhereClauses(query, statement); var hasEpisodeAttributes = HasEpisodeAttributes(query); + var hasServiceName = HasServiceName(query); var hasProgramAttributes = HasProgramAttributes(query); var hasStartDate = HasStartDate(query); var hasTrailerTypes = HasTrailerTypes(query); @@ -2924,7 +2933,7 @@ public QueryResult GetItems(InternalItemsQuery query) foreach (var row in statement.ExecuteQuery()) { - var item = GetItem(row, query, hasProgramAttributes, hasEpisodeAttributes, hasStartDate, hasTrailerTypes, hasArtistFields, hasSeriesFields); + var item = GetItem(row, query, hasProgramAttributes, hasEpisodeAttributes, hasServiceName, hasStartDate, hasTrailerTypes, hasArtistFields, hasSeriesFields); if (item != null) { list.Add(item); @@ -4882,7 +4891,7 @@ private List GetPeopleWhereClauses(InternalPeopleQuery query, IStatement { var whereClauses = new List(); - if (query.ItemId != Guid.Empty) + if (!query.ItemId.Equals(Guid.Empty)) { whereClauses.Add("ItemId=@ItemId"); if (statement != null) @@ -4890,7 +4899,7 @@ private List GetPeopleWhereClauses(InternalPeopleQuery query, IStatement statement.TryBind("@ItemId", query.ItemId.ToGuidBlob()); } } - if (query.AppearsInItemId != Guid.Empty) + if (!query.AppearsInItemId.Equals(Guid.Empty)) { whereClauses.Add("Name in (Select Name from People where ItemId=@AppearsInItemId)"); if (statement != null) @@ -5285,6 +5294,7 @@ private QueryResult> GetItemValues(InternalItemsQuer var hasEpisodeAttributes = HasEpisodeAttributes(query); var hasProgramAttributes = HasProgramAttributes(query); + var hasServiceName = HasServiceName(query); var hasStartDate = HasStartDate(query); var hasTrailerTypes = HasTrailerTypes(query); var hasArtistFields = HasArtistFields(query); @@ -5292,7 +5302,7 @@ private QueryResult> GetItemValues(InternalItemsQuer foreach (var row in statement.ExecuteQuery()) { - var item = GetItem(row, query, hasProgramAttributes, hasEpisodeAttributes, hasStartDate, hasTrailerTypes, hasArtistFields, hasSeriesFields); + var item = GetItem(row, query, hasProgramAttributes, hasEpisodeAttributes, hasServiceName, hasStartDate, hasTrailerTypes, hasArtistFields, hasSeriesFields); if (item != null) { var countStartColumn = columns.Count - 1; diff --git a/Emby.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.cs index 46a1b65243..882ebc3b3a 100644 --- a/Emby.Server.Implementations/Devices/DeviceManager.cs +++ b/Emby.Server.Implementations/Devices/DeviceManager.cs @@ -355,7 +355,7 @@ private bool CanAccessDevice(UserPolicy policy, string id) return true; } - return ListHelper.ContainsIgnoreCase(policy.EnabledDevices, id); + return policy.EnabledDevices.Contains(id, StringComparer.OrdinalIgnoreCase); } } diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 74d8d95d89..12e58666f2 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -501,31 +501,6 @@ public string GetDtoId(BaseItem item) return item.Id.ToString("N"); } - /// - /// Converts a UserItemData to a DTOUserItemData - /// - /// The data. - /// DtoUserItemData. - /// - public UserItemDataDto GetUserItemDataDto(UserItemData data) - { - if (data == null) - { - throw new ArgumentNullException("data"); - } - - return new UserItemDataDto - { - IsFavorite = data.IsFavorite, - Likes = data.Likes, - PlaybackPositionTicks = data.PlaybackPositionTicks, - PlayCount = data.PlayCount, - Rating = data.Rating, - Played = data.Played, - LastPlayedDate = data.LastPlayedDate, - Key = data.Key - }; - } private void SetBookProperties(BaseItemDto dto, Book item) { dto.SeriesName = item.SeriesName; @@ -754,40 +729,6 @@ private Guid GetGenreId(string name, BaseItem owner) return _libraryManager.GetGenreId(name); } - /// - /// Gets the chapter info dto. - /// - /// The chapter info. - /// The item. - /// ChapterInfoDto. - private ChapterInfoDto GetChapterInfoDto(ChapterInfo chapterInfo, BaseItem item) - { - var dto = new ChapterInfoDto - { - Name = chapterInfo.Name, - StartPositionTicks = chapterInfo.StartPositionTicks - }; - - if (!string.IsNullOrEmpty(chapterInfo.ImagePath)) - { - dto.ImageTag = GetImageCacheTag(item, new ItemImageInfo - { - Path = chapterInfo.ImagePath, - Type = ImageType.Chapter, - DateModified = chapterInfo.ImageDateModified - }); - } - - return dto; - } - - public List GetChapterInfoDtos(BaseItem item) - { - return _itemRepo.GetChapters(item.Id) - .Select(c => GetChapterInfoDto(c, item)) - .ToList(); - } - /// /// Sets simple property values on a DTOBaseItem /// @@ -814,11 +755,6 @@ private void AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, D dto.EndDate = item.EndDate; - if (fields.Contains(ItemFields.HomePageUrl)) - { - dto.HomePageUrl = item.HomePageUrl; - } - if (fields.Contains(ItemFields.ExternalUrls)) { dto.ExternalUrls = _providerManager.GetExternalUrls(item).ToArray(); @@ -1169,7 +1105,7 @@ private void AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, D if (fields.Contains(ItemFields.Chapters)) { - dto.Chapters = GetChapterInfoDtos(item); + dto.Chapters = _itemRepo.GetChapters(item); } if (video.ExtraType.HasValue) @@ -1495,15 +1431,15 @@ public void AttachPrimaryImageAspectRatio(IItemDto dto, BaseItem item) var defaultAspectRatio = item.GetDefaultPrimaryImageAspectRatio(); - if (defaultAspectRatio.HasValue) + if (defaultAspectRatio > 0) { if (supportedEnhancers.Length == 0) { - return defaultAspectRatio.Value; + return defaultAspectRatio; } double dummyWidth = 200; - double dummyHeight = dummyWidth / defaultAspectRatio.Value; + double dummyHeight = dummyWidth / defaultAspectRatio; size = new ImageSize(dummyWidth, dummyHeight); } else diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 609d72b066..0d6fd6a749 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -614,13 +614,13 @@ ..\packages\Emby.XmlTv.1.0.14\lib\portable-net45+netstandard2.0+win8\Emby.XmlTv.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index 683dc3ace0..5e616426ba 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -32,13 +32,16 @@ public class HttpResultFactory : IHttpResultFactory private readonly IFileSystem _fileSystem; private readonly IJsonSerializer _jsonSerializer; + private IBrotliCompressor _brotliCompressor; + /// /// Initializes a new instance of the class. /// - public HttpResultFactory(ILogManager logManager, IFileSystem fileSystem, IJsonSerializer jsonSerializer) + public HttpResultFactory(ILogManager logManager, IFileSystem fileSystem, IJsonSerializer jsonSerializer, IBrotliCompressor brotliCompressor) { _fileSystem = fileSystem; _jsonSerializer = jsonSerializer; + _brotliCompressor = brotliCompressor; _logger = logManager.GetLogger("HttpResultFactory"); } @@ -49,9 +52,9 @@ public HttpResultFactory(ILogManager logManager, IFileSystem fileSystem, IJsonSe /// Type of the content. /// The response headers. /// System.Object. - public object GetResult(byte[] content, string contentType, IDictionary responseHeaders = null) + public object GetResult(IRequest requestContext, byte[] content, string contentType, IDictionary responseHeaders = null) { - return GetHttpResult(null, content, contentType, true, responseHeaders); + return GetHttpResult(requestContext, content, contentType, true, responseHeaders); } public object GetResult(string content, string contentType, IDictionary responseHeaders = null) @@ -59,9 +62,9 @@ public object GetResult(string content, string contentType, IDictionary responseHeaders = null) + public object GetResult(IRequest requestContext, Stream content, string contentType, IDictionary responseHeaders = null) { - return GetHttpResult(null, content, contentType, true, responseHeaders); + return GetHttpResult(requestContext, content, contentType, true, responseHeaders); } public object GetResult(IRequest requestContext, string content, string contentType, IDictionary responseHeaders = null) @@ -84,50 +87,98 @@ public object GetRedirectResult(string url) /// /// Gets the HTTP result. /// - private IHasHeaders GetHttpResult(IRequest requestContext, object content, string contentType, bool addCachePrevention, IDictionary responseHeaders = null) + private IHasHeaders GetHttpResult(IRequest requestContext, Stream content, string contentType, bool addCachePrevention, IDictionary responseHeaders = null) { - IHasHeaders result; + var result = new StreamWriter(content, contentType, _logger); - var stream = content as Stream; + if (responseHeaders == null) + { + responseHeaders = new Dictionary(); + } - if (stream != null) + string expires; + if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires)) { - result = new StreamWriter(stream, contentType, _logger); + responseHeaders["Expires"] = "-1"; } - else + AddResponseHeaders(result, responseHeaders); + + return result; + } + + /// + /// Gets the HTTP result. + /// + private IHasHeaders GetHttpResult(IRequest requestContext, byte[] content, string contentType, bool addCachePrevention, IDictionary responseHeaders = null) + { + IHasHeaders result; + + var compressionType = requestContext == null ? null : GetCompressionType(requestContext, content, contentType); + + var isHeadRequest = string.Equals(requestContext.Verb, "head", StringComparison.OrdinalIgnoreCase); + + if (string.IsNullOrEmpty(compressionType)) { - var bytes = content as byte[]; + var contentLength = content.Length; - if (bytes != null) + if (isHeadRequest) { - result = new StreamWriter(bytes, contentType, _logger); + content = Array.Empty(); } - else - { - var text = content as string; - if (text != null) - { - var compressionType = requestContext == null ? null : GetCompressionType(requestContext); - - if (string.IsNullOrEmpty(compressionType)) - { - result = new StreamWriter(Encoding.UTF8.GetBytes(text), contentType, _logger); - } - else - { - var isHeadRequest = string.Equals(requestContext.Verb, "head", StringComparison.OrdinalIgnoreCase); - - result = GetCompressedResult(Encoding.UTF8.GetBytes(text), compressionType, responseHeaders, isHeadRequest, contentType); - } - } - else - { - result = new HttpResult(content, contentType, HttpStatusCode.OK); - } + result = new StreamWriter(content, contentType, contentLength, _logger); + } + else + { + result = GetCompressedResult(content, compressionType, responseHeaders, isHeadRequest, contentType); + } + + if (responseHeaders == null) + { + responseHeaders = new Dictionary(); + } + + string expires; + if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires)) + { + responseHeaders["Expires"] = "-1"; + } + + AddResponseHeaders(result, responseHeaders); + + return result; + } + + /// + /// Gets the HTTP result. + /// + private IHasHeaders GetHttpResult(IRequest requestContext, string content, string contentType, bool addCachePrevention, IDictionary responseHeaders = null) + { + IHasHeaders result; + + var bytes = Encoding.UTF8.GetBytes(content); + + var compressionType = requestContext == null ? null : GetCompressionType(requestContext, bytes, contentType); + + var isHeadRequest = requestContext == null ? false : string.Equals(requestContext.Verb, "head", StringComparison.OrdinalIgnoreCase); + + if (string.IsNullOrEmpty(compressionType)) + { + var contentLength = bytes.Length; + + if (isHeadRequest) + { + bytes = Array.Empty(); } + + result = new StreamWriter(bytes, contentType, contentLength, _logger); } + else + { + result = GetCompressedResult(bytes, compressionType, responseHeaders, isHeadRequest, contentType); + } + if (responseHeaders == null) { responseHeaders = new Dictionary(); @@ -166,16 +217,44 @@ public object GetResult(IRequest requestContext, T result, IDictionary(StringComparer.OrdinalIgnoreCase); } - // Per apple docs, hls manifests must be compressed - if ((contentType ?? string.Empty).IndexOf("application/x-mpegURL") != -1) - { - content = Compress(content, requestedCompressionType); - responseHeaders["Content-Encoding"] = requestedCompressionType; - } + content = Compress(content, requestedCompressionType); + responseHeaders["Content-Encoding"] = requestedCompressionType; responseHeaders["Vary"] = "Accept-Encoding"; - responseHeaders["Content-Length"] = content.Length.ToString(UsCulture); + + var contentLength = content.Length; if (isHeadRequest) { - var result = new StreamWriter(Array.Empty(), contentType, _logger); + var result = new StreamWriter(Array.Empty(), contentType, contentLength, _logger); AddResponseHeaders(result, responseHeaders); return result; } else { - var result = new StreamWriter(content, contentType, _logger); + var result = new StreamWriter(content, contentType, contentLength, _logger); AddResponseHeaders(result, responseHeaders); return result; } @@ -269,15 +345,23 @@ private IHasHeaders GetCompressedResult(byte[] content, private byte[] Compress(byte[] bytes, string compressionType) { - if (compressionType == "deflate") + if (string.Equals(compressionType, "br", StringComparison.OrdinalIgnoreCase)) + return CompressBrotli(bytes); + + if (string.Equals(compressionType, "deflate", StringComparison.OrdinalIgnoreCase)) return Deflate(bytes); - if (compressionType == "gzip") + if (string.Equals(compressionType, "gzip", StringComparison.OrdinalIgnoreCase)) return GZip(bytes); throw new NotSupportedException(compressionType); } + private byte[] CompressBrotli(byte[] bytes) + { + return _brotliCompressor.Compress(bytes); + } + private byte[] Deflate(byte[] bytes) { // In .NET FX incompat-ville, you can't access compressed bytes without closing DeflateStream @@ -299,7 +383,7 @@ private byte[] GZip(byte[] buffer) { zipStream.Write(buffer, 0, buffer.Length); zipStream.Dispose(); - + return ms.ToArray(); } } @@ -331,60 +415,6 @@ private string SerializeToXmlString(object from) } } - /// - /// To the cached result. - /// - /// - /// The request context. - /// The cache key. - /// The last date modified. - /// Duration of the cache. - /// The factory fn. - /// Type of the content. - /// The response headers. - /// System.Object. - /// cacheKey - public object GetCachedResult(IRequest requestContext, Guid cacheKey, DateTime? lastDateModified, TimeSpan? cacheDuration, Func factoryFn, string contentType, IDictionary responseHeaders = null) - where T : class - { - if (cacheKey.Equals(Guid.Empty)) - { - throw new ArgumentNullException("cacheKey"); - } - if (factoryFn == null) - { - throw new ArgumentNullException("factoryFn"); - } - - var key = cacheKey.ToString("N"); - - if (responseHeaders == null) - { - responseHeaders = new Dictionary(StringComparer.OrdinalIgnoreCase); - } - - // See if the result is already cached in the browser - var result = GetCachedResult(requestContext, responseHeaders, cacheKey, key, lastDateModified, cacheDuration, contentType); - - if (result != null) - { - return result; - } - - result = factoryFn(); - - // Apply caching headers - var hasHeaders = result as IHasHeaders; - - if (hasHeaders != null) - { - AddResponseHeaders(hasHeaders, responseHeaders); - return hasHeaders; - } - - return GetHttpResult(requestContext, result, contentType, false, responseHeaders); - } - /// /// Pres the process optimized result. /// @@ -741,4 +771,9 @@ private void AddResponseHeaders(IHasHeaders hasHeaders, IEnumerableThe source. /// Type of the content. /// The logger. - public StreamWriter(byte[] source, string contentType, ILogger logger) + public StreamWriter(byte[] source, string contentType, int contentLength, ILogger logger) { if (string.IsNullOrEmpty(contentType)) { @@ -85,7 +85,7 @@ public StreamWriter(byte[] source, string contentType, ILogger logger) Headers["Content-Type"] = contentType; - Headers["Content-Length"] = source.Length.ToString(UsCulture); + Headers["Content-Length"] = contentLength.ToString(UsCulture); } public async Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken) diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 644e2a8bb9..7978b82548 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -235,11 +235,6 @@ public void CreateShortcut(string shortcutPath, string target) /// property will be set to true and all other properties will reflect the properties of the directory. public FileSystemMetadata GetFileSystemInfo(string path) { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - if (_sharpCifsFileSystem.IsEnabledForPath(path)) { return _sharpCifsFileSystem.GetFileSystemInfo(path); @@ -280,11 +275,6 @@ public FileSystemMetadata GetFileSystemInfo(string path) /// For automatic handling of files and directories, use . public FileSystemMetadata GetFileInfo(string path) { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - if (_sharpCifsFileSystem.IsEnabledForPath(path)) { return _sharpCifsFileSystem.GetFileInfo(path); @@ -305,11 +295,6 @@ public FileSystemMetadata GetFileInfo(string path) /// For automatic handling of files and directories, use . public FileSystemMetadata GetDirectoryInfo(string path) { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - if (_sharpCifsFileSystem.IsEnabledForPath(path)) { return _sharpCifsFileSystem.GetDirectoryInfo(path); @@ -388,11 +373,6 @@ private ExtendedFileSystemInfo GetExtendedFileSystemInfo(string path) /// filename public string GetValidFilename(string filename) { - if (string.IsNullOrEmpty(filename)) - { - throw new ArgumentNullException("filename"); - } - var builder = new StringBuilder(filename); foreach (var c in _invalidFileNameChars) @@ -814,11 +794,6 @@ public string GetFileNameWithoutExtension(string path) public bool IsPathFile(string path) { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - // Cannot use Path.IsPathRooted because it returns false under mono when using windows-based paths, e.g. C:\\ if (_sharpCifsFileSystem.IsEnabledForPath(path)) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 206ce2ac30..fabe0c434e 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -299,7 +299,7 @@ public void RegisterItem(BaseItem item) } else { - if (!(item is Video)) + if (!(item is Video) && !(item is LiveTvChannel)) { return; } @@ -1568,7 +1568,7 @@ private IEnumerable GetTopParentIdsForQuery(BaseItem item, User user) } // Translate view into folders - if (view.DisplayParentId != Guid.Empty) + if (!view.DisplayParentId.Equals(Guid.Empty)) { var displayParent = GetItemById(view.DisplayParentId); if (displayParent != null) @@ -1577,7 +1577,7 @@ private IEnumerable GetTopParentIdsForQuery(BaseItem item, User user) } return Array.Empty(); } - if (view.ParentId != Guid.Empty) + if (!view.ParentId.Equals(Guid.Empty)) { var displayParent = GetItemById(view.ParentId); if (displayParent != null) @@ -2137,7 +2137,7 @@ public UserView GetNamedView(User user, string viewType, string sortName) { - return GetNamedView(user, name, null, viewType, sortName); + return GetNamedView(user, name, Guid.Empty, viewType, sortName); } public UserView GetNamedView(string name, @@ -2173,17 +2173,6 @@ public UserView GetNamedView(string name, refresh = true; } - if (!refresh) - { - refresh = DateTime.UtcNow - item.DateLastRefreshed >= _viewRefreshInterval; - } - - if (!refresh && item.DisplayParentId != Guid.Empty) - { - var displayParent = GetItemById(item.DisplayParentId); - refresh = displayParent != null && displayParent.DateLastSaved > item.DateLastRefreshed; - } - if (refresh) { item.UpdateToRepository(ItemUpdateType.MetadataImport, CancellationToken.None); @@ -2195,11 +2184,12 @@ public UserView GetNamedView(string name, public UserView GetNamedView(User user, string name, - string parentId, + Guid parentId, string viewType, string sortName) { - var idValues = "38_namedview_" + name + user.Id.ToString("N") + (parentId ?? string.Empty) + (viewType ?? string.Empty); + var parentIdString = parentId.Equals(Guid.Empty) ? null : parentId.ToString("N"); + var idValues = "38_namedview_" + name + user.Id.ToString("N") + (parentIdString ?? string.Empty) + (viewType ?? string.Empty); var id = GetNewItemId(idValues, typeof(UserView)); @@ -2224,10 +2214,7 @@ public UserView GetNamedView(User user, UserId = user.Id }; - if (!string.IsNullOrEmpty(parentId)) - { - item.DisplayParentId = new Guid(parentId); - } + item.DisplayParentId = parentId; CreateItem(item, null); @@ -2236,7 +2223,7 @@ public UserView GetNamedView(User user, var refresh = isNew || DateTime.UtcNow - item.DateLastRefreshed >= _viewRefreshInterval; - if (!refresh && item.DisplayParentId != Guid.Empty) + if (!refresh && !item.DisplayParentId.Equals(Guid.Empty)) { var displayParent = GetItemById(item.DisplayParentId); refresh = displayParent != null && displayParent.DateLastSaved > item.DateLastRefreshed; @@ -2300,7 +2287,7 @@ public UserView GetShadowView(BaseItem parent, var refresh = isNew || DateTime.UtcNow - item.DateLastRefreshed >= _viewRefreshInterval; - if (!refresh && item.DisplayParentId != Guid.Empty) + if (!refresh && !item.DisplayParentId.Equals(Guid.Empty)) { var displayParent = GetItemById(item.DisplayParentId); refresh = displayParent != null && displayParent.DateLastSaved > item.DateLastRefreshed; @@ -2320,7 +2307,7 @@ public UserView GetShadowView(BaseItem parent, } public UserView GetNamedView(string name, - string parentId, + Guid parentId, string viewType, string sortName, string uniqueId) @@ -2330,7 +2317,8 @@ public UserView GetNamedView(string name, throw new ArgumentNullException("name"); } - var idValues = "37_namedview_" + name + (parentId ?? string.Empty) + (viewType ?? string.Empty); + var parentIdString = parentId.Equals(Guid.Empty) ? null : parentId.ToString("N"); + var idValues = "37_namedview_" + name + (parentIdString ?? string.Empty) + (viewType ?? string.Empty); if (!string.IsNullOrEmpty(uniqueId)) { idValues += uniqueId; @@ -2358,10 +2346,7 @@ public UserView GetNamedView(string name, ForcedSortName = sortName }; - if (!string.IsNullOrEmpty(parentId)) - { - item.DisplayParentId = new Guid(parentId); - } + item.DisplayParentId = parentId; CreateItem(item, null); diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index f273bb2eae..42f9227107 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -59,7 +59,7 @@ public Folder[] GetUserViews(UserViewQuery query) if (UserView.IsUserSpecific(folder)) { - list.Add(_libraryManager.GetNamedView(user, folder.Name, folder.Id.ToString("N"), folderViewType, null)); + list.Add(_libraryManager.GetNamedView(user, folder.Name, folder.Id, folderViewType, null)); continue; } @@ -150,14 +150,14 @@ public Folder[] GetUserViews(UserViewQuery query) .ToArray(); } - public UserView GetUserSubViewWithName(string name, string parentId, string type, string sortName) + public UserView GetUserSubViewWithName(string name, Guid parentId, string type, string sortName) { var uniqueId = parentId + "subview" + type; return _libraryManager.GetNamedView(name, parentId, type, sortName, uniqueId); } - public UserView GetUserSubView(string parentId, string type, string localizationKey, string sortName) + public UserView GetUserSubView(Guid parentId, string type, string localizationKey, string sortName) { var name = _localizationManager.GetLocalizedString(localizationKey); diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 3943175e13..a8cbc08fd4 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -848,7 +848,6 @@ private void UpdateExistingTimerWithNewMetadata(TimerInfo existingTimer, TimerIn existingTimer.EpisodeNumber = updatedTimer.EpisodeNumber; existingTimer.EpisodeTitle = updatedTimer.EpisodeTitle; existingTimer.Genres = updatedTimer.Genres; - existingTimer.HomePageUrl = updatedTimer.HomePageUrl; existingTimer.IsMovie = updatedTimer.IsMovie; existingTimer.IsSeries = updatedTimer.IsSeries; existingTimer.Tags = updatedTimer.Tags; @@ -1942,7 +1941,6 @@ private async Task SaveRecordingMetadata(TimerInfo timer, string recordingPath, program = new LiveTvProgram { Name = timer.Name, - HomePageUrl = timer.HomePageUrl, Overview = timer.Overview, Genres = timer.Genres, CommunityRating = timer.CommunityRating, @@ -2158,11 +2156,6 @@ private void SaveVideoNfo(TimerInfo timer, string recordingPath, BaseItem item, writer.WriteElementString("genre", genre); } - if (!string.IsNullOrWhiteSpace(item.HomePageUrl)) - { - writer.WriteElementString("website", item.HomePageUrl); - } - var people = item.Id.Equals(Guid.Empty) ? new List() : _libraryManager.GetPeople(item); var directors = people @@ -2273,7 +2266,7 @@ private LiveTvProgram GetProgramInfoFromCache(string programId) { var query = new InternalItemsQuery { - ItemIds = new[] { _liveTvManager.GetInternalProgramId(Name, programId) }, + ItemIds = new[] { _liveTvManager.GetInternalProgramId(programId) }, Limit = 1, DtoOptions = new DtoOptions() }; @@ -2636,7 +2629,6 @@ private void CopyProgramInfoToTimerInfo(LiveTvProgram programInfo, TimerInfo tim timerInfo.IsSeries = programInfo.IsSeries; - timerInfo.HomePageUrl = programInfo.HomePageUrl; timerInfo.CommunityRating = programInfo.CommunityRating; timerInfo.Overview = programInfo.Overview; timerInfo.OfficialRating = programInfo.OfficialRating; diff --git a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs index 8c74dcb0a4..56b3b5e4bd 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs @@ -41,7 +41,7 @@ public TimerInfoDto GetTimerInfoDto(TimerInfo info, ILiveTvService service, Live { var dto = new TimerInfoDto { - Id = GetInternalTimerId(service.Name, info.Id).ToString("N"), + Id = GetInternalTimerId(info.Id), Overview = info.Overview, EndDate = info.EndDate, Name = info.Name, @@ -49,7 +49,7 @@ public TimerInfoDto GetTimerInfoDto(TimerInfo info, ILiveTvService service, Live ExternalId = info.Id, ChannelId = GetInternalChannelId(service.Name, info.ChannelId), Status = info.Status, - SeriesTimerId = string.IsNullOrEmpty(info.SeriesTimerId) ? null : GetInternalSeriesTimerId(service.Name, info.SeriesTimerId).ToString("N"), + SeriesTimerId = string.IsNullOrEmpty(info.SeriesTimerId) ? null : GetInternalSeriesTimerId(info.SeriesTimerId).ToString("N"), PrePaddingSeconds = info.PrePaddingSeconds, PostPaddingSeconds = info.PostPaddingSeconds, IsPostPaddingRequired = info.IsPostPaddingRequired, @@ -66,7 +66,7 @@ public TimerInfoDto GetTimerInfoDto(TimerInfo info, ILiveTvService service, Live if (!string.IsNullOrEmpty(info.ProgramId)) { - dto.ProgramId = GetInternalProgramId(service.Name, info.ProgramId).ToString("N"); + dto.ProgramId = GetInternalProgramId(info.ProgramId).ToString("N"); } if (program != null) @@ -104,7 +104,7 @@ public SeriesTimerInfoDto GetSeriesTimerInfoDto(SeriesTimerInfo info, ILiveTvSer { var dto = new SeriesTimerInfoDto { - Id = GetInternalSeriesTimerId(service.Name, info.Id).ToString("N"), + Id = GetInternalSeriesTimerId(info.Id).ToString("N"), Overview = info.Overview, EndDate = info.EndDate, Name = info.Name, @@ -136,7 +136,7 @@ public SeriesTimerInfoDto GetSeriesTimerInfoDto(SeriesTimerInfo info, ILiveTvSer if (!string.IsNullOrEmpty(info.ProgramId)) { - dto.ProgramId = GetInternalProgramId(service.Name, info.ProgramId).ToString("N"); + dto.ProgramId = GetInternalProgramId(info.ProgramId).ToString("N"); } dto.DayPattern = info.Days == null ? null : GetDayPattern(info.Days.ToArray(info.Days.Count)); @@ -391,23 +391,24 @@ public Guid GetInternalChannelId(string serviceName, string externalId) return _libraryManager.GetNewItemId(name.ToLower(), typeof(LiveTvChannel)); } - public Guid GetInternalTimerId(string serviceName, string externalId) + private const string ServiceName = "Emby"; + public string GetInternalTimerId(string externalId) { - var name = serviceName + externalId + InternalVersionNumber; + var name = ServiceName + externalId + InternalVersionNumber; - return name.ToLower().GetMD5(); + return name.ToLower().GetMD5().ToString("N"); } - public Guid GetInternalSeriesTimerId(string serviceName, string externalId) + public Guid GetInternalSeriesTimerId(string externalId) { - var name = serviceName + externalId + InternalVersionNumber; + var name = ServiceName + externalId + InternalVersionNumber; return name.ToLower().GetMD5(); } - public Guid GetInternalProgramId(string serviceName, string externalId) + public Guid GetInternalProgramId(string externalId) { - var name = serviceName + externalId + InternalVersionNumber; + var name = ServiceName + externalId + InternalVersionNumber; return _libraryManager.GetNewItemId(name.ToLower(), typeof(LiveTvProgram)); } diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index 2fbb7f3478..c0d4c0acf5 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -162,7 +162,7 @@ private void EmbyTv_TimerCreated(object sender, GenericEventArgs e) { Argument = new TimerEventInfo { - ProgramId = _tvDtoService.GetInternalProgramId(service.Name, timer.ProgramId), + ProgramId = _tvDtoService.GetInternalProgramId(timer.ProgramId), Id = timer.Id } }, _logger); @@ -304,9 +304,17 @@ public async Task> GetChannelMediaSources(BaseItem return list; } - private ILiveTvService GetService(BaseItem item) + private ILiveTvService GetService(LiveTvChannel item) { - return GetService(item.ServiceName); + var name = item.ServiceName; + return _services.FirstOrDefault(i => string.Equals(i.Name, name, StringComparison.OrdinalIgnoreCase)); + } + + private ILiveTvService GetService(LiveTvProgram item) + { + var channel = _libraryManager.GetItemById(item.ChannelId) as LiveTvChannel; + + return GetService(channel); } private ILiveTvService GetService(string name) @@ -425,6 +433,7 @@ private void Normalize(MediaSourceInfo mediaSource, ILiveTvService service, bool } } + private const string ExternalServiceTag = "ExternalServiceId"; private LiveTvChannel GetChannel(ChannelInfo channelInfo, string serviceName, BaseItem parentFolder, CancellationToken cancellationToken) { var parentFolderId = parentFolder.Id; @@ -465,6 +474,12 @@ private LiveTvChannel GetChannel(ChannelInfo channelInfo, string serviceName, Ba item.ChannelType = channelInfo.ChannelType; item.ServiceName = serviceName; + if (!string.Equals(item.GetProviderId(ExternalServiceTag), serviceName, StringComparison.OrdinalIgnoreCase)) + { + forceUpdate = true; + } + item.SetProviderId(ExternalServiceTag, serviceName); + if (!string.Equals(channelInfo.Id, item.ExternalId, StringComparison.Ordinal)) { forceUpdate = true; @@ -509,9 +524,11 @@ private LiveTvChannel GetChannel(ChannelInfo channelInfo, string serviceName, Ba return item; } + private const string EtagKey = "ProgramEtag"; + private Tuple GetProgram(ProgramInfo info, Dictionary allExistingPrograms, LiveTvChannel channel, ChannelType channelType, string serviceName, CancellationToken cancellationToken) { - var id = _tvDtoService.GetInternalProgramId(serviceName, info.Id); + var id = _tvDtoService.GetInternalProgramId(info.Id); LiveTvProgram item = null; allExistingPrograms.TryGetValue(id, out item); @@ -527,9 +544,13 @@ private Tuple GetProgram(ProgramInfo info, Dictionary Name = info.Name, Id = id, DateCreated = DateTime.UtcNow, - DateModified = DateTime.UtcNow, - ExternalEtag = info.Etag + DateModified = DateTime.UtcNow }; + + if (!string.IsNullOrEmpty(info.Etag)) + { + item.SetProviderId(EtagKey, info.Etag); + } } if (!string.Equals(info.ShowId, item.ShowId, StringComparison.OrdinalIgnoreCase)) @@ -547,7 +568,6 @@ private Tuple GetProgram(ProgramInfo info, Dictionary item.ParentId = channel.Id; //item.ChannelType = channelType; - item.ServiceName = serviceName; item.Audio = info.Audio; item.ChannelId = channel.Id; @@ -568,6 +588,11 @@ private Tuple GetProgram(ProgramInfo info, Dictionary var isSeries = info.IsSeries || !string.IsNullOrEmpty(info.EpisodeTitle); + if (isSeries || !string.IsNullOrEmpty(info.EpisodeTitle)) + { + item.SeriesName = info.Name; + } + var tags = new List(); if (info.IsLive) { @@ -638,8 +663,6 @@ private Tuple GetProgram(ProgramInfo info, Dictionary } item.EndDate = info.EndDate; - item.HomePageUrl = info.HomePageUrl; - item.ProductionYear = info.ProductionYear; if (!isSeries || info.IsRepeat) @@ -719,12 +742,11 @@ private Tuple GetProgram(ProgramInfo info, Dictionary } else { - // Increment this whenver some internal change deems it necessary - var etag = info.Etag + "6"; + var etag = info.Etag; - if (!string.Equals(etag, item.ExternalEtag, StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(etag, item.GetProviderId(EtagKey), StringComparison.OrdinalIgnoreCase)) { - item.ExternalEtag = etag; + item.SetProviderId(EtagKey, etag); isUpdated = true; } } @@ -743,11 +765,11 @@ public async Task GetProgram(string id, CancellationToken cancellat var dto = _dtoService.GetBaseItemDto(program, new DtoOptions(), user); - var list = new List>(); + var list = new List>(); var externalSeriesId = program.ExternalSeriesId; - list.Add(new Tuple(dto, program.ServiceName, program.ExternalId, externalSeriesId)); + list.Add(new Tuple(dto, program.ExternalId, externalSeriesId)); await AddRecordingInfo(list, cancellationToken).ConfigureAwait(false); @@ -795,7 +817,7 @@ public async Task> GetPrograms(ProgramQuery query, DtoO if (!string.IsNullOrWhiteSpace(query.SeriesTimerId)) { var seriesTimers = await GetSeriesTimersInternal(new SeriesTimerQuery { }, cancellationToken).ConfigureAwait(false); - var seriesTimer = seriesTimers.Items.FirstOrDefault(i => string.Equals(_tvDtoService.GetInternalSeriesTimerId(i.ServiceName, i.Id).ToString("N"), query.SeriesTimerId, StringComparison.OrdinalIgnoreCase)); + var seriesTimer = seriesTimers.Items.FirstOrDefault(i => string.Equals(_tvDtoService.GetInternalSeriesTimerId(i.Id).ToString("N"), query.SeriesTimerId, StringComparison.OrdinalIgnoreCase)); if (seriesTimer != null) { internalQuery.ExternalSeriesId = seriesTimer.SeriesId; @@ -966,36 +988,23 @@ private int GetRecommendationScore(LiveTvProgram program, Guid userId, bool fact return score; } - private async Task AddRecordingInfo(IEnumerable> programs, CancellationToken cancellationToken) + private async Task AddRecordingInfo(IEnumerable> programs, CancellationToken cancellationToken) { var timers = new Dictionary>(); var seriesTimers = new Dictionary>(); + TimerInfo[] timerList = null; + SeriesTimerInfo[] seriesTimerList = null; + foreach (var programTuple in programs) { var program = programTuple.Item1; - var serviceName = programTuple.Item2; - var externalProgramId = programTuple.Item3; - string externalSeriesId = programTuple.Item4; - - if (string.IsNullOrWhiteSpace(serviceName)) - { - continue; - } + var externalProgramId = programTuple.Item2; + string externalSeriesId = programTuple.Item3; - List timerList; - if (!timers.TryGetValue(serviceName, out timerList)) + if (timerList == null) { - try - { - var tempTimers = await GetService(serviceName).GetTimersAsync(cancellationToken).ConfigureAwait(false); - timers[serviceName] = timerList = tempTimers.ToList(); - } - catch (Exception ex) - { - _logger.ErrorException("Error getting timer infos", ex); - timers[serviceName] = timerList = new List(); - } + timerList = (await GetTimersInternal(new TimerQuery(), cancellationToken).ConfigureAwait(false)).Items; } var timer = timerList.FirstOrDefault(i => string.Equals(i.ProgramId, externalProgramId, StringComparison.OrdinalIgnoreCase)); @@ -1005,15 +1014,14 @@ private async Task AddRecordingInfo(IEnumerable seriesTimerList; - if (!seriesTimers.TryGetValue(serviceName, out seriesTimerList)) + if (seriesTimerList == null) { - try - { - var tempTimers = await GetService(serviceName).GetSeriesTimersAsync(cancellationToken).ConfigureAwait(false); - seriesTimers[serviceName] = seriesTimerList = tempTimers.ToList(); - } - catch (Exception ex) - { - _logger.ErrorException("Error getting series timer infos", ex); - seriesTimers[serviceName] = seriesTimerList = new List(); - } + seriesTimerList = (await GetSeriesTimersInternal(new SeriesTimerQuery(), cancellationToken).ConfigureAwait(false)).Items; } var seriesTimer = seriesTimerList.FirstOrDefault(i => string.Equals(i.SeriesId, externalSeriesId, StringComparison.OrdinalIgnoreCase)); if (seriesTimer != null) { - program.SeriesTimerId = _tvDtoService.GetInternalSeriesTimerId(serviceName, seriesTimer.Id) + program.SeriesTimerId = _tvDtoService.GetInternalSeriesTimerId(seriesTimer.Id) .ToString("N"); } } @@ -1524,10 +1522,9 @@ public QueryResult GetRecordingSeries(RecordingQuery query, DtoOpti public Task AddInfoToProgramDto(List> tuples, ItemFields[] fields, User user = null) { - var programTuples = new List>(); + var programTuples = new List>(); var hasChannelImage = fields.Contains(ItemFields.ChannelImage); var hasChannelInfo = fields.Contains(ItemFields.ChannelInfo); - var hasServiceName = fields.Contains(ItemFields.ServiceName); foreach (var tuple in tuples) { @@ -1587,16 +1584,9 @@ public Task AddInfoToProgramDto(List> tuples, ItemF } } - var serviceName = program.ServiceName; - - if (hasServiceName) - { - dto.ServiceName = serviceName; - } - var externalSeriesId = program.ExternalSeriesId; - programTuples.Add(new Tuple(dto, serviceName, program.ExternalId, externalSeriesId)); + programTuples.Add(new Tuple(dto, program.ExternalId, externalSeriesId)); } return AddRecordingInfo(programTuples, CancellationToken.None); @@ -1617,11 +1607,11 @@ public void AddInfoToRecordingDto(BaseItem item, BaseItemDto dto, ActiveRecordin dto.SeriesTimerId = string.IsNullOrEmpty(info.SeriesTimerId) ? null - : _tvDtoService.GetInternalSeriesTimerId(service.Name, info.SeriesTimerId).ToString("N"); + : _tvDtoService.GetInternalSeriesTimerId(info.SeriesTimerId).ToString("N"); dto.TimerId = string.IsNullOrEmpty(info.Id) ? null - : _tvDtoService.GetInternalTimerId(service.Name, info.Id).ToString("N"); + : _tvDtoService.GetInternalTimerId(info.Id); var startDate = info.StartDate; var endDate = info.EndDate; @@ -1683,7 +1673,7 @@ public QueryResult GetRecordings(RecordingQuery query, DtoOptions o }; } - public async Task> GetTimers(TimerQuery query, CancellationToken cancellationToken) + private async Task> GetTimersInternal(TimerQuery query, CancellationToken cancellationToken) { var tasks = _services.Select(async i => { @@ -1736,7 +1726,7 @@ public async Task> GetTimers(TimerQuery query, Cancell var guid = new Guid(query.SeriesTimerId); timers = timers - .Where(i => _tvDtoService.GetInternalSeriesTimerId(i.Item2.Name, i.Item1.SeriesTimerId) == guid); + .Where(i => _tvDtoService.GetInternalSeriesTimerId(i.Item1.SeriesTimerId) == guid); } if (!string.IsNullOrEmpty(query.Id)) @@ -1744,7 +1734,81 @@ public async Task> GetTimers(TimerQuery query, Cancell var guid = new Guid(query.Id); timers = timers - .Where(i => _tvDtoService.GetInternalTimerId(i.Item2.Name, i.Item1.Id) == guid); + .Where(i => string.Equals(_tvDtoService.GetInternalTimerId(i.Item1.Id), query.Id, StringComparison.OrdinalIgnoreCase)); + } + + var returnArray = timers + .Select(i => i.Item1) + .OrderBy(i => i.StartDate) + .ToArray(); + + return new QueryResult + { + Items = returnArray, + TotalRecordCount = returnArray.Length + }; + } + + public async Task> GetTimers(TimerQuery query, CancellationToken cancellationToken) + { + var tasks = _services.Select(async i => + { + try + { + var recs = await i.GetTimersAsync(cancellationToken).ConfigureAwait(false); + return recs.Select(r => new Tuple(r, i)); + } + catch (Exception ex) + { + _logger.ErrorException("Error getting recordings", ex); + return new List>(); + } + }); + var results = await Task.WhenAll(tasks).ConfigureAwait(false); + var timers = results.SelectMany(i => i.ToList()); + + if (query.IsActive.HasValue) + { + if (query.IsActive.Value) + { + timers = timers.Where(i => i.Item1.Status == RecordingStatus.InProgress); + } + else + { + timers = timers.Where(i => i.Item1.Status != RecordingStatus.InProgress); + } + } + + if (query.IsScheduled.HasValue) + { + if (query.IsScheduled.Value) + { + timers = timers.Where(i => i.Item1.Status == RecordingStatus.New); + } + else + { + timers = timers.Where(i => i.Item1.Status != RecordingStatus.New); + } + } + + if (!string.IsNullOrEmpty(query.ChannelId)) + { + var guid = new Guid(query.ChannelId); + timers = timers.Where(i => guid == _tvDtoService.GetInternalChannelId(i.Item2.Name, i.Item1.ChannelId)); + } + + if (!string.IsNullOrEmpty(query.SeriesTimerId)) + { + var guid = new Guid(query.SeriesTimerId); + + timers = timers + .Where(i => _tvDtoService.GetInternalSeriesTimerId(i.Item1.SeriesTimerId) == guid); + } + + if (!string.IsNullOrEmpty(query.Id)) + { + timers = timers + .Where(i => string.Equals(_tvDtoService.GetInternalTimerId(i.Item1.Id), query.Id, StringComparison.OrdinalIgnoreCase)); } var returnList = new List(); @@ -1753,7 +1817,7 @@ public async Task> GetTimers(TimerQuery query, Cancell { var program = string.IsNullOrEmpty(i.Item1.ProgramId) ? null : - _libraryManager.GetItemById(_tvDtoService.GetInternalProgramId(i.Item2.Name, i.Item1.ProgramId)) as LiveTvProgram; + _libraryManager.GetItemById(_tvDtoService.GetInternalProgramId(i.Item1.ProgramId)) as LiveTvProgram; var channel = string.IsNullOrEmpty(i.Item1.ChannelId) ? null : _libraryManager.GetItemById(_tvDtoService.GetInternalChannelId(i.Item2.Name, i.Item1.ChannelId)); @@ -1972,7 +2036,6 @@ public void AddChannelInfo(List> tuples, DtoOp var currentChannelsDict = new Dictionary(); var addCurrentProgram = options.AddCurrentProgram; - var addServiceName = options.Fields.Contains(ItemFields.ServiceName); foreach (var tuple in tuples) { @@ -1983,11 +2046,6 @@ public void AddChannelInfo(List> tuples, DtoOp dto.ChannelNumber = channel.Number; dto.ChannelType = channel.ChannelType; - if (addServiceName) - { - dto.ServiceName = channel.ServiceName; - } - currentChannelsDict[dto.Id] = dto; if (addCurrentProgram) @@ -2018,7 +2076,7 @@ public void AddChannelInfo(List> tuples, DtoOp private async Task> GetNewTimerDefaultsInternal(CancellationToken cancellationToken, LiveTvProgram program = null) { - var service = program != null && !string.IsNullOrWhiteSpace(program.ServiceName) ? + var service = program != null ? GetService(program) : _services.FirstOrDefault(); @@ -2127,7 +2185,7 @@ public async Task CreateTimer(TimerInfoDto timer, CancellationToken cancellation if (supportsNewTimerIds != null) { newTimerId = await supportsNewTimerIds.CreateTimer(info, cancellationToken).ConfigureAwait(false); - newTimerId = _tvDtoService.GetInternalTimerId(timer.ServiceName, newTimerId).ToString("N"); + newTimerId = _tvDtoService.GetInternalTimerId(newTimerId); } else { @@ -2142,7 +2200,7 @@ public async Task CreateTimer(TimerInfoDto timer, CancellationToken cancellation { Argument = new TimerEventInfo { - ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId), + ProgramId = _tvDtoService.GetInternalProgramId(info.ProgramId), Id = newTimerId } }, _logger); @@ -2172,7 +2230,7 @@ public async Task CreateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken if (supportsNewTimerIds != null) { newTimerId = await supportsNewTimerIds.CreateSeriesTimer(info, cancellationToken).ConfigureAwait(false); - newTimerId = _tvDtoService.GetInternalSeriesTimerId(timer.ServiceName, newTimerId).ToString("N"); + newTimerId = _tvDtoService.GetInternalSeriesTimerId(newTimerId).ToString("N"); } else { @@ -2183,7 +2241,7 @@ public async Task CreateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken { Argument = new TimerEventInfo { - ProgramId = _tvDtoService.GetInternalProgramId(timer.ServiceName, info.ProgramId), + ProgramId = _tvDtoService.GetInternalProgramId(info.ProgramId), Id = newTimerId } }, _logger); @@ -2302,15 +2360,6 @@ public Task ResetTuner(string id, CancellationToken cancellationToken) return service.ResetTuner(parts[1], cancellationToken); } - public BaseItemDto GetLiveTvFolder(Guid userId, CancellationToken cancellationToken) - { - var user = userId.Equals(Guid.Empty) ? null : _userManager.GetUserById(userId); - - var folder = GetInternalLiveTvFolder(cancellationToken); - - return _dtoService.GetBaseItemDto(folder, new DtoOptions(), user); - } - private void RemoveFields(DtoOptions options) { var fields = options.Fields.ToList(); @@ -2549,9 +2598,9 @@ public Guid GetInternalChannelId(string serviceName, string externalId) return _tvDtoService.GetInternalChannelId(serviceName, externalId); } - public Guid GetInternalProgramId(string serviceName, string externalId) + public Guid GetInternalProgramId(string externalId) { - return _tvDtoService.GetInternalProgramId(serviceName, externalId); + return _tvDtoService.GetInternalProgramId(externalId); } public List GetRecordingFolders(User user) diff --git a/Emby.Server.Implementations/Notifications/Notifications.cs b/Emby.Server.Implementations/Notifications/Notifications.cs index 5744dfa235..feb9d880f9 100644 --- a/Emby.Server.Implementations/Notifications/Notifications.cs +++ b/Emby.Server.Implementations/Notifications/Notifications.cs @@ -410,7 +410,7 @@ public static string GetItemName(BaseItem item) } } - var hasSeries = item as IHasSeries; + var hasSeries = item as IHasSeriesName; if (hasSeries != null) { diff --git a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs index e99592583f..7a5efded3f 100644 --- a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs @@ -133,7 +133,7 @@ public async Task Execute(CancellationToken cancellationToken, IProgress try { - var chapters = _itemRepo.GetChapters(video.Id); + var chapters = _itemRepo.GetChapters(video); var success = await _encodingManager.RefreshChapterImages(video, directoryService, chapters, extract, true, cancellationToken).ConfigureAwait(false); diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index b665136db9..24bd8f92b1 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1521,11 +1521,7 @@ private void ReportCapabilities(SessionInfo session, { session.Capabilities = capabilities; - if ((session.Client ?? string.Empty).IndexOf("Roku", StringComparison.OrdinalIgnoreCase) != -1) - { - EnsureRokuController(session); - } - else if (!string.IsNullOrEmpty(capabilities.MessageCallbackUrl)) + if (!string.IsNullOrEmpty(capabilities.MessageCallbackUrl)) { EnsureHttpController(session, capabilities.MessageCallbackUrl); } @@ -1566,10 +1562,6 @@ private void EnsureHttpController(SessionInfo session, string messageCallbackUrl session.EnsureController(s => new HttpSessionController(_httpClient, _jsonSerializer, s, messageCallbackUrl, this)); } - private void EnsureRokuController(SessionInfo session) - { - } - private ClientCapabilities GetSavedCapabilities(string deviceId) { return _deviceManager.GetCapabilities(deviceId); @@ -1614,7 +1606,6 @@ private BaseItemDto GetItemInfo(BaseItem item, MediaSourceInfo mediaSource) fields.Remove(ItemFields.DateLastSaved); fields.Remove(ItemFields.DisplayPreferencesId); fields.Remove(ItemFields.Etag); - fields.Remove(ItemFields.ExternalEtag); fields.Remove(ItemFields.InheritedParentalRatingValue); fields.Remove(ItemFields.ItemCounts); fields.Remove(ItemFields.MediaSourceCount); diff --git a/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs b/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs index 3db0d04480..c750332617 100644 --- a/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs @@ -118,9 +118,7 @@ private bool IsUsingCollectionStrip(UserView view) { CollectionType.Movies, CollectionType.TvShows, - CollectionType.Playlists, - CollectionType.Photos, - CollectionType.HomeVideos + CollectionType.Playlists }; return collectionStripViewTypes.Contains(view.ViewType ?? string.Empty); diff --git a/Emby.Server.Implementations/packages.config b/Emby.Server.Implementations/packages.config index 5ff60e31de..22b2f8def7 100644 --- a/Emby.Server.Implementations/packages.config +++ b/Emby.Server.Implementations/packages.config @@ -1,9 +1,9 @@  - + - + diff --git a/MediaBrowser.Api/BrandingService.cs b/MediaBrowser.Api/BrandingService.cs index f89295ac9e..4eb69678a3 100644 --- a/MediaBrowser.Api/BrandingService.cs +++ b/MediaBrowser.Api/BrandingService.cs @@ -34,7 +34,7 @@ public object Get(GetBrandingCss request) var result = _config.GetConfiguration("branding"); // When null this throws a 405 error under Mono OSX, so default to empty string - return ResultFactory.GetResult(result.CustomCss ?? string.Empty, "text/css"); + return ResultFactory.GetResult(Request, result.CustomCss ?? string.Empty, "text/css"); } } } diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs index 295fdb6965..22eb7ea099 100644 --- a/MediaBrowser.Api/ItemUpdateService.cs +++ b/MediaBrowser.Api/ItemUpdateService.cs @@ -255,7 +255,6 @@ private void UpdateItem(BaseItemDto request, BaseItem item) item.CriticRating = request.CriticRating; item.CommunityRating = request.CommunityRating; - item.HomePageUrl = request.HomePageUrl; item.IndexNumber = request.IndexNumber; item.ParentIndexNumber = request.ParentIndexNumber; item.Overview = request.Overview; diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index d10b9205e9..9dc3b9457b 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -39,7 +39,7 @@ public class GetLiveTvInfo : IReturn [Route("/LiveTv/Channels", "GET", Summary = "Gets available live tv channels.")] [Authenticated] - public class GetChannels : IReturn>, IHasDtoOptions + public class GetChannels : IReturn>, IHasDtoOptions { [ApiMember(Name = "Type", Description = "Optional filter by channel type.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] public ChannelType? Type { get; set; } @@ -138,7 +138,7 @@ public GetChannels() [Route("/LiveTv/Channels/{Id}", "GET", Summary = "Gets a live tv channel")] [Authenticated] - public class GetChannel : IReturn + public class GetChannel : IReturn { /// /// Gets or sets the id. @@ -573,14 +573,6 @@ public class GetGuideInfo : IReturn { } - [Route("/LiveTv/Folder", "GET", Summary = "Gets the users live tv folder, along with configured images")] - [Authenticated] - public class GetLiveTvFolder : IReturn - { - [ApiMember(Name = "UserId", Description = "Optional attach user data.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] - public Guid UserId { get; set; } - } - [Route("/LiveTv/TunerHosts", "POST", Summary = "Adds a tuner host")] [Authenticated] public class AddTunerHost : TunerHostInfo, IReturn @@ -846,7 +838,7 @@ public async Task Get(GetSchedulesDirectCountries request) }).ConfigureAwait(false); - return ResultFactory.GetResult(response, "application/json"); + return ResultFactory.GetResult(Request, response, "application/json"); } private void AssertUserCanManageLiveTv() @@ -996,11 +988,6 @@ public object Get(GetChannel request) return ToOptimizedResult(result); } - public object Get(GetLiveTvFolder request) - { - return ToOptimizedResult(_liveTvManager.GetLiveTvFolder(request.UserId, CancellationToken.None)); - } - public async Task Get(GetPrograms request) { var query = new ProgramQuery diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj index 77768cc8e5..d7142ad884 100644 --- a/MediaBrowser.Api/MediaBrowser.Api.csproj +++ b/MediaBrowser.Api/MediaBrowser.Api.csproj @@ -105,13 +105,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/MediaBrowser.Api/SearchService.cs b/MediaBrowser.Api/SearchService.cs index 0473dd9245..2e363136b3 100644 --- a/MediaBrowser.Api/SearchService.cs +++ b/MediaBrowser.Api/SearchService.cs @@ -230,7 +230,7 @@ private SearchHint GetSearchHintResult(SearchHintInfo hintInfo) result.StartDate = program.StartDate; } - var hasSeries = item as IHasSeries; + var hasSeries = item as IHasSeriesName; if (hasSeries != null) { result.Series = hasSeries.SeriesName; diff --git a/MediaBrowser.Api/Subtitles/SubtitleService.cs b/MediaBrowser.Api/Subtitles/SubtitleService.cs index 59e861492d..3bb2f4cd6c 100644 --- a/MediaBrowser.Api/Subtitles/SubtitleService.cs +++ b/MediaBrowser.Api/Subtitles/SubtitleService.cs @@ -187,7 +187,7 @@ public async Task Get(GetSubtitlePlaylist request) builder.AppendLine("#EXT-X-ENDLIST"); - return ResultFactory.GetResult(builder.ToString(), MimeTypes.GetMimeType("playlist.m3u8"), new Dictionary()); + return ResultFactory.GetResult(Request, builder.ToString(), MimeTypes.GetMimeType("playlist.m3u8"), new Dictionary()); } public async Task Get(GetSubtitle request) @@ -220,12 +220,12 @@ public async Task Get(GetSubtitle request) text = text.Replace("WEBVTT", "WEBVTT\nX-TIMESTAMP-MAP=MPEGTS:900000,LOCAL:00:00:00.000"); - return ResultFactory.GetResult(text, MimeTypes.GetMimeType("file." + request.Format)); + return ResultFactory.GetResult(Request, text, MimeTypes.GetMimeType("file." + request.Format)); } } } - return ResultFactory.GetResult(await GetSubtitles(request).ConfigureAwait(false), MimeTypes.GetMimeType("file." + request.Format)); + return ResultFactory.GetResult(Request, await GetSubtitles(request).ConfigureAwait(false), MimeTypes.GetMimeType("file." + request.Format)); } private Task GetSubtitles(GetSubtitle request) @@ -259,7 +259,7 @@ public async Task Get(GetRemoteSubtitles request) { var result = await _subtitleManager.GetRemoteSubtitles(request.Id, CancellationToken.None).ConfigureAwait(false); - return ResultFactory.GetResult(result.Stream, MimeTypes.GetMimeType("file." + result.Format)); + return ResultFactory.GetResult(Request, result.Stream, MimeTypes.GetMimeType("file." + result.Format)); } public void Post(DownloadRemoteSubtitles request) diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs index 8e5a54523a..42a266ee21 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs @@ -73,18 +73,12 @@ protected string GetParentItemViewType(GetItemsByName request) { var parent = GetParentItem(request); - var collectionFolder = parent as ICollectionFolder; + var collectionFolder = parent as IHasCollectionType; if (collectionFolder != null) { return collectionFolder.CollectionType; } - var view = parent as UserView; - if (view != null) - { - return view.ViewType; - } - return null; } diff --git a/MediaBrowser.Api/packages.config b/MediaBrowser.Api/packages.config index b703a4ca6e..6932ba28ad 100644 --- a/MediaBrowser.Api/packages.config +++ b/MediaBrowser.Api/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj index 479f6035c9..1e6b433f2b 100644 --- a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj +++ b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj @@ -57,13 +57,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs index 231a79c2dc..62c3c906cd 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs @@ -253,18 +253,6 @@ protected virtual void FetchDataFromXmlNode(XmlReader reader, MetadataResult break; } - case "Website": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val)) - { - item.HomePageUrl = val; - } - - break; - } - case "LockedFields": { var val = reader.ReadElementContentAsString(); @@ -1289,7 +1277,7 @@ private IEnumerable SplitNames(string value) value = value.Trim().Trim(separator); - return string.IsNullOrWhiteSpace(value) ? new string[] { } : Split(value, separator, StringSplitOptions.RemoveEmptyEntries); + return string.IsNullOrWhiteSpace(value) ? Array.Empty() : Split(value, separator, StringSplitOptions.RemoveEmptyEntries); } /// diff --git a/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs index 8bf09e5463..3225603bf6 100644 --- a/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs @@ -12,14 +12,13 @@ namespace MediaBrowser.LocalMetadata.Parsers { public class GameSystemXmlParser : BaseItemXmlParser { - private readonly Task _cachedTask = Task.FromResult(true); public Task FetchAsync(MetadataResult item, string metadataFile, CancellationToken cancellationToken) { Fetch(item, metadataFile, cancellationToken); cancellationToken.ThrowIfCancellationRequested(); - return _cachedTask; + return Task.CompletedTask; } /// diff --git a/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs index abce0582c6..f9b3343964 100644 --- a/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs @@ -18,14 +18,13 @@ public class GameXmlParser : BaseItemXmlParser { private readonly CultureInfo _usCulture = new CultureInfo("en-US"); - private readonly Task _cachedTask = Task.FromResult(true); public Task FetchAsync(MetadataResult item, string metadataFile, CancellationToken cancellationToken) { Fetch(item, metadataFile, cancellationToken); cancellationToken.ThrowIfCancellationRequested(); - return _cachedTask; + return Task.CompletedTask; } /// diff --git a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs index 2bcc532642..5e2e56450a 100644 --- a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs @@ -295,11 +295,6 @@ public static void AddCommonNodes(BaseItem item, XmlWriter writer, ILibraryManag writer.WriteElementString("ProductionYear", item.ProductionYear.Value.ToString(UsCulture)); } - if (!string.IsNullOrEmpty(item.HomePageUrl)) - { - writer.WriteElementString("Website", item.HomePageUrl); - } - var hasAspectRatio = item as IHasAspectRatio; if (hasAspectRatio != null) { diff --git a/MediaBrowser.LocalMetadata/packages.config b/MediaBrowser.LocalMetadata/packages.config index b703a4ca6e..6932ba28ad 100644 --- a/MediaBrowser.LocalMetadata/packages.config +++ b/MediaBrowser.LocalMetadata/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/MediaBrowser.Providers/Chapters/ChapterManager.cs b/MediaBrowser.Providers/Chapters/ChapterManager.cs index 1bbc6fa4ea..3d0c7c964a 100644 --- a/MediaBrowser.Providers/Chapters/ChapterManager.cs +++ b/MediaBrowser.Providers/Chapters/ChapterManager.cs @@ -33,11 +33,6 @@ public ChapterManager(ILibraryManager libraryManager, ILogger logger, IServerCon _itemRepo = itemRepo; } - public List GetChapters(string itemId) - { - return _itemRepo.GetChapters(new Guid(itemId)); - } - public void SaveChapters(string itemId, List chapters) { _itemRepo.SaveChapters(new Guid(itemId), chapters); diff --git a/MediaBrowser.Providers/LiveTv/ProgramMetadataService.cs b/MediaBrowser.Providers/LiveTv/ProgramMetadataService.cs index 981ec23830..dfb0c58ad0 100644 --- a/MediaBrowser.Providers/LiveTv/ProgramMetadataService.cs +++ b/MediaBrowser.Providers/LiveTv/ProgramMetadataService.cs @@ -5,24 +5,10 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; using MediaBrowser.Providers.Manager; -using System.Collections.Generic; - -using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; namespace MediaBrowser.Providers.LiveTv { - public class ProgramMetadataService : MetadataService - { - protected override void MergeData(MetadataResult source, MetadataResult target, MetadataFields[] lockedFields, bool replaceData, bool mergeMetadataSettings) - { - ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings); - } - - public ProgramMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IFileSystem fileSystem, IUserDataManager userDataManager, ILibraryManager libraryManager) : base(serverConfigurationManager, logger, providerManager, fileSystem, userDataManager, libraryManager) - { - } - } public class LiveTvMetadataService : MetadataService { protected override void MergeData(MetadataResult source, MetadataResult target, MetadataFields[] lockedFields, bool replaceData, bool mergeMetadataSettings) diff --git a/MediaBrowser.Providers/Manager/ProviderUtils.cs b/MediaBrowser.Providers/Manager/ProviderUtils.cs index 90c2a4f075..30ecf5e9b8 100644 --- a/MediaBrowser.Providers/Manager/ProviderUtils.cs +++ b/MediaBrowser.Providers/Manager/ProviderUtils.cs @@ -69,15 +69,6 @@ public static void MergeBaseItemData(MetadataResult sourceResult, } } - if (replaceData || string.IsNullOrEmpty(target.HomePageUrl)) - { - target.HomePageUrl = source.HomePageUrl; - if (!string.IsNullOrWhiteSpace(target.HomePageUrl) && target.HomePageUrl.IndexOf("http", StringComparison.OrdinalIgnoreCase) != 0) - { - target.HomePageUrl = "http://" + target.HomePageUrl; - } - } - if (replaceData || !target.IndexNumber.HasValue) { target.IndexNumber = source.IndexNumber; diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj index f5c691ddc6..f88caf80d1 100644 --- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj +++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj @@ -140,13 +140,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll diff --git a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs index 7a4069a167..efd9cd2dad 100644 --- a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs +++ b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs @@ -133,7 +133,7 @@ private void ProcessMainInfo(MetadataResult resultItem, TmdbSettingsResult se movie.Overview = string.IsNullOrWhiteSpace(movieData.overview) ? null : WebUtility.HtmlDecode(movieData.overview); movie.Overview = movie.Overview != null ? movie.Overview.Replace("\n\n", "\n") : null; - movie.HomePageUrl = movieData.homepage; + //movie.HomePageUrl = movieData.homepage; if (!string.IsNullOrEmpty(movieData.tagline)) { diff --git a/MediaBrowser.Providers/Music/AudioDbArtistProvider.cs b/MediaBrowser.Providers/Music/AudioDbArtistProvider.cs index ad504c808b..67dcd7c09c 100644 --- a/MediaBrowser.Providers/Music/AudioDbArtistProvider.cs +++ b/MediaBrowser.Providers/Music/AudioDbArtistProvider.cs @@ -71,7 +71,7 @@ public async Task> GetMetadata(ArtistInfo info, Canc private void ProcessResult(MusicArtist item, Artist result, string preferredLanguage) { - item.HomePageUrl = result.strWebsite; + //item.HomePageUrl = result.strWebsite; if (!string.IsNullOrEmpty(result.strGenre)) { diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs index 4a5ee810c1..358fccbff8 100644 --- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs @@ -90,10 +90,10 @@ public async Task Fetch(MetadataResult itemResult, string imdbId, string l item.CommunityRating = imdbRating; } - if (!string.IsNullOrEmpty(result.Website)) - { - item.HomePageUrl = result.Website; - } + //if (!string.IsNullOrEmpty(result.Website)) + //{ + // item.HomePageUrl = result.Website; + //} if (!string.IsNullOrWhiteSpace(result.imdbID)) { @@ -197,10 +197,10 @@ public async Task FetchEpisodeData(MetadataResult itemResult, int ep item.CommunityRating = imdbRating; } - if (!string.IsNullOrEmpty(result.Website)) - { - item.HomePageUrl = result.Website; - } + //if (!string.IsNullOrEmpty(result.Website)) + //{ + // item.HomePageUrl = result.Website; + //} if (!string.IsNullOrWhiteSpace(result.imdbID)) { diff --git a/MediaBrowser.Providers/People/MovieDbPersonProvider.cs b/MediaBrowser.Providers/People/MovieDbPersonProvider.cs index 848ac594d3..ed9f7eeab5 100644 --- a/MediaBrowser.Providers/People/MovieDbPersonProvider.cs +++ b/MediaBrowser.Providers/People/MovieDbPersonProvider.cs @@ -164,7 +164,7 @@ public async Task> GetMetadata(PersonLookupInfo id, Cance // TODO: This should go in PersonMetadataService, not each person provider item.Name = id.Name; - item.HomePageUrl = info.homepage; + //item.HomePageUrl = info.homepage; if (!string.IsNullOrWhiteSpace(info.place_of_birth)) { diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs index de897762b4..b1b324fcf2 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs @@ -240,7 +240,7 @@ private void ProcessMainInfo(Series series, RootObject seriesInfo, string prefer series.Genres = seriesInfo.genres.Select(i => i.name).ToArray(); } - series.HomePageUrl = seriesInfo.homepage; + //series.HomePageUrl = seriesInfo.homepage; series.RunTimeTicks = seriesInfo.episode_run_time.Select(i => TimeSpan.FromMinutes(i).Ticks).FirstOrDefault(); diff --git a/MediaBrowser.Providers/packages.config b/MediaBrowser.Providers/packages.config index 582093183a..7e46c30f1f 100644 --- a/MediaBrowser.Providers/packages.config +++ b/MediaBrowser.Providers/packages.config @@ -1,7 +1,7 @@  - - + + diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj index 9b24b2ce90..8ab37703e1 100644 --- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj +++ b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj @@ -51,13 +51,13 @@ ..\packages\Emby.XmlTv.1.0.14\lib\portable-net45+netstandard2.0+win8\Emby.XmlTv.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll diff --git a/MediaBrowser.Server.Mono/packages.config b/MediaBrowser.Server.Mono/packages.config index e593753cf8..3c5fdedfb1 100644 --- a/MediaBrowser.Server.Mono/packages.config +++ b/MediaBrowser.Server.Mono/packages.config @@ -1,8 +1,8 @@  - - + + diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index 499df40b65..3bfc4a3650 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -77,13 +77,13 @@ ..\packages\Emby.XmlTv.1.0.14\lib\portable-net45+netstandard2.0+win8\Emby.XmlTv.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index f8f1c5f808..9455d6e5fc 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -1,8 +1,8 @@  - - + + diff --git a/MediaBrowser.Tests/MediaBrowser.Tests.csproj b/MediaBrowser.Tests/MediaBrowser.Tests.csproj index 8a9d99bfb2..85ebb64b44 100644 --- a/MediaBrowser.Tests/MediaBrowser.Tests.csproj +++ b/MediaBrowser.Tests/MediaBrowser.Tests.csproj @@ -41,13 +41,13 @@ ..\ThirdParty\emby\Emby.Server.MediaEncoding.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/MediaBrowser.Tests/packages.config b/MediaBrowser.Tests/packages.config index b703a4ca6e..6932ba28ad 100644 --- a/MediaBrowser.Tests/packages.config +++ b/MediaBrowser.Tests/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 2f68b3ea96..0bcc1fd508 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -330,7 +330,7 @@ public async Task Get(GetDashboardResource request) !contentType.StartsWith("font/", StringComparison.OrdinalIgnoreCase)) { var stream = await GetResourceStream(basePath, path, localizationCulture).ConfigureAwait(false); - return _resultFactory.GetResult(stream, contentType); + return _resultFactory.GetResult(Request, stream, contentType); } TimeSpan? cacheDuration = null; diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 6f2c693e1a..86cb00f9ea 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -46,13 +46,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css index 85852d8df1..826bacb9d1 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css @@ -1 +1 @@ -.card,.card:focus{font-weight:inherit!important}.card,.cardBox,.cardContent,.textActionButton{-webkit-tap-highlight-color:transparent;outline:0!important}button::-moz-focus-inner{padding:0;border:0}button{-webkit-border-fit:border!important}.card{border:0;font-size:inherit!important;font-family:inherit!important;text-transform:none;background:0 0!important;margin:0;padding:0;display:block;color:inherit!important;cursor:pointer;contain:layout style;-webkit-flex-shrink:0;flex-shrink:0}.cardContent-button,.textActionButton{cursor:pointer;vertical-align:middle;font-family:inherit}.card-nofocustransform{contain:layout style paint}.itemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.vertical-list,.vertical-wrap{display:-webkit-box;display:-webkit-flex;-webkit-box-direction:normal}.vertical-list{display:flex;-webkit-box-orient:vertical;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.vertical-wrap{display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}.vertical-wrap.centered{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.cardScalable{position:relative;contain:layout style}.cardPadder-backdrop,.cardPadder-mixedBackdrop,.cardPadder-overflowBackdrop,.cardPadder-overflowSmallBackdrop,.cardPadder-smallBackdrop{padding-bottom:56.25%;contain:strict}.cardPadder-mixedSquare,.cardPadder-overflowSquare,.cardPadder-square,.overflowSquareCard-textCardPadder{padding-bottom:100%;contain:strict}.cardPadder-mixedPortrait,.cardPadder-overflowPortrait,.cardPadder-portrait,.overflowPortraitCard-textCardPadder{padding-bottom:150%;contain:strict}.cardPadder-banner{padding-bottom:18.5%;contain:strict}.cardBox{padding:0!important;margin:.64em;-webkit-transition:none;-o-transition:none;transition:none;border:0 solid transparent;contain:layout style}@media (max-width:50em){.cardBox{margin:.4em}}.card-focuscontent{border:.12em solid transparent;-webkit-border-radius:.12em;border-radius:.12em}.card-focuscontent-large{border-width:.24em}.cardBox-focustransform{will-change:transform;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.card:focus>.cardBox-focustransform{-webkit-transform:scale(1.16,1.16);transform:scale(1.16,1.16)}.cardBox-bottompadded{margin-bottom:1.8em!important}@media (max-width:50em){.cardBox-bottompadded{margin-bottom:1.2em!important}}.card:focus{position:relative!important;z-index:10!important}.btnCardOptions{position:absolute;bottom:.25em;right:0;margin:0!important;z-index:1}.mediaSourceIndicator{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;top:.3em;left:.3em;text-align:center;vertical-align:middle;width:1.6em;height:1.6em;-webkit-border-radius:50%;border-radius:50%;color:#fff;background:#38c}.cardText,.innerCardFooter{overflow:hidden;text-align:left}.cardImageContainer{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;-webkit-background-clip:content-box!important;background-clip:content-box!important;color:inherit;height:100%;contain:strict}.cardContent,.cardImage{position:absolute;right:0;top:0;left:0;bottom:0}.chapterCardImageContainer{background-color:#000;-webkit-border-radius:0;border-radius:0}.textCardImageContainer{background-color:#333}.cardContent{overflow:hidden;display:block;margin:0!important;height:100%;contain:strict}.cardImageContainer,.cardIndicators{display:-webkit-box;display:-webkit-flex}.cardContent-button{border:0!important;padding:0!important;color:inherit;width:100%;font-size:inherit}.cardContent-button:not(.defaultCardBackground){background-color:transparent}.visualCardBox .cardContent{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.cardContent-shadow{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.cardImageContainer{display:flex}.cardImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center bottom}.cardImage-img{max-height:100%;max-width:100%;min-height:70%;min-width:70%;margin:auto}.coveredImage-img{width:100%;height:100%}.coveredImage-noscale-img{max-height:none;max-width:none}.coveredImage{-webkit-background-size:100% 100%;background-size:100% 100%;background-position:center center}.coveredImage-noScale{-webkit-background-size:cover;background-size:cover}.cardFooter{padding:.3em .3em .5em;position:relative}.visualCardBox{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);-webkit-border-radius:.145em;border-radius:.145em}.innerCardFooter{background:rgba(0,0,0,.7);position:absolute;bottom:0;left:0;z-index:1;max-width:100%;color:#fff}.innerCardFooterClear{background-color:transparent}.fullInnerCardFooter{right:0}.cardText{padding:.06em .5em;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.cardDefaultText,.cardTextCentered{text-align:center}.cardText-secondary{font-size:84%}.cardText-first{padding-top:.24em}.innerCardFooter>.cardText{padding:.3em .5em}.cardFooter-withlogo{padding-left:4em;position:relative}.cardFooterLogo{position:absolute;top:0;bottom:0;left:0;width:4.5em;-webkit-background-size:70% auto;background-size:70% auto;background-repeat:no-repeat;background-position:center center}.cardText-rightmargin{margin-right:2em}.cardDefaultText{white-space:normal}.textActionButton{background:0 0;border:0!important;padding:0!important;color:inherit;font-size:inherit}.textActionButton:hover{text-decoration:underline}.cardImageIcon{width:1em;height:1em;font-size:5em;color:inherit}.cardImageIcon-small{font-size:3em;margin-bottom:.1em}.cardIndicators{right:.225em;top:.225em;position:absolute;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;contain:layout style}.cardProgramAttributeIndicators{top:0;left:0;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;text-transform:uppercase;font-size:92%}.programAttributeIndicator{padding:.18em .5em;color:#fff;font-weight:500}.cardOverlayButton{color:rgba(255,255,255,.76)!important;margin:0;z-index:1;padding:.75em;font-size:88%}.cardOverlayButton-hover{background:0 0;padding:.5em;color:#fff!important}.cardOverlayButton-br{position:absolute;bottom:0;right:0}.cardOverlayButtonIcon{background-color:rgba(0,0,0,.7)!important;-webkit-border-radius:100em;border-radius:100em;width:1.5em!important;height:1.5em!important;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;font-size:1.66956521739130434em!important}.cardOverlayButton-centered{bottom:initial;right:initial;position:static;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;font-size:112%;margin:-1.3em 0 0 -1.3em;width:2.6em;height:2.6em;top:50%;left:50%;background-color:rgba(0,0,0,.5)!important;border:.06em solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76);-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.cardOverlayButton-centered:hover{-webkit-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}.backdropCard,.bannerCard{width:100%}.smallBackdropCard,.squareCard{width:50%}.portraitCard{width:33.333333333333333333333333333333%}.mixedPortraitCard{width:12em}.mixedSquareCard{width:18em}.mixedBackdropCard{width:32em}@media (min-width:25em){.backdropCard{width:50%}}@media (min-width:31.25em){.portraitCard,.smallBackdropCard,.squareCard{width:33.333333333333333333333333333333%}}@media (min-width:43.75em){.portraitCard,.squareCard{width:25%}}@media (min-width:48.125em){.backdropCard{width:33.333333333333333333333333333333%}}@media (min-width:50em){.bannerCard{width:50%}.portraitCard,.squareCard{width:20%}.smallBackdropCard{width:25%}}@media (min-width:62.5em){.smallBackdropCard{width:20%}}@media (min-width:75em){.backdropCard{width:25%}.portraitCard,.squareCard{width:16.666666666666666666666666666667%}.bannerCard{width:33.333333333333333333333333333333%}.smallBackdropCard{width:16.666666666666666666666666666667%}}@media (min-width:87.5em){.portraitCard,.smallBackdropCard,.squareCard{width:14.285714285714285714285714285714%}}@media (min-width:100em){.smallBackdropCard{width:12.5%}.backdropCard{width:20%}.portraitCard,.squareCard{width:12.5%}}@media (min-width:120em){.portraitCard,.squareCard{width:11.111111111111111111111111111111%}}@media (min-width:131.25em){.bannerCard{width:25%}.portraitCard,.squareCard{width:10%}}@media (min-width:156.25em){.backdropCard{width:16.666666666666666666666666666667%}}.itemsContainer-tv>.backdropCard{width:25%}.itemsContainer-tv>.portraitCard,.itemsContainer-tv>.squareCard{width:16.666666666666666666666666666667%}@media (orientation:portrait){.overflowPortraitCard{width:42vw}.overflowBackdropCard,.overflowSmallBackdropCard{width:72vw}.overflowSquareCard{width:42vw}}@media (orientation:landscape){.overflowBackdropCard,.overflowSmallBackdropCard{width:23.3vw}.overflowPortraitCard,.overflowSquareCard{width:15.5vw}}@media (orientation:portrait) and (min-width:33.75em){.overflowSmallBackdropCard{width:30vw}}@media (orientation:landscape) and (min-width:50em){.overflowSmallBackdropCard{width:15.5vw}}@media (orientation:landscape) and (min-width:106.25em){.overflowBackdropCard{width:18.5vw}.overflowPortraitCard,.overflowSquareCard{width:11.6vw}}@media (orientation:portrait) and (min-width:25em){.overflowPortraitCard{width:31.5vw}}@media (orientation:portrait) and (min-width:33.75em){.overflowBackdropCard{width:64vw}.overflowSquareCard{width:31.5vw}}@media (orientation:portrait) and (min-width:40em){.overflowBackdropCard{width:56vw}}@media (orientation:portrait) and (min-width:47.5em){.overflowPortraitCard{width:23vw}.overflowBackdropCard{width:40vw}.overflowSquareCard{width:23vw}}@media (orientation:portrait) and (min-width:75em){.overflowPortraitCard,.overflowSquareCard{width:18vw}}@media (orientation:portrait) and (min-width:87.5em){.overflowPortraitCard,.overflowSquareCard{width:15vw}.overflowBackdropCard{width:30vw}}@media (orientation:portrait) and (min-width:112.5em){.overflowBackdropCard{width:23.5vw}}.itemsContainer-tv>.overflowBackdropCard{width:23.3vw}.overflowBackdropCard-textCard{width:15.5vw!important}.overflowBackdropCard-textCardPadder{padding-bottom:87.75%}.itemsContainer-tv>.overflowPortraitCard,.itemsContainer-tv>.overflowSquareCard{width:15.5vw}.itemsContainer-tv>.overflowSmallBackdropCard{width:18.9vw}.card-hoverable .cardContent{-webkit-transition-property:-webkit-filter,filter;-o-transition-property:filter;transition-property:filter;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:cubic-bezier(.3,0,0,1);-o-transition-timing-function:cubic-bezier(.3,0,0,1);transition-timing-function:cubic-bezier(.3,0,0,1)}.cardHoverItem{opacity:0;-webkit-transition:opacity .3s ease-in-out,-webkit-transform 10ms ease-in;-o-transition:opacity .3s ease-in-out,transform 10ms ease-in;transition:opacity .3s ease-in-out,transform 10ms ease-in;-webkit-transform:scale(0);transform:scale(0)}.card-hoverable:hover .cardHoverItem{opacity:1;-webkit-transition-delay:.6s;-o-transition-delay:.6s;transition-delay:.6s;-webkit-transform:scale(1);transform:scale(1)}.cardOverlayFab-primary{font-size:140%;padding:0;width:3em;height:3em;margin-top:-1.5em;margin-left:-1.5em;position:absolute;top:50%;left:50%}.cardOverlayFab-primary i{border:.08em solid rgba(255,255,255,.9);color:#fff} \ No newline at end of file +.card,.card:focus{font-weight:inherit!important}.card,.cardBox,.cardContent,.textActionButton{-webkit-tap-highlight-color:transparent;outline:0!important}button::-moz-focus-inner{padding:0;border:0}button{-webkit-border-fit:border!important}.card{border:0;font-size:inherit!important;font-family:inherit!important;text-transform:none;background:0 0!important;margin:0;padding:0;display:block;color:inherit!important;cursor:pointer;contain:layout style;-webkit-flex-shrink:0;flex-shrink:0}.cardContent-button,.textActionButton{cursor:pointer;vertical-align:middle;font-family:inherit}.card-nofocustransform{contain:layout style paint}.itemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.vertical-list,.vertical-wrap{display:-webkit-box;display:-webkit-flex;-webkit-box-direction:normal}.vertical-list{display:flex;-webkit-box-orient:vertical;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.vertical-wrap{display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}.cardImageContainer,.mediaSourceIndicator{display:-webkit-box;-webkit-box-align:center}.vertical-wrap.centered{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.cardScalable{position:relative;contain:layout style}.cardPadder-backdrop,.cardPadder-mixedBackdrop,.cardPadder-overflowBackdrop,.cardPadder-overflowSmallBackdrop,.cardPadder-smallBackdrop{padding-bottom:56.25%;contain:strict}.cardPadder-mixedSquare,.cardPadder-overflowSquare,.cardPadder-square,.overflowSquareCard-textCardPadder{padding-bottom:100%;contain:strict}.cardPadder-mixedPortrait,.cardPadder-overflowPortrait,.cardPadder-portrait,.overflowPortraitCard-textCardPadder{padding-bottom:150%;contain:strict}.cardPadder-banner{padding-bottom:18.5%;contain:strict}.cardBox{padding:0!important;margin:.8em;-webkit-transition:none;-o-transition:none;transition:none;border:0 solid transparent;contain:layout style}@media (max-width:50em){.cardBox{margin:.4em}}.card-focuscontent{border:.12em solid transparent;-webkit-border-radius:.12em;border-radius:.12em}.card-focuscontent-large{border-width:.24em}.cardBox-focustransform{will-change:transform;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.card:focus>.cardBox-focustransform{-webkit-transform:scale(1.16,1.16);transform:scale(1.16,1.16)}.cardBox-bottompadded{margin-bottom:1.8em!important}@media (max-width:50em){.cardBox-bottompadded{margin-bottom:1.2em!important}}.card:focus{position:relative!important;z-index:10!important}.btnCardOptions{position:absolute;bottom:.25em;right:0;margin:0!important;z-index:1}.mediaSourceIndicator{display:-webkit-flex;display:flex;position:absolute;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;top:.3em;left:.3em;text-align:center;vertical-align:middle;width:1.6em;height:1.6em;-webkit-border-radius:50%;border-radius:50%;color:#fff;background:#38c}.cardText,.innerCardFooter{overflow:hidden;text-align:left}.cardImageContainer{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;-webkit-background-clip:content-box!important;background-clip:content-box!important;color:inherit;height:100%;contain:strict}.cardContent,.cardImage{position:absolute;right:0;top:0;left:0;bottom:0}.chapterCardImageContainer{background-color:#000;-webkit-border-radius:0;border-radius:0}.textCardImageContainer{background-color:#333}.cardContent{overflow:hidden;display:block;margin:0!important;height:100%;contain:strict}.cardContent-button{border:0!important;padding:0!important;color:inherit;width:100%;font-size:inherit}.cardContent-button:not(.defaultCardBackground){background-color:transparent}.visualCardBox .cardContent{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.cardContent-shadow{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.cardImageContainer{display:-webkit-box;display:-webkit-flex;display:flex}.cardImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center bottom}.cardImage-img{max-height:100%;max-width:100%;min-height:70%;min-width:70%;margin:auto}.coveredImage-img{width:100%;height:100%}.coveredImage-noscale-img{max-height:none;max-width:none}.coveredImage{-webkit-background-size:100% 100%;background-size:100% 100%;background-position:center center}.coveredImage-noScale{-webkit-background-size:cover;background-size:cover}.cardFooter{padding:.3em .3em .5em;position:relative}.visualCardBox{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);-webkit-border-radius:.145em;border-radius:.145em}.innerCardFooter{background:rgba(0,0,0,.7);position:absolute;bottom:0;left:0;z-index:1;max-width:100%;color:#fff}.innerCardFooterClear{background-color:transparent}.fullInnerCardFooter{right:0}.cardText{padding:.06em .5em;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.cardDefaultText,.cardTextCentered{text-align:center}.cardText-secondary{font-size:84%}.cardText-first{padding-top:.24em}.innerCardFooter>.cardText{padding:.3em .5em}.cardFooter-withlogo{padding-left:4em;position:relative}.cardFooterLogo{position:absolute;top:0;bottom:0;left:0;width:4.5em;-webkit-background-size:70% auto;background-size:70% auto;background-repeat:no-repeat;background-position:center center}.cardText-rightmargin{margin-right:2em}.cardDefaultText{white-space:normal}.textActionButton{background:0 0;border:0!important;padding:0!important;color:inherit;font-size:inherit}.textActionButton:hover{text-decoration:underline}.cardImageIcon{width:1em;height:1em;font-size:5em;color:inherit}.cardImageIcon-small{font-size:3em;margin-bottom:.1em}.cardIndicators{right:.225em;top:.225em;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;contain:layout style}.cardProgramAttributeIndicators{top:0;left:0;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;text-transform:uppercase;font-size:92%}.programAttributeIndicator{padding:.18em .5em;color:#fff;font-weight:500}.cardOverlayButton{color:rgba(255,255,255,.76)!important;margin:0;z-index:1;padding:.75em;font-size:88%}.cardOverlayButton-br{position:absolute;bottom:0;right:0}.cardOverlayButtonIcon{background-color:rgba(0,0,0,.7)!important;-webkit-border-radius:100em;border-radius:100em;width:1.5em!important;height:1.5em!important;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;font-size:1.66956521739130434em!important}.cardOverlayButton-centered{bottom:initial;right:initial;position:static;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;font-size:112%;margin:-1.3em 0 0 -1.3em;width:2.6em;height:2.6em;top:50%;left:50%;background-color:rgba(0,0,0,.5)!important;border:.06em solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76);-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.cardOverlayButton-centered:hover{-webkit-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}.backdropCard,.bannerCard{width:100%}.smallBackdropCard,.squareCard{width:50%}.portraitCard{width:33.333333333333333333333333333333%}.mixedPortraitCard{width:12em}.mixedSquareCard{width:18em}.mixedBackdropCard{width:32em}@media (min-width:25em){.backdropCard{width:50%}}@media (min-width:31.25em){.portraitCard,.smallBackdropCard,.squareCard{width:33.333333333333333333333333333333%}}@media (min-width:43.75em){.portraitCard,.squareCard{width:25%}}@media (min-width:48.125em){.backdropCard{width:33.333333333333333333333333333333%}}@media (min-width:50em){.bannerCard{width:50%}.portraitCard,.squareCard{width:20%}.smallBackdropCard{width:25%}}@media (min-width:62.5em){.smallBackdropCard{width:20%}}@media (min-width:75em){.backdropCard{width:25%}.portraitCard,.squareCard{width:16.666666666666666666666666666667%}.bannerCard{width:33.333333333333333333333333333333%}.smallBackdropCard{width:16.666666666666666666666666666667%}}@media (min-width:87.5em){.portraitCard,.smallBackdropCard,.squareCard{width:14.285714285714285714285714285714%}}@media (min-width:100em){.smallBackdropCard{width:12.5%}.backdropCard{width:20%}.portraitCard,.squareCard{width:12.5%}}@media (min-width:120em){.portraitCard,.squareCard{width:11.111111111111111111111111111111%}}@media (min-width:131.25em){.bannerCard{width:25%}.portraitCard,.squareCard{width:10%}}@media (min-width:156.25em){.backdropCard{width:16.666666666666666666666666666667%}}.itemsContainer-tv>.backdropCard{width:25%}.itemsContainer-tv>.portraitCard,.itemsContainer-tv>.squareCard{width:16.666666666666666666666666666667%}@media (orientation:portrait){.overflowPortraitCard{width:42vw}.overflowBackdropCard,.overflowSmallBackdropCard{width:72vw}.overflowSquareCard{width:42vw}}@media (orientation:landscape){.overflowBackdropCard,.overflowSmallBackdropCard{width:23.3vw}.overflowPortraitCard,.overflowSquareCard{width:15.5vw}}@media (orientation:portrait) and (min-width:33.75em){.overflowSmallBackdropCard{width:30vw}}@media (orientation:landscape) and (min-width:50em){.overflowSmallBackdropCard{width:15.5vw}}@media (orientation:landscape) and (min-width:106.25em){.overflowBackdropCard{width:18.5vw}.overflowPortraitCard,.overflowSquareCard{width:11.6vw}}@media (orientation:portrait) and (min-width:25em){.overflowPortraitCard{width:31.5vw}}@media (orientation:portrait) and (min-width:33.75em){.overflowBackdropCard{width:64vw}.overflowSquareCard{width:31.5vw}}@media (orientation:portrait) and (min-width:40em){.overflowBackdropCard{width:56vw}}@media (orientation:portrait) and (min-width:47.5em){.overflowPortraitCard{width:23vw}.overflowBackdropCard{width:40vw}.overflowSquareCard{width:23vw}}@media (orientation:portrait) and (min-width:75em){.overflowPortraitCard,.overflowSquareCard{width:18vw}}@media (orientation:portrait) and (min-width:87.5em){.overflowPortraitCard,.overflowSquareCard{width:15vw}.overflowBackdropCard{width:30vw}}@media (orientation:portrait) and (min-width:112.5em){.overflowBackdropCard{width:23.5vw}}.itemsContainer-tv>.overflowBackdropCard{width:23.3vw}.overflowBackdropCard-textCard{width:15.5vw!important}.overflowBackdropCard-textCardPadder{padding-bottom:87.75%}.itemsContainer-tv>.overflowPortraitCard,.itemsContainer-tv>.overflowSquareCard{width:15.5vw}.itemsContainer-tv>.overflowSmallBackdropCard{width:18.9vw}.cardOverlayContainer{background:-webkit-radial-gradient(50% 50%,farthest-corner,rgba(30,30,30,.5) 50%,#2c2c2c 100%);background:-o-radial-gradient(50% 50%,farthest-corner,rgba(30,30,30,.5) 50%,#2c2c2c 100%);background:radial-gradient(farthest-corner at 50% 50%,rgba(30,30,30,.5) 50%,#2c2c2c 100%);opacity:0;-webkit-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s;position:absolute;top:0;left:0;bottom:0;right:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.card-hoverable :hover .cardOverlayContainer{opacity:1}.cardOverlayButton-hover{opacity:0;-webkit-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s;background:0 0;color:#fff!important;padding:.5em}.cardOverlayButtonIcon-hover{background:0 0!important}.card-hoverable:hover .cardOverlayButton-hover{opacity:1}.cardOverlayFab-primary{font-size:130%;padding:0;width:3em;height:3em;margin-top:-1.5em;margin-left:-1.5em;position:absolute;top:50%;left:50%}.cardOverlayFab-primary i{border:.07em solid rgba(255,255,255,.9);color:#fff} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js index 0d4fa521c4..99e9b88df1 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js @@ -1,2 +1,2 @@ -define(["datetime","imageLoader","connectionManager","itemHelper","focusManager","indicators","globalize","layoutManager","apphost","dom","browser","playbackManager","itemShortcuts","css!./card","paper-icon-button-light","programStyles"],function(datetime,imageLoader,connectionManager,itemHelper,focusManager,indicators,globalize,layoutManager,appHost,dom,browser,playbackManager,itemShortcuts){"use strict";function getCardsHtml(items,options){return 1===arguments.length&&(options=arguments[0],items=options.items),buildCardsHtmlInternal(items,options)}function getPostersPerRow(shape,screenWidth,isOrientationLandscape){switch(shape){case"portrait":return layoutManager.tv?5.9999999988:screenWidth>=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:3.0000000003;case"square":return layoutManager.tv?5.9999999988:screenWidth>=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:screenWidth>=500?3.0000000003:2;case"banner":return screenWidth>=2200?4:screenWidth>=1200?3.0000000003:screenWidth>=800?2:1;case"backdrop":return layoutManager.tv?4:screenWidth>=2500?6:screenWidth>=1600?5:screenWidth>=1200?4:screenWidth>=770?3:screenWidth>=420?2:1;case"smallBackdrop":return screenWidth>=1600?8:screenWidth>=1400?7.000000000007001:screenWidth>=1200?6:screenWidth>=1e3?5:screenWidth>=800?4:screenWidth>=500?3.0000000003:2;case"overflowSmallBackdrop":return layoutManager.tv?100/18.9:isOrientationLandscape?screenWidth>=800?100/15.5:100/23.3:screenWidth>=540?100/30:100/72;case"overflowPortrait":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=400?100/31.5:100/42;case"overflowSquare":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=540?100/31.5:100/42;case"overflowBackdrop":return layoutManager.tv?100/23.3:isOrientationLandscape?screenWidth>=1700?100/18.5:100/23.3:screenWidth>=1800?100/23.5:screenWidth>=1400?100/30:screenWidth>=760?2.5:screenWidth>=640?100/56:100/72;default:return 4}}function isResizable(windowWidth){var screen=window.screen;if(screen){if(screen.availWidth-windowWidth>20)return!0}return!1}function getImageWidth(shape,screenWidth,isOrientationLandscape){var imagesPerRow=getPostersPerRow(shape,screenWidth,isOrientationLandscape),shapeWidth=screenWidth/imagesPerRow;return Math.round(shapeWidth)}function setCardData(items,options){options.shape=options.shape||"auto";var primaryImageAspectRatio=imageLoader.getPrimaryImageAspectRatio(items);if("auto"===options.shape||"autohome"===options.shape||"autooverflow"===options.shape||"autoVertical"===options.shape){var requestedShape=options.shape;options.shape=null,primaryImageAspectRatio&&(primaryImageAspectRatio>=3?(options.shape="banner",options.coverImage=!0):options.shape=primaryImageAspectRatio>=1.33?"autooverflow"===requestedShape?"overflowBackdrop":"backdrop":primaryImageAspectRatio>.71?"autooverflow"===requestedShape?"overflowSquare":"square":"autooverflow"===requestedShape?"overflowPortrait":"portrait"),options.shape||(options.shape=options.defaultShape||("autooverflow"===requestedShape?"overflowSquare":"square"))}if("auto"===options.preferThumb&&(options.preferThumb="backdrop"===options.shape||"overflowBackdrop"===options.shape),options.uiAspect=getDesiredAspect(options.shape),options.primaryImageAspectRatio=primaryImageAspectRatio,!options.width&&options.widths&&(options.width=options.widths[options.shape]),options.rows&&"number"!=typeof options.rows&&(options.rows=options.rows[options.shape]),!options.width){var screenWidth=dom.getWindowSize().innerWidth,screenHeight=dom.getWindowSize().innerHeight;if(isResizable(screenWidth)){screenWidth=100*Math.floor(screenWidth/100)}options.width=getImageWidth(options.shape,screenWidth,screenWidth>1.3*screenHeight)}}function buildCardsHtmlInternal(items,options){var isVertical;"autoVertical"===options.shape&&(isVertical=!0),setCardData(items,options);var currentIndexValue,hasOpenRow,hasOpenSection,apiClient,lastServerId,i,length,html="",itemsInRow=0,sectionTitleTagName=options.sectionTitleTagName||"div";for(i=0,length=items.length;i=.5?.5:0)+"+":null);newIndexValue!==currentIndexValue&&(hasOpenRow&&(html+="",hasOpenRow=!1,itemsInRow=0),hasOpenSection&&(html+="",isVertical&&(html+=""),hasOpenSection=!1),html+=isVertical?'
':'
',html+="<"+sectionTitleTagName+' class="sectionTitle">'+newIndexValue+"",isVertical&&(html+='
'),currentIndexValue=newIndexValue,hasOpenSection=!0)}options.rows&&0===itemsInRow&&(hasOpenRow&&(html+="
",hasOpenRow=!1),html+='
',hasOpenRow=!0),html+=buildCard(i,item,apiClient,options),itemsInRow++,options.rows&&itemsInRow>=options.rows&&(html+="
",hasOpenRow=!1,itemsInRow=0)}hasOpenRow&&(html+="
"),hasOpenSection&&(html+="
",isVertical&&(html+=""));var cardFooterHtml="";for(i=0,length=options.lines||0;i ':'
 
';if(options.leadingButtons)for(i=0,length=options.leadingButtons.length;i',cardBoxClass="cardBox";enableFocusTransfrom&&(cardBoxClass+=" cardBox-focustransform"),cardFooterHtml&&(cardBoxClass+=" cardBox-bottompadded");var cardScalableClass="cardScalable card-focuscontent";cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large"),html+='
';var icon="";return buttonInfo.icon&&(icon=''+buttonInfo.icon+""),html+='
'+icon+'
'+buttonInfo.name+"
",html+=cardFooterHtml,html+="
",buttonInfo.routeUrl?html+="":html+="",html}function getDesiredAspect(shape){if(shape){if(shape=shape.toLowerCase(),-1!==shape.indexOf("portrait"))return 2/3;if(-1!==shape.indexOf("backdrop"))return 16/9;if(-1!==shape.indexOf("square"))return 1;if(-1!==shape.indexOf("banner"))return 1e3/185}return null}function getCardImageUrl(item,apiClient,options,shape){item=item.ProgramInfo||item;var width=options.width,height=null,primaryImageAspectRatio=item.PrimaryImageAspectRatio,forceName=!1,imgUrl=null,coverImage=!1,uiAspect=null;return options.preferThumb&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):(options.preferBanner||"banner"===shape)&&item.ImageTags&&item.ImageTags.Banner?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Banner",maxWidth:width,tag:item.ImageTags.Banner}):options.preferDisc&&item.ImageTags&&item.ImageTags.Disc?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Disc",maxWidth:width,tag:item.ImageTags.Disc}):options.preferLogo&&item.ImageTags&&item.ImageTags.Logo?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Logo",maxWidth:width,tag:item.ImageTags.Logo}):options.preferLogo&&item.ParentLogoImageTag&&item.ParentLogoItemId?imgUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",maxWidth:width,tag:item.ParentLogoImageTag}):options.preferThumb&&item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):options.preferThumb&&item.ParentThumbItemId&&!1!==options.inheritThumb&&"Photo"!==item.MediaType?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):options.preferThumb&&item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}),forceName=!0):options.preferThumb&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&"Episode"===item.Type?imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Primary?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.ImageTags.Primary}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.PrimaryImageTag?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.PrimaryImageItemId||item.Id||item.ItemId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.PrimaryImageTag}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.ParentPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId,{type:"Primary",maxWidth:width,tag:item.ParentPrimaryImageTag}):item.SeriesPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Primary",maxWidth:width,tag:item.SeriesPrimaryImageTag}):item.AlbumId&&item.AlbumPrimaryImageTag?(width=primaryImageAspectRatio?Math.round(height*primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.AlbumId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.AlbumPrimaryImageTag}),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):"Season"===item.Type&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.BackdropImageTags&&item.BackdropImageTags.length?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):item.ParentThumbItemId&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]})),{imgUrl:imgUrl,forceName:forceName,coverImage:coverImage}}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getDefaultColorIndex(str){if(str){for(var charIndex=Math.floor(str.length/2),character=String(str.substr(charIndex,1).charCodeAt()),sum=0,i=0;i0&&isOuterFooter?currentCssClass+=" cardText-secondary":0===valid&&isOuterFooter&&(currentCssClass+=" cardText-first"),addRightMargin&&(currentCssClass+=" cardText-rightmargin"),text&&(html+="
",html+=text,html+="
",valid++,maxLines&&valid>=maxLines))break}if(forceLines)for(length=maxLines||Math.min(lines.length,maxLines||lines.length);valid ",valid++;return html}function isUsingLiveTvNaming(item){return"Program"===item.Type||"Timer"===item.Type||"Recording"===item.Type}function getAirTimeText(item,showAirDateTime,showAirEndTime){var airTimeText="";if(item.StartDate)try{var date=datetime.parseISO8601Date(item.StartDate);showAirDateTime&&(airTimeText+=datetime.toLocaleDateString(date,{weekday:"short",month:"short",day:"numeric"})+" "),airTimeText+=datetime.getDisplayTime(date),item.EndDate&&showAirEndTime&&(date=datetime.parseISO8601Date(item.EndDate),airTimeText+=" - "+datetime.getDisplayTime(date))}catch(e){console.log("Error parsing date: "+item.StartDate)}return airTimeText}function getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerClass,progressHtml,logoUrl,isOuterFooter){var html="";logoUrl&&(html+='');var showOtherText=isOuterFooter?!overlayText:overlayText;if(isOuterFooter&&options.cardLayout&&!layoutManager.tv&&"none"!==options.cardFooterAside){html+=''}var titleAdded,cssClass=options.centerText?"cardText cardTextCentered":"cardText",lines=[],parentTitleUnderneath="MusicAlbum"===item.Type||"Audio"===item.Type||"MusicVideo"===item.Type;if(showOtherText&&(options.showParentTitle||options.showParentTitleOrTitle)&&!parentTitleUnderneath)if(isOuterFooter&&"Episode"===item.Type&&item.SeriesName)item.SeriesId?lines.push(getTextActionButton({Id:item.SeriesId,ServerId:item.ServerId,Name:item.SeriesName,Type:"Series",IsFolder:!0})):lines.push(item.SeriesName);else if(isUsingLiveTvNaming(item))lines.push(item.Name),item.EpisodeTitle||(titleAdded=!0);else{var parentTitle=item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"";(parentTitle||showTitle)&&lines.push(parentTitle)}var showMediaTitle=showTitle&&!titleAdded||options.showParentTitleOrTitle&&!lines.length;if(showMediaTitle||titleAdded||!showTitle&&!forceName||(showMediaTitle=!0),showMediaTitle){var name="auto"!==options.showTitle||item.IsFolder||"Photo"!==item.MediaType?itemHelper.getDisplayName(item,{includeParentInfo:options.includeParentInfoInTitle}):"";lines.push(name)}if(showOtherText){if(options.showParentTitle&&parentTitleUnderneath&&(isOuterFooter&&item.AlbumArtists&&item.AlbumArtists.length?(item.AlbumArtists[0].Type="MusicArtist",item.AlbumArtists[0].IsFolder=!0,lines.push(getTextActionButton(item.AlbumArtists[0],null,item.ServerId))):lines.push(isUsingLiveTvNaming(item)?item.Name:item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"")),options.showItemCounts){var itemCountHtml=getItemCountsHtml(options,item);lines.push(itemCountHtml)}if(options.textLines)for(var additionalLines=options.textLines(item),i=0,length=additionalLines.length;i'+html,html+=""),html}function getTextActionButton(item,text,serverId){if(text||(text=itemHelper.getDisplayName(item)),layoutManager.tv)return text;var html=""}function getItemCountsHtml(options,item){var childText,counts=[];if("Playlist"===item.Type){if(childText="",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;minutes=minutes||1,childText+=globalize.translate("sharedcomponents#ValueMinutes",Math.round(minutes))}else childText+=globalize.translate("sharedcomponents#ValueMinutes",0);counts.push(childText)}else"Genre"===item.Type||"Studio"===item.Type?(item.MovieCount&&(childText=1===item.MovieCount?globalize.translate("sharedcomponents#ValueOneMovie"):globalize.translate("sharedcomponents#ValueMovieCount",item.MovieCount),counts.push(childText)),item.SeriesCount&&(childText=1===item.SeriesCount?globalize.translate("sharedcomponents#ValueOneSeries"):globalize.translate("sharedcomponents#ValueSeriesCount",item.SeriesCount),counts.push(childText)),item.EpisodeCount&&(childText=1===item.EpisodeCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.EpisodeCount),counts.push(childText)),item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText))):"GameGenre"===item.Type?item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText)):"MusicGenre"===item.Type||"MusicArtist"===options.context?(item.AlbumCount&&(childText=1===item.AlbumCount?globalize.translate("sharedcomponents#ValueOneAlbum"):globalize.translate("sharedcomponents#ValueAlbumCount",item.AlbumCount),counts.push(childText)),item.SongCount&&(childText=1===item.SongCount?globalize.translate("sharedcomponents#ValueOneSong"):globalize.translate("sharedcomponents#ValueSongCount",item.SongCount),counts.push(childText)),item.MusicVideoCount&&(childText=1===item.MusicVideoCount?globalize.translate("sharedcomponents#ValueOneMusicVideo"):globalize.translate("sharedcomponents#ValueMusicVideoCount",item.MusicVideoCount),counts.push(childText))):"Series"===item.Type&&(childText=1===item.RecursiveItemCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.RecursiveItemCount),counts.push(childText));return counts.join(", ")}function requireRefreshIndicator(){refreshIndicatorLoaded||(refreshIndicatorLoaded=!0,require(["emby-itemrefreshindicator"]))}function getDefaultBackgroundClass(str){return"defaultCardBackground defaultCardBackground"+getDefaultColorIndex(str)}function buildCard(index,item,apiClient,options){var action=options.action||"link";"play"===action&&item.IsFolder?action="link":"Photo"===item.MediaType&&(action="play");var shape=options.shape;if("mixed"===shape){shape=null;var primaryImageAspectRatio=item.PrimaryImageAspectRatio;primaryImageAspectRatio&&(shape=primaryImageAspectRatio>=1.33?"mixedBackdrop":primaryImageAspectRatio>.71?"mixedSquare":"mixedPortrait"),shape=shape||"mixedSquare"}var className="card";shape&&(className+=" "+shape+"Card"),options.cardCssClass&&(className+=" "+options.cardCssClass),options.cardClass&&(className+=" "+options.cardClass),layoutManager.desktop&&(className+=" card-hoverable"),enableFocusTransfrom&&layoutManager.tv||(className+=" card-nofocustransform");var imgInfo=getCardImageUrl(item,apiClient,options,shape),imgUrl=imgInfo.imgUrl,forceName=imgInfo.forceName,showTitle="auto"===options.showTitle||(options.showTitle||"PhotoAlbum"===item.Type||"Folder"===item.Type),overlayText=options.overlayText;forceName&&!options.cardLayout&&null==overlayText&&(overlayText=!0);var cardImageContainerClass="cardImageContainer";(options.coverImage||imgInfo.coverImage)&&(cardImageContainerClass+=" coveredImage",("Photo"===item.MediaType||"PhotoAlbum"===item.Type||"Folder"===item.Type||item.ProgramInfo||"Program"===item.Type||"Recording"===item.Type)&&(cardImageContainerClass+=" coveredImage-noScale")),imgUrl||(cardImageContainerClass+=" "+getDefaultBackgroundClass(item.Name));var cardBoxClass=options.cardLayout?"cardBox visualCardBox":"cardBox";layoutManager.tv&&(enableFocusTransfrom&&(cardBoxClass+=" cardBox-focustransform"),options.cardLayout&&(cardBoxClass+=" card-focuscontent",enableFocusTransfrom||(cardBoxClass+=" card-focuscontent-large")));var footerCssClass,logoUrl,progressHtml=indicators.getProgressBarHtml(item),innerCardFooter="",footerOverlayed=!1;options.showChannelLogo&&item.ChannelPrimaryImageTag?logoUrl=apiClient.getScaledImageUrl(item.ChannelId,{type:"Primary",height:40,tag:item.ChannelPrimaryImageTag}):options.showLogo&&item.ParentLogoImageTag&&(logoUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",height:40,tag:item.ParentLogoImageTag})),overlayText?(logoUrl=null,footerCssClass=progressHtml?"innerCardFooter fullInnerCardFooter":"innerCardFooter",innerCardFooter+=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!1),footerOverlayed=!0):progressHtml&&(innerCardFooter+='
',innerCardFooter+=progressHtml,innerCardFooter+="
",progressHtml="");var mediaSourceCount=item.MediaSourceCount||1;mediaSourceCount>1&&(innerCardFooter+='
'+mediaSourceCount+"
");var outerCardFooter="";overlayText||footerOverlayed||(footerCssClass=options.cardLayout?"cardFooter":"cardFooter cardFooter-transparent",logoUrl&&(footerCssClass+=" cardFooter-withlogo"),options.cardLayout||(logoUrl=null),outerCardFooter=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!0)),outerCardFooter&&!options.cardLayout&&(cardBoxClass+=" cardBox-bottompadded");var overlayButtons="";if(layoutManager.mobile){var overlayPlayButton=options.overlayPlayButton;null!=overlayPlayButton||options.overlayMoreButton||options.overlayInfoButton||options.cardLayout||(overlayPlayButton="Video"===item.MediaType);var btnCssClass="cardOverlayButton cardOverlayButton-br itemAction";if(options.centerPlayButton&&(overlayButtons+=''),!overlayPlayButton||item.IsPlaceHolder||"Virtual"===item.LocationType&&item.MediaType&&"Program"!==item.Type||"Person"===item.Type||(overlayButtons+=''),options.overlayMoreButton){overlayButtons+=''}}options.showChildCountIndicator&&item.ChildCount&&(className+=" groupedCard");var cardImageContainerOpen,cardImageContainerClose="",cardBoxClose="",cardScalableClose="",cardContentClass="cardContent";options.cardLayout||(cardContentClass+=" cardContent-shadow"),layoutManager.tv?(cardImageContainerOpen=imgUrl?'
':'
',cardImageContainerClose="
"):(cardImageContainerOpen=imgUrl?'");var cardScalableClass="cardScalable";layoutManager.tv&&!options.cardLayout&&(cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large")),cardImageContainerOpen='
'+cardImageContainerOpen,cardBoxClose="
",cardScalableClose="
";var indicatorsHtml="";if(!1!==options.missingIndicator&&(indicatorsHtml+=indicators.getMissingIndicator(item)),indicatorsHtml+=indicators.getSyncIndicator(item),indicatorsHtml+=indicators.getTimerIndicator(item),indicatorsHtml+=indicators.getTypeIndicator(item),options.showGroupCount?indicatorsHtml+=indicators.getChildCountIndicatorHtml(item,{minCount:1}):indicatorsHtml+=indicators.getPlayedIndicatorHtml(item),"CollectionFolder"===item.Type||item.CollectionType){indicatorsHtml+='
',requireRefreshIndicator()}indicatorsHtml&&(cardImageContainerOpen+='
'+indicatorsHtml+"
"),imgUrl||(cardImageContainerOpen+=getCardDefaultText(item,options));var tagName=layoutManager.tv&&!overlayButtons?"button":"div",nameWithPrefix=item.SortName||item.Name||"",prefix=nameWithPrefix.substring(0,Math.min(3,nameWithPrefix.length));prefix&&(prefix=prefix.toUpperCase());var timerAttributes="";item.TimerId&&(timerAttributes+=' data-timerid="'+item.TimerId+'"'),item.SeriesTimerId&&(timerAttributes+=' data-seriestimerid="'+item.SeriesTimerId+'"');var actionAttribute;"button"===tagName?(className+=" itemAction",actionAttribute=' data-action="'+action+'"'):actionAttribute="","MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"Audio"!==item.Type&&(className+=" card-withuserdata");var positionTicksData=item.UserData&&item.UserData.PlaybackPositionTicks?' data-positionticks="'+item.UserData.PlaybackPositionTicks+'"':"",collectionIdData=options.collectionId?' data-collectionid="'+options.collectionId+'"':"",playlistIdData=options.playlistId?' data-playlistid="'+options.playlistId+'"':"",mediaTypeData=item.MediaType?' data-mediatype="'+item.MediaType+'"':"",collectionTypeData=item.CollectionType?' data-collectiontype="'+item.CollectionType+'"':"",channelIdData=item.ChannelId?' data-channelid="'+item.ChannelId+'"':"",contextData=options.context?' data-context="'+options.context+'"':"",parentIdData=options.parentId?' data-parentid="'+options.parentId+'"':"",additionalCardContent="";return layoutManager.desktop&&(additionalCardContent+=getHoverMenuHtml(item)),"<"+tagName+' data-index="'+index+'"'+timerAttributes+actionAttribute+' data-isfolder="'+(item.IsFolder||!1)+'" data-serverid="'+(item.ServerId||options.serverId)+'" data-id="'+(item.Id||item.ItemId)+'" data-type="'+item.Type+'"'+mediaTypeData+collectionTypeData+channelIdData+positionTicksData+collectionIdData+playlistIdData+contextData+parentIdData+' data-prefix="'+prefix+'" class="'+className+'">'+cardImageContainerOpen+innerCardFooter+cardImageContainerClose+overlayButtons+additionalCardContent+cardScalableClose+outerCardFooter+cardBoxClose+""}function getHoverMenuHtml(item){var html="",btnCssClass="cardOverlayButton cardOverlayButton-hover itemAction";playbackManager.canPlay(item)&&(html+=''),html+='
';var userData=item.UserData||{};if(itemHelper.canMarkPlayed(item)&&(require(["emby-playstatebutton"]),html+=''),itemHelper.canRate(item)){var likes=null==userData.Likes?"":userData.Likes;require(["emby-ratingbutton"]),html+=''}return html+='',html+="
"}function getCardDefaultText(item,options){var collectionType=item.CollectionType +define(["datetime","imageLoader","connectionManager","itemHelper","focusManager","indicators","globalize","layoutManager","apphost","dom","browser","playbackManager","itemShortcuts","css!./card","paper-icon-button-light","programStyles"],function(datetime,imageLoader,connectionManager,itemHelper,focusManager,indicators,globalize,layoutManager,appHost,dom,browser,playbackManager,itemShortcuts){"use strict";function getCardsHtml(items,options){return 1===arguments.length&&(options=arguments[0],items=options.items),buildCardsHtmlInternal(items,options)}function getPostersPerRow(shape,screenWidth,isOrientationLandscape){switch(shape){case"portrait":return layoutManager.tv?5.9999999988:screenWidth>=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:3.0000000003;case"square":return layoutManager.tv?5.9999999988:screenWidth>=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:screenWidth>=500?3.0000000003:2;case"banner":return screenWidth>=2200?4:screenWidth>=1200?3.0000000003:screenWidth>=800?2:1;case"backdrop":return layoutManager.tv?4:screenWidth>=2500?6:screenWidth>=1600?5:screenWidth>=1200?4:screenWidth>=770?3:screenWidth>=420?2:1;case"smallBackdrop":return screenWidth>=1600?8:screenWidth>=1400?7.000000000007001:screenWidth>=1200?6:screenWidth>=1e3?5:screenWidth>=800?4:screenWidth>=500?3.0000000003:2;case"overflowSmallBackdrop":return layoutManager.tv?100/18.9:isOrientationLandscape?screenWidth>=800?100/15.5:100/23.3:screenWidth>=540?100/30:100/72;case"overflowPortrait":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=400?100/31.5:100/42;case"overflowSquare":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=540?100/31.5:100/42;case"overflowBackdrop":return layoutManager.tv?100/23.3:isOrientationLandscape?screenWidth>=1700?100/18.5:100/23.3:screenWidth>=1800?100/23.5:screenWidth>=1400?100/30:screenWidth>=760?2.5:screenWidth>=640?100/56:100/72;default:return 4}}function isResizable(windowWidth){var screen=window.screen;if(screen){if(screen.availWidth-windowWidth>20)return!0}return!1}function getImageWidth(shape,screenWidth,isOrientationLandscape){var imagesPerRow=getPostersPerRow(shape,screenWidth,isOrientationLandscape),shapeWidth=screenWidth/imagesPerRow;return Math.round(shapeWidth)}function setCardData(items,options){options.shape=options.shape||"auto";var primaryImageAspectRatio=imageLoader.getPrimaryImageAspectRatio(items);if("auto"===options.shape||"autohome"===options.shape||"autooverflow"===options.shape||"autoVertical"===options.shape){var requestedShape=options.shape;options.shape=null,primaryImageAspectRatio&&(primaryImageAspectRatio>=3?(options.shape="banner",options.coverImage=!0):options.shape=primaryImageAspectRatio>=1.33?"autooverflow"===requestedShape?"overflowBackdrop":"backdrop":primaryImageAspectRatio>.71?"autooverflow"===requestedShape?"overflowSquare":"square":"autooverflow"===requestedShape?"overflowPortrait":"portrait"),options.shape||(options.shape=options.defaultShape||("autooverflow"===requestedShape?"overflowSquare":"square"))}if("auto"===options.preferThumb&&(options.preferThumb="backdrop"===options.shape||"overflowBackdrop"===options.shape),options.uiAspect=getDesiredAspect(options.shape),options.primaryImageAspectRatio=primaryImageAspectRatio,!options.width&&options.widths&&(options.width=options.widths[options.shape]),options.rows&&"number"!=typeof options.rows&&(options.rows=options.rows[options.shape]),!options.width){var screenWidth=dom.getWindowSize().innerWidth,screenHeight=dom.getWindowSize().innerHeight;if(isResizable(screenWidth)){screenWidth=100*Math.floor(screenWidth/100)}options.width=getImageWidth(options.shape,screenWidth,screenWidth>1.3*screenHeight)}}function buildCardsHtmlInternal(items,options){var isVertical;"autoVertical"===options.shape&&(isVertical=!0),setCardData(items,options);var currentIndexValue,hasOpenRow,hasOpenSection,apiClient,lastServerId,i,length,html="",itemsInRow=0,sectionTitleTagName=options.sectionTitleTagName||"div";for(i=0,length=items.length;i=.5?.5:0)+"+":null);newIndexValue!==currentIndexValue&&(hasOpenRow&&(html+="
",hasOpenRow=!1,itemsInRow=0),hasOpenSection&&(html+="",isVertical&&(html+=""),hasOpenSection=!1),html+=isVertical?'
':'
',html+="<"+sectionTitleTagName+' class="sectionTitle">'+newIndexValue+"",isVertical&&(html+='
'),currentIndexValue=newIndexValue,hasOpenSection=!0)}options.rows&&0===itemsInRow&&(hasOpenRow&&(html+="
",hasOpenRow=!1),html+='
',hasOpenRow=!0),html+=buildCard(i,item,apiClient,options),itemsInRow++,options.rows&&itemsInRow>=options.rows&&(html+="
",hasOpenRow=!1,itemsInRow=0)}hasOpenRow&&(html+="
"),hasOpenSection&&(html+="
",isVertical&&(html+=""));var cardFooterHtml="";for(i=0,length=options.lines||0;i ':'
 
';if(options.leadingButtons)for(i=0,length=options.leadingButtons.length;i',cardBoxClass="cardBox";enableFocusTransfrom&&(cardBoxClass+=" cardBox-focustransform"),cardFooterHtml&&(cardBoxClass+=" cardBox-bottompadded");var cardScalableClass="cardScalable card-focuscontent";cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large"),html+='
';var icon="";return buttonInfo.icon&&(icon=''+buttonInfo.icon+""),html+='
'+icon+'
'+buttonInfo.name+"
",html+=cardFooterHtml,html+="
",buttonInfo.routeUrl?html+="":html+="",html}function getDesiredAspect(shape){if(shape){if(shape=shape.toLowerCase(),-1!==shape.indexOf("portrait"))return 2/3;if(-1!==shape.indexOf("backdrop"))return 16/9;if(-1!==shape.indexOf("square"))return 1;if(-1!==shape.indexOf("banner"))return 1e3/185}return null}function getCardImageUrl(item,apiClient,options,shape){item=item.ProgramInfo||item;var width=options.width,height=null,primaryImageAspectRatio=item.PrimaryImageAspectRatio,forceName=!1,imgUrl=null,coverImage=!1,uiAspect=null;return options.preferThumb&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):(options.preferBanner||"banner"===shape)&&item.ImageTags&&item.ImageTags.Banner?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Banner",maxWidth:width,tag:item.ImageTags.Banner}):options.preferDisc&&item.ImageTags&&item.ImageTags.Disc?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Disc",maxWidth:width,tag:item.ImageTags.Disc}):options.preferLogo&&item.ImageTags&&item.ImageTags.Logo?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Logo",maxWidth:width,tag:item.ImageTags.Logo}):options.preferLogo&&item.ParentLogoImageTag&&item.ParentLogoItemId?imgUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",maxWidth:width,tag:item.ParentLogoImageTag}):options.preferThumb&&item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):options.preferThumb&&item.ParentThumbItemId&&!1!==options.inheritThumb&&"Photo"!==item.MediaType?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):options.preferThumb&&item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}),forceName=!0):options.preferThumb&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&"Episode"===item.Type?imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Primary?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.ImageTags.Primary}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.PrimaryImageTag?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.PrimaryImageItemId||item.Id||item.ItemId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.PrimaryImageTag}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.ParentPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId,{type:"Primary",maxWidth:width,tag:item.ParentPrimaryImageTag}):item.SeriesPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Primary",maxWidth:width,tag:item.SeriesPrimaryImageTag}):item.AlbumId&&item.AlbumPrimaryImageTag?(width=primaryImageAspectRatio?Math.round(height*primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.AlbumId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.AlbumPrimaryImageTag}),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):"Season"===item.Type&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.BackdropImageTags&&item.BackdropImageTags.length?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):item.ParentThumbItemId&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]})),{imgUrl:imgUrl,forceName:forceName,coverImage:coverImage}}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getDefaultColorIndex(str){if(str){for(var charIndex=Math.floor(str.length/2),character=String(str.substr(charIndex,1).charCodeAt()),sum=0,i=0;i0&&isOuterFooter?currentCssClass+=" cardText-secondary":0===valid&&isOuterFooter&&(currentCssClass+=" cardText-first"),addRightMargin&&(currentCssClass+=" cardText-rightmargin"),text&&(html+="
",html+=text,html+="
",valid++,maxLines&&valid>=maxLines))break}if(forceLines)for(length=maxLines||Math.min(lines.length,maxLines||lines.length);valid ",valid++;return html}function isUsingLiveTvNaming(item){return"Program"===item.Type||"Timer"===item.Type||"Recording"===item.Type}function getAirTimeText(item,showAirDateTime,showAirEndTime){var airTimeText="";if(item.StartDate)try{var date=datetime.parseISO8601Date(item.StartDate);showAirDateTime&&(airTimeText+=datetime.toLocaleDateString(date,{weekday:"short",month:"short",day:"numeric"})+" "),airTimeText+=datetime.getDisplayTime(date),item.EndDate&&showAirEndTime&&(date=datetime.parseISO8601Date(item.EndDate),airTimeText+=" - "+datetime.getDisplayTime(date))}catch(e){console.log("Error parsing date: "+item.StartDate)}return airTimeText}function getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerClass,progressHtml,logoUrl,isOuterFooter){var html="";logoUrl&&(html+='');var showOtherText=isOuterFooter?!overlayText:overlayText;if(isOuterFooter&&options.cardLayout&&!layoutManager.tv&&"none"!==options.cardFooterAside){html+=''}var titleAdded,cssClass=options.centerText?"cardText cardTextCentered":"cardText",lines=[],parentTitleUnderneath="MusicAlbum"===item.Type||"Audio"===item.Type||"MusicVideo"===item.Type;if(showOtherText&&(options.showParentTitle||options.showParentTitleOrTitle)&&!parentTitleUnderneath)if(isOuterFooter&&"Episode"===item.Type&&item.SeriesName)item.SeriesId?lines.push(getTextActionButton({Id:item.SeriesId,ServerId:item.ServerId,Name:item.SeriesName,Type:"Series",IsFolder:!0})):lines.push(item.SeriesName);else if(isUsingLiveTvNaming(item))lines.push(item.Name),item.EpisodeTitle||(titleAdded=!0);else{var parentTitle=item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"";(parentTitle||showTitle)&&lines.push(parentTitle)}var showMediaTitle=showTitle&&!titleAdded||options.showParentTitleOrTitle&&!lines.length;if(showMediaTitle||titleAdded||!showTitle&&!forceName||(showMediaTitle=!0),showMediaTitle){var name="auto"!==options.showTitle||item.IsFolder||"Photo"!==item.MediaType?itemHelper.getDisplayName(item,{includeParentInfo:options.includeParentInfoInTitle}):"";lines.push(name)}if(showOtherText){if(options.showParentTitle&&parentTitleUnderneath&&(isOuterFooter&&item.AlbumArtists&&item.AlbumArtists.length?(item.AlbumArtists[0].Type="MusicArtist",item.AlbumArtists[0].IsFolder=!0,lines.push(getTextActionButton(item.AlbumArtists[0],null,item.ServerId))):lines.push(isUsingLiveTvNaming(item)?item.Name:item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"")),options.showItemCounts){var itemCountHtml=getItemCountsHtml(options,item);lines.push(itemCountHtml)}if(options.textLines)for(var additionalLines=options.textLines(item),i=0,length=additionalLines.length;i'+html,html+=""),html}function getTextActionButton(item,text,serverId){if(text||(text=itemHelper.getDisplayName(item)),layoutManager.tv)return text;var html=""}function getItemCountsHtml(options,item){var childText,counts=[];if("Playlist"===item.Type){if(childText="",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;minutes=minutes||1,childText+=globalize.translate("sharedcomponents#ValueMinutes",Math.round(minutes))}else childText+=globalize.translate("sharedcomponents#ValueMinutes",0);counts.push(childText)}else"Genre"===item.Type||"Studio"===item.Type?(item.MovieCount&&(childText=1===item.MovieCount?globalize.translate("sharedcomponents#ValueOneMovie"):globalize.translate("sharedcomponents#ValueMovieCount",item.MovieCount),counts.push(childText)),item.SeriesCount&&(childText=1===item.SeriesCount?globalize.translate("sharedcomponents#ValueOneSeries"):globalize.translate("sharedcomponents#ValueSeriesCount",item.SeriesCount),counts.push(childText)),item.EpisodeCount&&(childText=1===item.EpisodeCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.EpisodeCount),counts.push(childText)),item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText))):"GameGenre"===item.Type?item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText)):"MusicGenre"===item.Type||"MusicArtist"===options.context?(item.AlbumCount&&(childText=1===item.AlbumCount?globalize.translate("sharedcomponents#ValueOneAlbum"):globalize.translate("sharedcomponents#ValueAlbumCount",item.AlbumCount),counts.push(childText)),item.SongCount&&(childText=1===item.SongCount?globalize.translate("sharedcomponents#ValueOneSong"):globalize.translate("sharedcomponents#ValueSongCount",item.SongCount),counts.push(childText)),item.MusicVideoCount&&(childText=1===item.MusicVideoCount?globalize.translate("sharedcomponents#ValueOneMusicVideo"):globalize.translate("sharedcomponents#ValueMusicVideoCount",item.MusicVideoCount),counts.push(childText))):"Series"===item.Type&&(childText=1===item.RecursiveItemCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.RecursiveItemCount),counts.push(childText));return counts.join(", ")}function requireRefreshIndicator(){refreshIndicatorLoaded||(refreshIndicatorLoaded=!0,require(["emby-itemrefreshindicator"]))}function getDefaultBackgroundClass(str){return"defaultCardBackground defaultCardBackground"+getDefaultColorIndex(str)}function buildCard(index,item,apiClient,options){var action=options.action||"link";"play"===action&&item.IsFolder?action="link":"Photo"===item.MediaType&&(action="play");var shape=options.shape;if("mixed"===shape){shape=null;var primaryImageAspectRatio=item.PrimaryImageAspectRatio;primaryImageAspectRatio&&(shape=primaryImageAspectRatio>=1.33?"mixedBackdrop":primaryImageAspectRatio>.71?"mixedSquare":"mixedPortrait"),shape=shape||"mixedSquare"}var className="card";shape&&(className+=" "+shape+"Card"),options.cardCssClass&&(className+=" "+options.cardCssClass),options.cardClass&&(className+=" "+options.cardClass),layoutManager.desktop&&(className+=" card-hoverable"),enableFocusTransfrom&&layoutManager.tv||(className+=" card-nofocustransform");var imgInfo=getCardImageUrl(item,apiClient,options,shape),imgUrl=imgInfo.imgUrl,forceName=imgInfo.forceName,showTitle="auto"===options.showTitle||(options.showTitle||"PhotoAlbum"===item.Type||"Folder"===item.Type),overlayText=options.overlayText;forceName&&!options.cardLayout&&null==overlayText&&(overlayText=!0);var cardImageContainerClass="cardImageContainer";(options.coverImage||imgInfo.coverImage)&&(cardImageContainerClass+=" coveredImage",("Photo"===item.MediaType||"PhotoAlbum"===item.Type||"Folder"===item.Type||item.ProgramInfo||"Program"===item.Type||"Recording"===item.Type)&&(cardImageContainerClass+=" coveredImage-noScale")),imgUrl||(cardImageContainerClass+=" "+getDefaultBackgroundClass(item.Name));var cardBoxClass=options.cardLayout?"cardBox visualCardBox":"cardBox";layoutManager.tv&&(enableFocusTransfrom&&(cardBoxClass+=" cardBox-focustransform"),options.cardLayout&&(cardBoxClass+=" card-focuscontent",enableFocusTransfrom||(cardBoxClass+=" card-focuscontent-large")));var footerCssClass,logoUrl,progressHtml=indicators.getProgressBarHtml(item),innerCardFooter="",footerOverlayed=!1;options.showChannelLogo&&item.ChannelPrimaryImageTag?logoUrl=apiClient.getScaledImageUrl(item.ChannelId,{type:"Primary",height:40,tag:item.ChannelPrimaryImageTag}):options.showLogo&&item.ParentLogoImageTag&&(logoUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",height:40,tag:item.ParentLogoImageTag})),overlayText?(logoUrl=null,footerCssClass=progressHtml?"innerCardFooter fullInnerCardFooter":"innerCardFooter",innerCardFooter+=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!1),footerOverlayed=!0):progressHtml&&(innerCardFooter+='
',innerCardFooter+=progressHtml,innerCardFooter+="
",progressHtml="");var mediaSourceCount=item.MediaSourceCount||1;mediaSourceCount>1&&(innerCardFooter+='
'+mediaSourceCount+"
");var outerCardFooter="";overlayText||footerOverlayed||(footerCssClass=options.cardLayout?"cardFooter":"cardFooter cardFooter-transparent",logoUrl&&(footerCssClass+=" cardFooter-withlogo"),options.cardLayout||(logoUrl=null),outerCardFooter=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!0)),outerCardFooter&&!options.cardLayout&&(cardBoxClass+=" cardBox-bottompadded");var overlayButtons="";if(layoutManager.mobile){var overlayPlayButton=options.overlayPlayButton;null!=overlayPlayButton||options.overlayMoreButton||options.overlayInfoButton||options.cardLayout||(overlayPlayButton="Video"===item.MediaType);var btnCssClass="cardOverlayButton cardOverlayButton-br itemAction";if(options.centerPlayButton&&(overlayButtons+=''),!overlayPlayButton||item.IsPlaceHolder||"Virtual"===item.LocationType&&item.MediaType&&"Program"!==item.Type||"Person"===item.Type||(overlayButtons+=''),options.overlayMoreButton){overlayButtons+=''}}options.showChildCountIndicator&&item.ChildCount&&(className+=" groupedCard");var cardImageContainerOpen,cardImageContainerClose="",cardBoxClose="",cardScalableClose="",cardContentClass="cardContent";options.cardLayout||(cardContentClass+=" cardContent-shadow"),layoutManager.tv?(cardImageContainerOpen=imgUrl?'
':'
',cardImageContainerClose="
"):(cardImageContainerOpen=imgUrl?'");var cardScalableClass="cardScalable";layoutManager.tv&&!options.cardLayout&&(cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large")),cardImageContainerOpen='
'+cardImageContainerOpen,cardBoxClose="
",cardScalableClose="
";var indicatorsHtml="";if(!1!==options.missingIndicator&&(indicatorsHtml+=indicators.getMissingIndicator(item)),indicatorsHtml+=indicators.getSyncIndicator(item),indicatorsHtml+=indicators.getTimerIndicator(item),indicatorsHtml+=indicators.getTypeIndicator(item),options.showGroupCount?indicatorsHtml+=indicators.getChildCountIndicatorHtml(item,{minCount:1}):indicatorsHtml+=indicators.getPlayedIndicatorHtml(item),"CollectionFolder"===item.Type||item.CollectionType){indicatorsHtml+='
',requireRefreshIndicator()}indicatorsHtml&&(cardImageContainerOpen+='
'+indicatorsHtml+"
"),imgUrl||(cardImageContainerOpen+=getCardDefaultText(item,options));var tagName=layoutManager.tv&&!overlayButtons?"button":"div",nameWithPrefix=item.SortName||item.Name||"",prefix=nameWithPrefix.substring(0,Math.min(3,nameWithPrefix.length));prefix&&(prefix=prefix.toUpperCase());var timerAttributes="";item.TimerId&&(timerAttributes+=' data-timerid="'+item.TimerId+'"'),item.SeriesTimerId&&(timerAttributes+=' data-seriestimerid="'+item.SeriesTimerId+'"');var actionAttribute;"button"===tagName?(className+=" itemAction",actionAttribute=' data-action="'+action+'"'):actionAttribute="","MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"Audio"!==item.Type&&(className+=" card-withuserdata");var positionTicksData=item.UserData&&item.UserData.PlaybackPositionTicks?' data-positionticks="'+item.UserData.PlaybackPositionTicks+'"':"",collectionIdData=options.collectionId?' data-collectionid="'+options.collectionId+'"':"",playlistIdData=options.playlistId?' data-playlistid="'+options.playlistId+'"':"",mediaTypeData=item.MediaType?' data-mediatype="'+item.MediaType+'"':"",collectionTypeData=item.CollectionType?' data-collectiontype="'+item.CollectionType+'"':"",channelIdData=item.ChannelId?' data-channelid="'+item.ChannelId+'"':"",contextData=options.context?' data-context="'+options.context+'"':"",parentIdData=options.parentId?' data-parentid="'+options.parentId+'"':"",additionalCardContent="";return layoutManager.desktop&&(additionalCardContent+=getHoverMenuHtml(item,action)),"<"+tagName+' data-index="'+index+'"'+timerAttributes+actionAttribute+' data-isfolder="'+(item.IsFolder||!1)+'" data-serverid="'+(item.ServerId||options.serverId)+'" data-id="'+(item.Id||item.ItemId)+'" data-type="'+item.Type+'"'+mediaTypeData+collectionTypeData+channelIdData+positionTicksData+collectionIdData+playlistIdData+contextData+parentIdData+' data-prefix="'+prefix+'" class="'+className+'">'+cardImageContainerOpen+innerCardFooter+cardImageContainerClose+overlayButtons+additionalCardContent+cardScalableClose+outerCardFooter+cardBoxClose+""}function getHoverMenuHtml(item,action){var html="";html+='
';var btnCssClass="cardOverlayButton cardOverlayButton-hover itemAction";playbackManager.canPlay(item)&&(html+=''),html+='
';var userData=item.UserData||{};if(itemHelper.canMarkPlayed(item)&&(require(["emby-playstatebutton"]),html+=''),itemHelper.canRate(item)){var likes=null==userData.Likes?"":userData.Likes;require(["emby-ratingbutton"]),html+=''}return html+='',html+="
",html+="
"}function getCardDefaultText(item,options){var collectionType=item.CollectionType ;return"livetv"===collectionType?'':"homevideos"===collectionType||"photos"===collectionType?'':"music"===collectionType?'':"MusicAlbum"===item.Type?'':"MusicArtist"===item.Type||"Person"===item.Type?'':options.defaultCardImageIcon?''+options.defaultCardImageIcon+"":'
'+(isUsingLiveTvNaming(item)?item.Name:itemHelper.getDisplayName(item))+"
"}function buildCards(items,options){if(document.body.contains(options.itemsContainer)){if(options.parentContainer){if(!items.length)return void options.parentContainer.classList.add("hide");options.parentContainer.classList.remove("hide")}var html=buildCardsHtmlInternal(items,options);html?(options.itemsContainer.cardBuilderHtml!==html&&(options.itemsContainer.innerHTML=html,items.length<50?options.itemsContainer.cardBuilderHtml=html:options.itemsContainer.cardBuilderHtml=null),imageLoader.lazyChildren(options.itemsContainer)):(options.itemsContainer.innerHTML=html,options.itemsContainer.cardBuilderHtml=null),options.autoFocus&&focusManager.autoFocus(options.itemsContainer,!0)}}function ensureIndicators(card,indicatorsElem){if(indicatorsElem)return indicatorsElem;if(!(indicatorsElem=card.querySelector(".cardIndicators"))){var cardImageContainer=card.querySelector(".cardImageContainer");indicatorsElem=document.createElement("div"),indicatorsElem.classList.add("cardIndicators"),cardImageContainer.appendChild(indicatorsElem)}return indicatorsElem}function updateUserData(card,userData){var type=card.getAttribute("data-type"),enableCountIndicator="Series"===type||"BoxSet"===type||"Season"===type,indicatorsElem=null,playedIndicator=null,countIndicator=null,itemProgressBar=null;userData.Played?(playedIndicator=card.querySelector(".playedIndicator"),playedIndicator||(playedIndicator=document.createElement("div"),playedIndicator.classList.add("playedIndicator"),playedIndicator.classList.add("indicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(playedIndicator)),playedIndicator.innerHTML=''):(playedIndicator=card.querySelector(".playedIndicator"))&&playedIndicator.parentNode.removeChild(playedIndicator),userData.UnplayedItemCount?(countIndicator=card.querySelector(".countIndicator"),countIndicator||(countIndicator=document.createElement("div"),countIndicator.classList.add("countIndicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(countIndicator)),countIndicator.innerHTML=userData.UnplayedItemCount):enableCountIndicator&&(countIndicator=card.querySelector(".countIndicator"))&&countIndicator.parentNode.removeChild(countIndicator);var progressHtml=indicators.getProgressBarHtml({Type:type,UserData:userData,MediaType:"Video"});if(progressHtml){if(!(itemProgressBar=card.querySelector(".itemProgressBar"))){itemProgressBar=document.createElement("div"),itemProgressBar.classList.add("itemProgressBar");var innerCardFooter=card.querySelector(".innerCardFooter");if(!innerCardFooter){innerCardFooter=document.createElement("div"),innerCardFooter.classList.add("innerCardFooter");card.querySelector(".cardImageContainer").appendChild(innerCardFooter)}innerCardFooter.appendChild(itemProgressBar)}itemProgressBar.innerHTML=progressHtml}else(itemProgressBar=card.querySelector(".itemProgressBar"))&&itemProgressBar.parentNode.removeChild(itemProgressBar)}function onUserDataChanged(userData,scope){for(var cards=(scope||document.body).querySelectorAll('.card-withuserdata[data-id="'+userData.ItemId+'"]'),i=0,length=cards.length;i')}cell.setAttribute("data-timerid",newTimerId)}}function onTimerCancelled(id,itemsContainer){for(var cells=itemsContainer.querySelectorAll('.card[data-timerid="'+id+'"]'),i=0,length=cells.length;i0}).map(function(a){return{Name:a}})}function getArtists(form){return form.querySelector("#txtArtist").value.trim().split(";").filter(function(s){return s.length>0}).map(function(a){return{Name:a}})}function getDateValue(form,element,property){var val=form.querySelector(element).value;if(!val)return null;if(currentItem[property]){var date=datetime.parseISO8601Date(currentItem[property],!0),parts=date.toISOString().split("T");if(0===parts[0].indexOf(val)){val+="T"+parts[1]}}return val}function onSubmit(e){loading.show();var form=this,item={Id:currentItem.Id,Name:form.querySelector("#txtName").value,OriginalTitle:form.querySelector("#txtOriginalName").value,ForcedSortName:form.querySelector("#txtSortName").value,CommunityRating:form.querySelector("#txtCommunityRating").value,HomePageUrl:form.querySelector("#txtHomePageUrl").value,CriticRating:form.querySelector("#txtCriticRating").value,IndexNumber:form.querySelector("#txtIndexNumber").value||null,AirsBeforeSeasonNumber:form.querySelector("#txtAirsBeforeSeason").value,AirsAfterSeasonNumber:form.querySelector("#txtAirsAfterSeason").value,AirsBeforeEpisodeNumber:form.querySelector("#txtAirsBeforeEpisode").value,ParentIndexNumber:form.querySelector("#txtParentIndexNumber").value||null,DisplayOrder:form.querySelector("#selectDisplayOrder").value,Album:form.querySelector("#txtAlbum").value,AlbumArtists:getAlbumArtists(form),ArtistItems:getArtists(form),Overview:form.querySelector("#txtOverview").value,Status:form.querySelector("#selectStatus").value,AirDays:getSelectedAirDays(form),AirTime:form.querySelector("#txtAirTime").value,Genres:getListValues(form.querySelector("#listGenres")),Tags:getListValues(form.querySelector("#listTags")),Studios:getListValues(form.querySelector("#listStudios")).map(function(element){return{Name:element}}),PremiereDate:getDateValue(form,"#txtPremiereDate","PremiereDate"),DateCreated:getDateValue(form,"#txtDateAdded","DateCreated"),EndDate:getDateValue(form,"#txtEndDate","EndDate"),ProductionYear:form.querySelector("#txtProductionYear").value,AspectRatio:form.querySelector("#txtOriginalAspectRatio").value,Video3DFormat:form.querySelector("#select3dFormat").value,OfficialRating:form.querySelector("#selectOfficialRating").value,CustomRating:form.querySelector("#selectCustomRating").value,People:currentItem.People,LockData:form.querySelector("#chkLockData").checked,LockedFields:Array.prototype.filter.call(form.querySelectorAll(".selectLockedField"),function(c){return!c.checked}).map(function(c){return c.getAttribute("data-value")})};item.ProviderIds=Object.assign({},currentItem.ProviderIds);var idElements=form.querySelectorAll(".txtExternalId");if(Array.prototype.map.call(idElements,function(idElem){var providerKey=idElem.getAttribute("data-providerkey");item.ProviderIds[providerKey]=idElem.value}),item.PreferredMetadataLanguage=form.querySelector("#selectLanguage").value,item.PreferredMetadataCountryCode=form.querySelector("#selectCountry").value,"Person"===currentItem.Type){var placeOfBirth=form.querySelector("#txtPlaceOfBirth").value;item.ProductionLocations=placeOfBirth?[placeOfBirth]:[]}if("Series"===currentItem.Type){var seriesRuntime=form.querySelector("#txtSeriesRuntime").value;item.RunTimeTicks=seriesRuntime?6e8*seriesRuntime:null}var tagline=form.querySelector("#txtTagline").value;return item.Taglines=tagline?[tagline]:[],submitUpdatedItem(form,item),e.preventDefault(),e.stopPropagation(),!1}function getListValues(list){return Array.prototype.map.call(list.querySelectorAll(".textValue"),function(el){return el.textContent})}function addElementToList(source,sortCallback){require(["prompt"],function(prompt){prompt({label:"Value:"}).then(function(text){var list=dom.parentWithClass(source,"editableListviewContainer").querySelector(".paperList"),items=getListValues(list);items.push(text),populateListView(list,items,sortCallback)})})}function removeElementFromList(source){var el=dom.parentWithClass(source,"listItem");el.parentNode.removeChild(el)}function editPerson(context,person,index){require(["personEditor"],function(personEditor){personEditor.show(person).then(function(updatedPerson){-1===index&¤tItem.People.push(updatedPerson),populatePeople(context,currentItem.People)})})}function showMoreMenu(context,button,user){require(["itemContextMenu"],function(itemContextMenu){var item=currentItem;itemContextMenu.show({item:item,positionTo:button,edit:!1,editImages:!0,editSubtitles:!0,sync:!1,share:!1,play:!1,queue:!1,user:user}).then(function(result){result.deleted?afterDeleted(context,item):result.updated&&reload(context,item.Id,item.ServerId)})})}function afterDeleted(context,item){var parentId=item.ParentId||item.SeasonId||item.SeriesId;parentId?reload(context,parentId,item.ServerId):require(["appRouter"],function(appRouter){appRouter.goHome()})}function onEditorClick(e){var btnRemoveFromEditorList=dom.parentWithClass(e.target,"btnRemoveFromEditorList");if(btnRemoveFromEditorList)return void removeElementFromList(btnRemoveFromEditorList);var btnAddTextItem=dom.parentWithClass(e.target,"btnAddTextItem");btnAddTextItem&&addElementToList(btnAddTextItem)}function getApiClient(){return connectionManager.getApiClient(currentItem.ServerId)}function init(context,apiClient){context.querySelector(".externalIds").addEventListener("click",function(e){var btnOpenExternalId=dom.parentWithClass(e.target,"btnOpenExternalId");if(btnOpenExternalId){var field=context.querySelector("#"+btnOpenExternalId.getAttribute("data-fieldid")),formatString=field.getAttribute("data-formatstring");field.value&&shell.openUrl(formatString.replace("{0}",field.value))}}),context.querySelector(".btnCancel").addEventListener("click",function(){closeDialog(!1)}),context.querySelector(".btnMore").addEventListener("click",function(e){getApiClient().getCurrentUser().then(function(user){showMoreMenu(context,e.target,user)})}),context.querySelector(".btnHeaderSave").addEventListener("click",function(e){context.querySelector(".btnSave").click()}),context.querySelector("#chkLockData").addEventListener("click",function(e){e.target.checked?hideElement(".providerSettingsContainer"):showElement(".providerSettingsContainer")}),context.removeEventListener("click",onEditorClick),context.addEventListener("click",onEditorClick);var form=context.querySelector("form");form.removeEventListener("submit",onSubmit),form.addEventListener("submit",onSubmit),context.querySelector("#btnAddPerson").addEventListener("click",function(event,data){editPerson(context,{},-1)}),context.querySelector("#peopleList").addEventListener("click",function(e){var index,btnDeletePerson=dom.parentWithClass(e.target,"btnDeletePerson");btnDeletePerson&&(index=parseInt(btnDeletePerson.getAttribute("data-index")),currentItem.People.splice(index,1),populatePeople(context,currentItem.People));var btnEditPerson=dom.parentWithClass(e.target,"btnEditPerson");btnEditPerson&&(index=parseInt(btnEditPerson.getAttribute("data-index")),editPerson(context,currentItem.People[index],index))})}function getItem(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getItem(apiClient.getCurrentUserId(),itemId):apiClient.getRootFolder(apiClient.getCurrentUserId())}function getEditorConfig(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getJSON(apiClient.getUrl("Items/"+itemId+"/MetadataEditor")):Promise.resolve({})}function populateCountries(select,allCountries){var html="";html+="";for(var i=0,length=allCountries.length;i"+culture.DisplayName+""}select.innerHTML=html}function populateLanguages(select,languages){var html="";html+="";for(var i=0,length=languages.length;i"+culture.DisplayName+""}select.innerHTML=html}function renderContentTypeOptions(context,metadataInfo){metadataInfo.ContentTypeOptions.length?showElement("#fldContentType",context):hideElement("#fldContentType",context);var html=metadataInfo.ContentTypeOptions.map(function(i){return'"}).join(""),selectEl=context.querySelector("#selectContentType");selectEl.innerHTML=html,selectEl.value=metadataInfo.ContentType||""}function loadExternalIds(context,item,externalIds){for(var html="",providerIds=item.ProviderIds||{},i=0,length=externalIds.length;i',html+='
';var value=providerIds[idInfo.Key]||"";html+='
',html+='',html+="
",formatString&&(html+=''),html+="
",html+="
"}context.querySelector(".externalIds",context).innerHTML=html,externalIds.length?context.querySelector(".externalIdsSection").classList.remove("hide"):context.querySelector(".externalIdsSection").classList.add("hide")}function hideElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.add("hide")})}else selector.classList.add("hide")}function showElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.remove("hide")})}else selector.classList.remove("hide")}function setFieldVisibilities(context,item){item.Path&&!1!==item.EnableMediaSourceDisplay?showElement("#fldPath",context):hideElement("#fldPath",context),"Series"===item.Type||"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldOriginalName",context):hideElement("#fldOriginalName",context),"Series"===item.Type?showElement("#fldSeriesRuntime",context):hideElement("#fldSeriesRuntime",context),"Series"===item.Type||"Person"===item.Type?showElement("#fldEndDate",context):hideElement("#fldEndDate",context),"MusicAlbum"===item.Type?showElement("#albumAssociationMessage",context):hideElement("#albumAssociationMessage",context),"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldCriticRating",context):hideElement("#fldCriticRating",context),"Series"===item.Type?(showElement("#fldStatus",context),showElement("#fldAirDays",context),showElement("#fldAirTime",context)):(hideElement("#fldStatus",context),hideElement("#fldAirDays",context),hideElement("#fldAirTime",context)),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fld3dFormat",context):hideElement("#fld3dFormat",context),"Audio"===item.Type?showElement("#fldAlbumArtist",context):hideElement("#fldAlbumArtist",context),"Audio"===item.Type||"MusicVideo"===item.Type?(showElement("#fldArtist",context),showElement("#fldAlbum",context)):(hideElement("#fldArtist",context),hideElement("#fldAlbum",context)),"Episode"===item.Type&&0===item.ParentIndexNumber?showElement("#collapsibleSpecialEpisodeInfo",context):hideElement("#collapsibleSpecialEpisodeInfo",context),"Person"===item.Type||"Genre"===item.Type||"Studio"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"TvChannel"===item.Type||"Book"===item.Type?hideElement("#peopleCollapsible",context):showElement("#peopleCollapsible",context),"Person"===item.Type||"Genre"===item.Type||"Studio"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"TvChannel"===item.Type?(hideElement("#fldCommunityRating",context),hideElement("#genresCollapsible",context),hideElement("#studiosCollapsible",context),"TvChannel"===item.Type?showElement("#fldOfficialRating",context):hideElement("#fldOfficialRating",context),hideElement("#fldCustomRating",context)):(showElement("#fldCommunityRating",context),showElement("#genresCollapsible",context),showElement("#studiosCollapsible",context),showElement("#fldOfficialRating",context),showElement("#fldCustomRating",context)),showElement("#tagsCollapsible",context),"TvChannel"===item.Type?(hideElement("#metadataSettingsCollapsible",context),hideElement("#fldPremiereDate",context),hideElement("#fldDateAdded",context),hideElement("#fldYear",context)):(showElement("#metadataSettingsCollapsible",context),showElement("#fldPremiereDate",context),showElement("#fldDateAdded",context),showElement("#fldYear",context)),"TvChannel"===item.Type?hideElement(".overviewContainer",context):showElement(".overviewContainer",context),"TvChannel"===item.Type?hideElement(".websiteFieldContainer",context):showElement(".websiteFieldContainer",context),"Person"===item.Type?(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelBirthYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelBirthDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelDeathDate")),showElement("#fldPlaceOfBirth")):(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelReleaseDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelEndDate")),hideElement("#fldPlaceOfBirth")),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fldOriginalAspectRatio"):hideElement("#fldOriginalAspectRatio"),"Audio"===item.Type||"Episode"===item.Type||"Season"===item.Type?(showElement("#fldIndexNumber"),"Episode"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelEpisodeNumber")):"Season"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelTrackNumber")):context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelNumber"))):hideElement("#fldIndexNumber"),"Audio"===item.Type||"Episode"===item.Type?(showElement("#fldParentIndexNumber"),"Episode"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelDiscNumber")):context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelParentNumber"))):hideElement("#fldParentIndexNumber",context),"BoxSet"===item.Type?(showElement("#fldDisplayOrder",context),hideElement(".seriesDisplayOrderDescription",context),context.querySelector("#selectDisplayOrder").innerHTML='"):"Series"===item.Type?(showElement("#fldDisplayOrder",context),showElement(".seriesDisplayOrderDescription",context),context.querySelector("#selectDisplayOrder").innerHTML=''):(context.querySelector("#selectDisplayOrder").innerHTML="",hideElement("#fldDisplayOrder",context))}function fillItemInfo(context,item,parentalRatingOptions){var select=context.querySelector("#selectOfficialRating");populateRatings(parentalRatingOptions,select,item.OfficialRating),select.value=item.OfficialRating||"",select=context.querySelector("#selectCustomRating"),populateRatings(parentalRatingOptions,select,item.CustomRating),select.value=item.CustomRating||"";var selectStatus=context.querySelector("#selectStatus");populateStatus(selectStatus),selectStatus.value=item.Status||"",context.querySelector("#select3dFormat",context).value=item.Video3DFormat||"",Array.prototype.forEach.call(context.querySelectorAll(".chkAirDay",context),function(el){el.checked=-1!==(item.AirDays||[]).indexOf(el.getAttribute("data-day"))}),populateListView(context.querySelector("#listGenres"),item.Genres),populatePeople(context,item.People||[]),populateListView(context.querySelector("#listStudios"),(item.Studios||[]).map(function(element){return element.Name||""})),populateListView(context.querySelector("#listTags"),item.Tags);var lockData=item.LockData||!1,chkLockData=context.querySelector("#chkLockData");chkLockData.checked=lockData,chkLockData.checked?hideElement(".providerSettingsContainer",context):showElement(".providerSettingsContainer",context),fillMetadataSettings(context,item,item.LockedFields),context.querySelector("#txtPath").value=item.Path||"",context.querySelector("#txtName").value=item.Name||"",context.querySelector("#txtOriginalName").value=item.OriginalTitle||"",context.querySelector("#txtOverview").value=item.Overview||"",context.querySelector("#txtTagline").value=item.Taglines&&item.Taglines.length?item.Taglines[0]:"",context.querySelector("#txtSortName").value=item.ForcedSortName||"",context.querySelector("#txtCommunityRating").value=item.CommunityRating||"",context.querySelector("#txtHomePageUrl").value=item.HomePageUrl||"",context.querySelector("#txtCriticRating").value=item.CriticRating||"",context.querySelector("#txtIndexNumber").value=null==item.IndexNumber?"":item.IndexNumber,context.querySelector("#txtParentIndexNumber").value=null==item.ParentIndexNumber?"":item.ParentIndexNumber,context.querySelector("#txtAirsBeforeSeason").value="AirsBeforeSeasonNumber"in item?item.AirsBeforeSeasonNumber:"",context.querySelector("#txtAirsAfterSeason").value="AirsAfterSeasonNumber"in item?item.AirsAfterSeasonNumber:"",context.querySelector("#txtAirsBeforeEpisode").value="AirsBeforeEpisodeNumber"in item?item.AirsBeforeEpisodeNumber:"",context.querySelector("#txtAlbum").value=item.Album||"",context.querySelector("#txtAlbumArtist").value=(item.AlbumArtists||[]).map(function(a){return a.Name}).join(";"),item.Type,context.querySelector("#selectDisplayOrder").value=item.DisplayOrder||"",context.querySelector("#txtArtist").value=(item.ArtistItems||[]).map(function(a){return a.Name}).join(";");var date;if(item.DateCreated)try{date=datetime.parseISO8601Date(item.DateCreated,!0),context.querySelector("#txtDateAdded").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtDateAdded").value=""}else context.querySelector("#txtDateAdded").value="";if(item.PremiereDate)try{date=datetime.parseISO8601Date(item.PremiereDate,!0),context.querySelector("#txtPremiereDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtPremiereDate").value=""}else context.querySelector("#txtPremiereDate").value="";if(item.EndDate)try{date=datetime.parseISO8601Date(item.EndDate,!0),context.querySelector("#txtEndDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtEndDate").value=""}else context.querySelector("#txtEndDate").value="";context.querySelector("#txtProductionYear").value=item.ProductionYear||"",context.querySelector("#txtAirTime").value=item.AirTime||"";var placeofBirth=item.ProductionLocations&&item.ProductionLocations.length?item.ProductionLocations[0]:"";if(context.querySelector("#txtPlaceOfBirth").value=placeofBirth,context.querySelector("#txtOriginalAspectRatio").value=item.AspectRatio||"",context.querySelector("#selectLanguage").value=item.PreferredMetadataLanguage||"",context.querySelector("#selectCountry").value=item.PreferredMetadataCountryCode||"",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;context.querySelector("#txtSeriesRuntime").value=Math.round(minutes)}else context.querySelector("#txtSeriesRuntime",context).value=""}function populateRatings(allParentalRatings,select,currentValue){var html="";html+="";var i,length,rating,ratings=[],currentValueFound=!1;for(i=0,length=allParentalRatings.length;i"+rating.Name+"";select.innerHTML=html}function populateStatus(select){var html="";html+="",html+="",html+="",select.innerHTML=html}function populateListView(list,items,sortCallback){items=items||[],void 0===sortCallback?items.sort(function(a,b){return a.toLowerCase().localeCompare(b.toLowerCase())}):items=sortCallback(items);for(var html="",i=0;i',html+='live_tv',html+='
',html+='
',html+=items[i],html+="
",html+="
",html+='',html+="";list.innerHTML=html}function populatePeople(context,people){for(var html="",elem=context.querySelector("#peopleList"),i=0,length=people.length;i',html+='person',html+='
',html+='",html+="
",html+='',html+=""}elem.innerHTML=html}function getLockedFieldsHtml(fields,currentFields){for(var html="",i=0;i",html+=""+name+"",html+=""}return html}function fillMetadataSettings(context,item,lockedFields){var container=context.querySelector(".providerSettingsContainer");lockedFields=lockedFields||[];var lockedFieldsList=[{name:globalize.translate("sharedcomponents#Name"),value:"Name"},{name:globalize.translate("sharedcomponents#Overview"),value:"Overview"},{name:globalize.translate("sharedcomponents#Genres"),value:"Genres"},{name:globalize.translate("sharedcomponents#ParentalRating"),value:"OfficialRating"},{name:globalize.translate("sharedcomponents#People"),value:"Cast"}];"Person"===item.Type?lockedFieldsList.push({name:globalize.translate("sharedcomponents#BirthLocation"),value:"ProductionLocations"}):lockedFieldsList.push({name:globalize.translate("sharedcomponents#ProductionLocations"),value:"ProductionLocations"}),"Series"===item.Type&&lockedFieldsList.push({name:globalize.translate("Runtime"),value:"Runtime"}),lockedFieldsList.push({name:globalize.translate("sharedcomponents#Studios"),value:"Studios"}),lockedFieldsList.push({name:globalize.translate("sharedcomponents#Tags"),value:"Tags"});var html="";html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFields")+"

",html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFieldsHelp")+"

",html+=getLockedFieldsHtml(lockedFieldsList,lockedFields),container.innerHTML=html}function reload(context,itemId,serverId){loading.show(),Promise.all([getItem(itemId,serverId),getEditorConfig(itemId,serverId)]).then(function(responses){var item=responses[0];metadataEditorInfo=responses[1],currentItem=item;var languages=metadataEditorInfo.Cultures,countries=metadataEditorInfo.Countries;renderContentTypeOptions(context,metadataEditorInfo),loadExternalIds(context,item,metadataEditorInfo.ExternalIdInfos),populateLanguages(context.querySelector("#selectLanguage"),languages),populateCountries(context.querySelector("#selectCountry"),countries),setFieldVisibilities(context,item),fillItemInfo(context,item,metadataEditorInfo.ParentalRatingOptions),"Video"===item.MediaType&&"Episode"!==item.Type&&"TvChannel"!==item.Type?showElement("#fldTagline",context):hideElement("#fldTagline",context),loading.hide()})}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function show(itemId,serverId,resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){var dialogOptions={removeOnClose:!0,scrollY:!1};layoutManager.tv?dialogOptions.size="fullscreen":dialogOptions.size="medium-tall";var dlg=dialogHelper.createDialog(dialogOptions);dlg.classList.add("formDialog");var html="";html+=globalize.translateDocument(template,"sharedcomponents"),dlg.innerHTML=html,layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0),dialogHelper.open(dlg),dlg.addEventListener("close",function(){layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1),resolve()}),currentContext=dlg,init(dlg,connectionManager.getApiClient(serverId)),reload(dlg,itemId,serverId)})}var currentContext,metadataEditorInfo,currentItem;return{show:function(itemId,serverId){return new Promise(function(resolve,reject){return show(itemId,serverId,resolve,reject)})},embed:function(elem,itemId,serverId){return new Promise(function(resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){elem.innerHTML=globalize.translateDocument(template,"sharedcomponents"),elem.querySelector(".formDialogFooter").classList.remove("formDialogFooter"),elem.querySelector(".btnHeaderSave").classList.remove("hide"),elem.querySelector(".btnCancel").classList.add("hide"),currentContext=elem,init(elem,connectionManager.getApiClient(serverId)),reload(elem,itemId,serverId),focusManager.autoFocus(elem)})})}}}); \ No newline at end of file +define(["itemHelper","dom","layoutManager","dialogHelper","datetime","loading","focusManager","connectionManager","globalize","require","shell","emby-checkbox","emby-input","emby-select","listViewStyle","emby-textarea","emby-button","paper-icon-button-light","css!./../formdialog","clearButtonStyle","flexStyles"],function(itemHelper,dom,layoutManager,dialogHelper,datetime,loading,focusManager,connectionManager,globalize,require,shell){"use strict";function isDialog(){return currentContext.classList.contains("dialog")}function closeDialog(isSubmitted){isDialog()&&dialogHelper.close(currentContext)}function submitUpdatedItem(form,item){function afterContentTypeUpdated(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#MessageItemSaved"))}),loading.hide(),closeDialog(!0)}var apiClient=getApiClient();apiClient.updateItem(item).then(function(){var newContentType=form.querySelector("#selectContentType").value||"";(metadataEditorInfo.ContentType||"")!==newContentType?apiClient.ajax({url:apiClient.getUrl("Items/"+item.Id+"/ContentType",{ContentType:newContentType}),type:"POST"}).then(function(){afterContentTypeUpdated()}):afterContentTypeUpdated()})}function getSelectedAirDays(form){var checkedItems=form.querySelectorAll(".chkAirDay:checked")||[];return Array.prototype.map.call(checkedItems,function(c){return c.getAttribute("data-day")})}function getAlbumArtists(form){return form.querySelector("#txtAlbumArtist").value.trim().split(";").filter(function(s){return s.length>0}).map(function(a){return{Name:a}})}function getArtists(form){return form.querySelector("#txtArtist").value.trim().split(";").filter(function(s){return s.length>0}).map(function(a){return{Name:a}})}function getDateValue(form,element,property){var val=form.querySelector(element).value;if(!val)return null;if(currentItem[property]){var date=datetime.parseISO8601Date(currentItem[property],!0),parts=date.toISOString().split("T");if(0===parts[0].indexOf(val)){val+="T"+parts[1]}}return val}function onSubmit(e){loading.show();var form=this,item={Id:currentItem.Id,Name:form.querySelector("#txtName").value,OriginalTitle:form.querySelector("#txtOriginalName").value,ForcedSortName:form.querySelector("#txtSortName").value,CommunityRating:form.querySelector("#txtCommunityRating").value,CriticRating:form.querySelector("#txtCriticRating").value,IndexNumber:form.querySelector("#txtIndexNumber").value||null,AirsBeforeSeasonNumber:form.querySelector("#txtAirsBeforeSeason").value,AirsAfterSeasonNumber:form.querySelector("#txtAirsAfterSeason").value,AirsBeforeEpisodeNumber:form.querySelector("#txtAirsBeforeEpisode").value,ParentIndexNumber:form.querySelector("#txtParentIndexNumber").value||null,DisplayOrder:form.querySelector("#selectDisplayOrder").value,Album:form.querySelector("#txtAlbum").value,AlbumArtists:getAlbumArtists(form),ArtistItems:getArtists(form),Overview:form.querySelector("#txtOverview").value,Status:form.querySelector("#selectStatus").value,AirDays:getSelectedAirDays(form),AirTime:form.querySelector("#txtAirTime").value,Genres:getListValues(form.querySelector("#listGenres")),Tags:getListValues(form.querySelector("#listTags")),Studios:getListValues(form.querySelector("#listStudios")).map(function(element){return{Name:element}}),PremiereDate:getDateValue(form,"#txtPremiereDate","PremiereDate"),DateCreated:getDateValue(form,"#txtDateAdded","DateCreated"),EndDate:getDateValue(form,"#txtEndDate","EndDate"),ProductionYear:form.querySelector("#txtProductionYear").value,AspectRatio:form.querySelector("#txtOriginalAspectRatio").value,Video3DFormat:form.querySelector("#select3dFormat").value,OfficialRating:form.querySelector("#selectOfficialRating").value,CustomRating:form.querySelector("#selectCustomRating").value,People:currentItem.People,LockData:form.querySelector("#chkLockData").checked,LockedFields:Array.prototype.filter.call(form.querySelectorAll(".selectLockedField"),function(c){return!c.checked}).map(function(c){return c.getAttribute("data-value")})};item.ProviderIds=Object.assign({},currentItem.ProviderIds);var idElements=form.querySelectorAll(".txtExternalId");if(Array.prototype.map.call(idElements,function(idElem){var providerKey=idElem.getAttribute("data-providerkey");item.ProviderIds[providerKey]=idElem.value}),item.PreferredMetadataLanguage=form.querySelector("#selectLanguage").value,item.PreferredMetadataCountryCode=form.querySelector("#selectCountry").value,"Person"===currentItem.Type){var placeOfBirth=form.querySelector("#txtPlaceOfBirth").value;item.ProductionLocations=placeOfBirth?[placeOfBirth]:[]}if("Series"===currentItem.Type){var seriesRuntime=form.querySelector("#txtSeriesRuntime").value;item.RunTimeTicks=seriesRuntime?6e8*seriesRuntime:null}var tagline=form.querySelector("#txtTagline").value;return item.Taglines=tagline?[tagline]:[],submitUpdatedItem(form,item),e.preventDefault(),e.stopPropagation(),!1}function getListValues(list){return Array.prototype.map.call(list.querySelectorAll(".textValue"),function(el){return el.textContent})}function addElementToList(source,sortCallback){require(["prompt"],function(prompt){prompt({label:"Value:"}).then(function(text){var list=dom.parentWithClass(source,"editableListviewContainer").querySelector(".paperList"),items=getListValues(list);items.push(text),populateListView(list,items,sortCallback)})})}function removeElementFromList(source){var el=dom.parentWithClass(source,"listItem");el.parentNode.removeChild(el)}function editPerson(context,person,index){require(["personEditor"],function(personEditor){personEditor.show(person).then(function(updatedPerson){-1===index&¤tItem.People.push(updatedPerson),populatePeople(context,currentItem.People)})})}function showMoreMenu(context,button,user){require(["itemContextMenu"],function(itemContextMenu){var item=currentItem;itemContextMenu.show({item:item,positionTo:button,edit:!1,editImages:!0,editSubtitles:!0,sync:!1,share:!1,play:!1,queue:!1,user:user}).then(function(result){result.deleted?afterDeleted(context,item):result.updated&&reload(context,item.Id,item.ServerId)})})}function afterDeleted(context,item){var parentId=item.ParentId||item.SeasonId||item.SeriesId;parentId?reload(context,parentId,item.ServerId):require(["appRouter"],function(appRouter){appRouter.goHome()})}function onEditorClick(e){var btnRemoveFromEditorList=dom.parentWithClass(e.target,"btnRemoveFromEditorList");if(btnRemoveFromEditorList)return void removeElementFromList(btnRemoveFromEditorList);var btnAddTextItem=dom.parentWithClass(e.target,"btnAddTextItem");btnAddTextItem&&addElementToList(btnAddTextItem)}function getApiClient(){return connectionManager.getApiClient(currentItem.ServerId)}function init(context,apiClient){context.querySelector(".externalIds").addEventListener("click",function(e){var btnOpenExternalId=dom.parentWithClass(e.target,"btnOpenExternalId");if(btnOpenExternalId){var field=context.querySelector("#"+btnOpenExternalId.getAttribute("data-fieldid")),formatString=field.getAttribute("data-formatstring");field.value&&shell.openUrl(formatString.replace("{0}",field.value))}}),context.querySelector(".btnCancel").addEventListener("click",function(){closeDialog(!1)}),context.querySelector(".btnMore").addEventListener("click",function(e){getApiClient().getCurrentUser().then(function(user){showMoreMenu(context,e.target,user)})}),context.querySelector(".btnHeaderSave").addEventListener("click",function(e){context.querySelector(".btnSave").click()}),context.querySelector("#chkLockData").addEventListener("click",function(e){e.target.checked?hideElement(".providerSettingsContainer"):showElement(".providerSettingsContainer")}),context.removeEventListener("click",onEditorClick),context.addEventListener("click",onEditorClick);var form=context.querySelector("form");form.removeEventListener("submit",onSubmit),form.addEventListener("submit",onSubmit),context.querySelector("#btnAddPerson").addEventListener("click",function(event,data){editPerson(context,{},-1)}),context.querySelector("#peopleList").addEventListener("click",function(e){var index,btnDeletePerson=dom.parentWithClass(e.target,"btnDeletePerson");btnDeletePerson&&(index=parseInt(btnDeletePerson.getAttribute("data-index")),currentItem.People.splice(index,1),populatePeople(context,currentItem.People));var btnEditPerson=dom.parentWithClass(e.target,"btnEditPerson");btnEditPerson&&(index=parseInt(btnEditPerson.getAttribute("data-index")),editPerson(context,currentItem.People[index],index))})}function getItem(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getItem(apiClient.getCurrentUserId(),itemId):apiClient.getRootFolder(apiClient.getCurrentUserId())}function getEditorConfig(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getJSON(apiClient.getUrl("Items/"+itemId+"/MetadataEditor")):Promise.resolve({})}function populateCountries(select,allCountries){var html="";html+="";for(var i=0,length=allCountries.length;i"+culture.DisplayName+""}select.innerHTML=html}function populateLanguages(select,languages){var html="";html+="";for(var i=0,length=languages.length;i"+culture.DisplayName+""}select.innerHTML=html}function renderContentTypeOptions(context,metadataInfo){metadataInfo.ContentTypeOptions.length?showElement("#fldContentType",context):hideElement("#fldContentType",context);var html=metadataInfo.ContentTypeOptions.map(function(i){return'"}).join(""),selectEl=context.querySelector("#selectContentType");selectEl.innerHTML=html,selectEl.value=metadataInfo.ContentType||""}function loadExternalIds(context,item,externalIds){for(var html="",providerIds=item.ProviderIds||{},i=0,length=externalIds.length;i',html+='
';var value=providerIds[idInfo.Key]||"";html+='
',html+='',html+="
",formatString&&(html+=''),html+="
",html+=""}context.querySelector(".externalIds",context).innerHTML=html,externalIds.length?context.querySelector(".externalIdsSection").classList.remove("hide"):context.querySelector(".externalIdsSection").classList.add("hide")}function hideElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.add("hide")})}else selector.classList.add("hide")}function showElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.remove("hide")})}else selector.classList.remove("hide")}function setFieldVisibilities(context,item){item.Path&&!1!==item.EnableMediaSourceDisplay?showElement("#fldPath",context):hideElement("#fldPath",context),"Series"===item.Type||"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldOriginalName",context):hideElement("#fldOriginalName",context),"Series"===item.Type?showElement("#fldSeriesRuntime",context):hideElement("#fldSeriesRuntime",context),"Series"===item.Type||"Person"===item.Type?showElement("#fldEndDate",context):hideElement("#fldEndDate",context),"MusicAlbum"===item.Type?showElement("#albumAssociationMessage",context):hideElement("#albumAssociationMessage",context),"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldCriticRating",context):hideElement("#fldCriticRating",context),"Series"===item.Type?(showElement("#fldStatus",context),showElement("#fldAirDays",context),showElement("#fldAirTime",context)):(hideElement("#fldStatus",context),hideElement("#fldAirDays",context),hideElement("#fldAirTime",context)),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fld3dFormat",context):hideElement("#fld3dFormat",context),"Audio"===item.Type?showElement("#fldAlbumArtist",context):hideElement("#fldAlbumArtist",context),"Audio"===item.Type||"MusicVideo"===item.Type?(showElement("#fldArtist",context),showElement("#fldAlbum",context)):(hideElement("#fldArtist",context),hideElement("#fldAlbum",context)),"Episode"===item.Type&&0===item.ParentIndexNumber?showElement("#collapsibleSpecialEpisodeInfo",context):hideElement("#collapsibleSpecialEpisodeInfo",context),"Person"===item.Type||"Genre"===item.Type||"Studio"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"TvChannel"===item.Type||"Book"===item.Type?hideElement("#peopleCollapsible",context):showElement("#peopleCollapsible",context),"Person"===item.Type||"Genre"===item.Type||"Studio"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"TvChannel"===item.Type?(hideElement("#fldCommunityRating",context),hideElement("#genresCollapsible",context),hideElement("#studiosCollapsible",context),"TvChannel"===item.Type?showElement("#fldOfficialRating",context):hideElement("#fldOfficialRating",context),hideElement("#fldCustomRating",context)):(showElement("#fldCommunityRating",context),showElement("#genresCollapsible",context),showElement("#studiosCollapsible",context),showElement("#fldOfficialRating",context),showElement("#fldCustomRating",context)),showElement("#tagsCollapsible",context),"TvChannel"===item.Type?(hideElement("#metadataSettingsCollapsible",context),hideElement("#fldPremiereDate",context),hideElement("#fldDateAdded",context),hideElement("#fldYear",context)):(showElement("#metadataSettingsCollapsible",context),showElement("#fldPremiereDate",context),showElement("#fldDateAdded",context),showElement("#fldYear",context)),"TvChannel"===item.Type?hideElement(".overviewContainer",context):showElement(".overviewContainer",context),"Person"===item.Type?(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelBirthYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelBirthDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelDeathDate")),showElement("#fldPlaceOfBirth")):(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelReleaseDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelEndDate")),hideElement("#fldPlaceOfBirth")),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fldOriginalAspectRatio"):hideElement("#fldOriginalAspectRatio"),"Audio"===item.Type||"Episode"===item.Type||"Season"===item.Type?(showElement("#fldIndexNumber"),"Episode"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelEpisodeNumber")):"Season"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelTrackNumber")):context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelNumber"))):hideElement("#fldIndexNumber"),"Audio"===item.Type||"Episode"===item.Type?(showElement("#fldParentIndexNumber"),"Episode"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelDiscNumber")):context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelParentNumber"))):hideElement("#fldParentIndexNumber",context),"BoxSet"===item.Type?(showElement("#fldDisplayOrder",context),hideElement(".seriesDisplayOrderDescription",context),context.querySelector("#selectDisplayOrder").innerHTML='"):"Series"===item.Type?(showElement("#fldDisplayOrder",context),showElement(".seriesDisplayOrderDescription",context),context.querySelector("#selectDisplayOrder").innerHTML=''):(context.querySelector("#selectDisplayOrder").innerHTML="",hideElement("#fldDisplayOrder",context))}function fillItemInfo(context,item,parentalRatingOptions){var select=context.querySelector("#selectOfficialRating");populateRatings(parentalRatingOptions,select,item.OfficialRating),select.value=item.OfficialRating||"",select=context.querySelector("#selectCustomRating"),populateRatings(parentalRatingOptions,select,item.CustomRating),select.value=item.CustomRating||"";var selectStatus=context.querySelector("#selectStatus");populateStatus(selectStatus),selectStatus.value=item.Status||"",context.querySelector("#select3dFormat",context).value=item.Video3DFormat||"",Array.prototype.forEach.call(context.querySelectorAll(".chkAirDay",context),function(el){el.checked=-1!==(item.AirDays||[]).indexOf(el.getAttribute("data-day"))}),populateListView(context.querySelector("#listGenres"),item.Genres),populatePeople(context,item.People||[]),populateListView(context.querySelector("#listStudios"),(item.Studios||[]).map(function(element){return element.Name||""})),populateListView(context.querySelector("#listTags"),item.Tags);var lockData=item.LockData||!1,chkLockData=context.querySelector("#chkLockData");chkLockData.checked=lockData,chkLockData.checked?hideElement(".providerSettingsContainer",context):showElement(".providerSettingsContainer",context),fillMetadataSettings(context,item,item.LockedFields),context.querySelector("#txtPath").value=item.Path||"",context.querySelector("#txtName").value=item.Name||"",context.querySelector("#txtOriginalName").value=item.OriginalTitle||"",context.querySelector("#txtOverview").value=item.Overview||"",context.querySelector("#txtTagline").value=item.Taglines&&item.Taglines.length?item.Taglines[0]:"",context.querySelector("#txtSortName").value=item.ForcedSortName||"",context.querySelector("#txtCommunityRating").value=item.CommunityRating||"",context.querySelector("#txtCriticRating").value=item.CriticRating||"",context.querySelector("#txtIndexNumber").value=null==item.IndexNumber?"":item.IndexNumber,context.querySelector("#txtParentIndexNumber").value=null==item.ParentIndexNumber?"":item.ParentIndexNumber,context.querySelector("#txtAirsBeforeSeason").value="AirsBeforeSeasonNumber"in item?item.AirsBeforeSeasonNumber:"",context.querySelector("#txtAirsAfterSeason").value="AirsAfterSeasonNumber"in item?item.AirsAfterSeasonNumber:"",context.querySelector("#txtAirsBeforeEpisode").value="AirsBeforeEpisodeNumber"in item?item.AirsBeforeEpisodeNumber:"",context.querySelector("#txtAlbum").value=item.Album||"",context.querySelector("#txtAlbumArtist").value=(item.AlbumArtists||[]).map(function(a){return a.Name}).join(";"),item.Type,context.querySelector("#selectDisplayOrder").value=item.DisplayOrder||"",context.querySelector("#txtArtist").value=(item.ArtistItems||[]).map(function(a){return a.Name}).join(";");var date;if(item.DateCreated)try{date=datetime.parseISO8601Date(item.DateCreated,!0),context.querySelector("#txtDateAdded").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtDateAdded").value=""}else context.querySelector("#txtDateAdded").value="";if(item.PremiereDate)try{date=datetime.parseISO8601Date(item.PremiereDate,!0),context.querySelector("#txtPremiereDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtPremiereDate").value=""}else context.querySelector("#txtPremiereDate").value="";if(item.EndDate)try{date=datetime.parseISO8601Date(item.EndDate,!0),context.querySelector("#txtEndDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtEndDate").value=""}else context.querySelector("#txtEndDate").value="";context.querySelector("#txtProductionYear").value=item.ProductionYear||"",context.querySelector("#txtAirTime").value=item.AirTime||"";var placeofBirth=item.ProductionLocations&&item.ProductionLocations.length?item.ProductionLocations[0]:"";if(context.querySelector("#txtPlaceOfBirth").value=placeofBirth,context.querySelector("#txtOriginalAspectRatio").value=item.AspectRatio||"",context.querySelector("#selectLanguage").value=item.PreferredMetadataLanguage||"",context.querySelector("#selectCountry").value=item.PreferredMetadataCountryCode||"",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;context.querySelector("#txtSeriesRuntime").value=Math.round(minutes)}else context.querySelector("#txtSeriesRuntime",context).value=""}function populateRatings(allParentalRatings,select,currentValue){var html="";html+="";var i,length,rating,ratings=[],currentValueFound=!1;for(i=0,length=allParentalRatings.length;i"+rating.Name+"";select.innerHTML=html}function populateStatus(select){var html="";html+="",html+="",html+="",select.innerHTML=html}function populateListView(list,items,sortCallback){items=items||[],void 0===sortCallback?items.sort(function(a,b){return a.toLowerCase().localeCompare(b.toLowerCase())}):items=sortCallback(items);for(var html="",i=0;i',html+='live_tv',html+='
',html+='
',html+=items[i],html+="
",html+="
",html+='',html+="";list.innerHTML=html}function populatePeople(context,people){for(var html="",elem=context.querySelector("#peopleList"),i=0,length=people.length;i',html+='person',html+='
',html+='",html+="
",html+='',html+=""}elem.innerHTML=html}function getLockedFieldsHtml(fields,currentFields){for(var html="",i=0;i",html+=""+name+"",html+=""}return html}function fillMetadataSettings(context,item,lockedFields){var container=context.querySelector(".providerSettingsContainer");lockedFields=lockedFields||[];var lockedFieldsList=[{name:globalize.translate("sharedcomponents#Name"),value:"Name"},{name:globalize.translate("sharedcomponents#Overview"),value:"Overview"},{name:globalize.translate("sharedcomponents#Genres"),value:"Genres"},{name:globalize.translate("sharedcomponents#ParentalRating"),value:"OfficialRating"},{name:globalize.translate("sharedcomponents#People"),value:"Cast"}];"Person"===item.Type?lockedFieldsList.push({name:globalize.translate("sharedcomponents#BirthLocation"),value:"ProductionLocations"}):lockedFieldsList.push({name:globalize.translate("sharedcomponents#ProductionLocations"),value:"ProductionLocations"}),"Series"===item.Type&&lockedFieldsList.push({name:globalize.translate("Runtime"),value:"Runtime"}),lockedFieldsList.push({name:globalize.translate("sharedcomponents#Studios"),value:"Studios"}),lockedFieldsList.push({name:globalize.translate("sharedcomponents#Tags"),value:"Tags"});var html="";html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFields")+"

",html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFieldsHelp")+"

",html+=getLockedFieldsHtml(lockedFieldsList,lockedFields),container.innerHTML=html}function reload(context,itemId,serverId){loading.show(),Promise.all([getItem(itemId,serverId),getEditorConfig(itemId,serverId)]).then(function(responses){var item=responses[0];metadataEditorInfo=responses[1],currentItem=item;var languages=metadataEditorInfo.Cultures,countries=metadataEditorInfo.Countries;renderContentTypeOptions(context,metadataEditorInfo),loadExternalIds(context,item,metadataEditorInfo.ExternalIdInfos),populateLanguages(context.querySelector("#selectLanguage"),languages),populateCountries(context.querySelector("#selectCountry"),countries),setFieldVisibilities(context,item),fillItemInfo(context,item,metadataEditorInfo.ParentalRatingOptions),"Video"===item.MediaType&&"Episode"!==item.Type&&"TvChannel"!==item.Type?showElement("#fldTagline",context):hideElement("#fldTagline",context),loading.hide()})}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function show(itemId,serverId,resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){var dialogOptions={removeOnClose:!0,scrollY:!1};layoutManager.tv?dialogOptions.size="fullscreen":dialogOptions.size="medium-tall";var dlg=dialogHelper.createDialog(dialogOptions);dlg.classList.add("formDialog");var html="";html+=globalize.translateDocument(template,"sharedcomponents"),dlg.innerHTML=html,layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0),dialogHelper.open(dlg),dlg.addEventListener("close",function(){layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1),resolve()}),currentContext=dlg,init(dlg,connectionManager.getApiClient(serverId)),reload(dlg,itemId,serverId)})}var currentContext,metadataEditorInfo,currentItem;return{show:function(itemId,serverId){return new Promise(function(resolve,reject){return show(itemId,serverId,resolve,reject)})},embed:function(elem,itemId,serverId){return new Promise(function(resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){elem.innerHTML=globalize.translateDocument(template,"sharedcomponents"),elem.querySelector(".formDialogFooter").classList.remove("formDialogFooter"),elem.querySelector(".btnHeaderSave").classList.remove("hide"),elem.querySelector(".btnCancel").classList.add("hide"),currentContext=elem,init(elem,connectionManager.getApiClient(serverId)),reload(elem,itemId,serverId),focusManager.autoFocus(elem)})})}}}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.template.html b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.template.html index 0230446356..ed1bb2100e 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.template.html +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.template.html @@ -69,9 +69,6 @@

-
- -
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/playback/mediasession.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/playback/mediasession.js index 3bdb53cf31..e5df702922 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/playback/mediasession.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/playback/mediasession.js @@ -1 +1 @@ -define(["playbackManager","nowPlayingHelper","events","connectionManager"],function(playbackManager,nowPlayingHelper,events,connectionManager){"use strict";function seriesImageUrl(item,options){if("Episode"!==item.Type)return null;if(options=options||{},options.type=options.type||"Primary","Primary"===options.type&&item.SeriesPrimaryImageTag)return options.tag=item.SeriesPrimaryImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.SeriesId,options);if("Thumb"===options.type){if(item.SeriesThumbImageTag)return options.tag=item.SeriesThumbImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.SeriesId,options);if(item.ParentThumbImageTag)return options.tag=item.ParentThumbImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.ParentThumbItemId,options)}return null}function imageUrl(item,options){return options=options||{},options.type=options.type||"Primary",item.ImageTags&&item.ImageTags[options.type]?(options.tag=item.ImageTags[options.type],connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.Id,options)):item.AlbumId&&item.AlbumPrimaryImageTag?(options.tag=item.AlbumPrimaryImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.AlbumId,options)):null}function pushImageUrl(item,height,list){var imageOptions={height:height},url=seriesImageUrl(item,imageOptions)||imageUrl(item,imageOptions);url&&list.push({src:url,sizes:height+"x"+height})}function getImageUrls(item){var list=[];return pushImageUrl(item,96,list),pushImageUrl(item,128,list),pushImageUrl(item,192,list),pushImageUrl(item,256,list),pushImageUrl(item,384,list),pushImageUrl(item,512,list),list}function updatePlayerState(player,state,eventName){var item=state.NowPlayingItem;if(!item)return void hideMediaControls();var playState=state.PlayState||{},parts=nowPlayingHelper.getNowPlayingNames(item),artist=1===parts.length?"":parts[0].text,title=parts[parts.length-1].text;if("Video"===item.MediaType&&parts.length>1){var temp=artist;artist=title,title=temp}var albumArtist;item.AlbumArtists&&item.AlbumArtists[0]&&(albumArtist=item.AlbumArtists[0].Name);var album=item.Album||"",itemId=item.Id,duration=parseInt(item.RunTimeTicks?item.RunTimeTicks/1e4:0),currentTime=parseInt(playState.PositionTicks?playState.PositionTicks/1e4:0),isPaused=playState.IsPaused||!1;navigator.mediaSession.metadata=new MediaMetadata({title:title,artist:artist,album:album,artwork:getImageUrls(item),albumArtist:albumArtist,currentTime:currentTime,duration:duration,paused:isPaused,itemId:itemId,mediaType:item.MediaType})}function onGeneralEvent(e){var player=this;updatePlayerState(player,playbackManager.getPlayerState(player),e.type)}function onStateChanged(e,state){updatePlayerState(this,state,"statechange")}function onPlaybackStart(e,state){console.log("nowplaying event: "+e.type),updatePlayerState(this,state,e.type)}function onPlaybackStopped(e,state){console.log("nowplaying event: "+e.type);hideMediaControls()}function releaseCurrentPlayer(){currentPlayer&&(events.off(currentPlayer,"playbackstart",onPlaybackStart),events.off(currentPlayer,"playbackstop",onPlaybackStopped),events.off(currentPlayer,"unpause",onGeneralEvent),events.off(currentPlayer,"pause",onGeneralEvent),events.off(currentPlayer,"statechange",onStateChanged),events.off(currentPlayer,"timeupdate",onGeneralEvent),currentPlayer=null,hideMediaControls())}function hideMediaControls(){navigator.mediaSession.metadata=null}function bindToPlayer(player){if(releaseCurrentPlayer(),player){currentPlayer=player,console.log("binding remotecontrols to "+player.name);updatePlayerState(player,playbackManager.getPlayerState(player),"init"),events.on(currentPlayer,"playbackstart",onPlaybackStart),events.on(currentPlayer,"playbackstop",onPlaybackStopped),events.on(currentPlayer,"unpause",onGeneralEvent),events.on(currentPlayer,"pause",onGeneralEvent),events.on(currentPlayer,"statechange",onStateChanged),events.on(currentPlayer,"timeupdate",onGeneralEvent)}}function execute(name){playbackManager[name](currentPlayer)}var currentPlayer;console.log("binding remotecontrols to playbackManager"),navigator.mediaSession.setActionHandler("previoustrack",function(){execute("previousTrack")}),navigator.mediaSession.setActionHandler("nexttrack",function(){execute("nextTrack")}),navigator.mediaSession.setActionHandler("play",function(){execute("unpause")}),navigator.mediaSession.setActionHandler("pause",function(){execute("pause")}),navigator.mediaSession.setActionHandler("seekbackward",function(){execute("rewind")}),navigator.mediaSession.setActionHandler("seekforward",function(){execute("fastForward")}),events.on(playbackManager,"playerchange",function(){bindToPlayer(playbackManager.getCurrentPlayer())}),bindToPlayer(playbackManager.getCurrentPlayer())}); \ No newline at end of file +define(["playbackManager","nowPlayingHelper","events","connectionManager"],function(playbackManager,nowPlayingHelper,events,connectionManager){"use strict";function seriesImageUrl(item,options){if("Episode"!==item.Type)return null;if(options=options||{},options.type=options.type||"Primary","Primary"===options.type&&item.SeriesPrimaryImageTag)return options.tag=item.SeriesPrimaryImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.SeriesId,options);if("Thumb"===options.type){if(item.SeriesThumbImageTag)return options.tag=item.SeriesThumbImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.SeriesId,options);if(item.ParentThumbImageTag)return options.tag=item.ParentThumbImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.ParentThumbItemId,options)}return null}function imageUrl(item,options){return options=options||{},options.type=options.type||"Primary",item.ImageTags&&item.ImageTags[options.type]?(options.tag=item.ImageTags[options.type],connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.Id,options)):item.AlbumId&&item.AlbumPrimaryImageTag?(options.tag=item.AlbumPrimaryImageTag,connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.AlbumId,options)):null}function pushImageUrl(item,height,list){var imageOptions={height:height},url=seriesImageUrl(item,imageOptions)||imageUrl(item,imageOptions);url&&list.push({src:url,sizes:height+"x"+height})}function getImageUrls(item){var list=[];return pushImageUrl(item,96,list),pushImageUrl(item,128,list),pushImageUrl(item,192,list),pushImageUrl(item,256,list),pushImageUrl(item,384,list),pushImageUrl(item,512,list),list}function updatePlayerState(player,state,eventName){var item=state.NowPlayingItem;if(!item)return void hideMediaControls();var playState=state.PlayState||{},parts=nowPlayingHelper.getNowPlayingNames(item),artist=1===parts.length?"":parts[0].text,title=parts[parts.length-1].text;if("Video"===item.MediaType&&parts.length>1){var temp=artist;artist=title,title=temp}var albumArtist;item.AlbumArtists&&item.AlbumArtists[0]&&(albumArtist=item.AlbumArtists[0].Name);var album=item.Album||"",itemId=item.Id,duration=parseInt(item.RunTimeTicks?item.RunTimeTicks/1e4:0),currentTime=parseInt(playState.PositionTicks?playState.PositionTicks/1e4:0),isPaused=playState.IsPaused||!1;navigator.mediaSession.metadata=new MediaMetadata({title:title,artist:artist,album:album,artwork:getImageUrls(item),albumArtist:albumArtist,currentTime:currentTime,duration:duration,paused:isPaused,itemId:itemId,mediaType:item.MediaType})}function onGeneralEvent(e){var player=this;updatePlayerState(player,playbackManager.getPlayerState(player),e.type)}function onStateChanged(e,state){updatePlayerState(this,state,"statechange")}function onPlaybackStart(e,state){updatePlayerState(this,state,e.type)}function onPlaybackStopped(e,state){hideMediaControls()}function releaseCurrentPlayer(){currentPlayer&&(events.off(currentPlayer,"playbackstart",onPlaybackStart),events.off(currentPlayer,"playbackstop",onPlaybackStopped),events.off(currentPlayer,"unpause",onGeneralEvent),events.off(currentPlayer,"pause",onGeneralEvent),events.off(currentPlayer,"statechange",onStateChanged),events.off(currentPlayer,"timeupdate",onGeneralEvent),currentPlayer=null,hideMediaControls())}function hideMediaControls(){navigator.mediaSession.metadata=null}function bindToPlayer(player){if(releaseCurrentPlayer(),player){currentPlayer=player;updatePlayerState(player,playbackManager.getPlayerState(player),"init"),events.on(currentPlayer,"playbackstart",onPlaybackStart),events.on(currentPlayer,"playbackstop",onPlaybackStopped),events.on(currentPlayer,"unpause",onGeneralEvent),events.on(currentPlayer,"pause",onGeneralEvent),events.on(currentPlayer,"statechange",onStateChanged),events.on(currentPlayer,"timeupdate",onGeneralEvent)}}function execute(name){playbackManager[name](currentPlayer)}var currentPlayer;navigator.mediaSession.setActionHandler("previoustrack",function(){execute("previousTrack")}),navigator.mediaSession.setActionHandler("nexttrack",function(){execute("nextTrack")}),navigator.mediaSession.setActionHandler("play",function(){execute("unpause")}),navigator.mediaSession.setActionHandler("pause",function(){execute("pause")}),navigator.mediaSession.setActionHandler("seekbackward",function(){execute("rewind")}),navigator.mediaSession.setActionHandler("seekforward",function(){execute("fastForward")}),events.on(playbackManager,"playerchange",function(){bindToPlayer(playbackManager.getCurrentPlayer())}),bindToPlayer(playbackManager.getCurrentPlayer())}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css b/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css index 0235c3b300..25e089a444 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css @@ -1 +1 @@ -.headerUserImage,.navMenuOption,.pageTitle{vertical-align:middle}.detailButton-mobile,.itemLinks,.listPaging,.sectionTabs,.viewSettings{text-align:center}.headerSelectedPlayer,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.libraryPage{padding-top:7em!important}.itemDetailPage{padding-top:4em!important}.standalonePage{padding-top:4.5em!important}.wizardPage{padding-top:7em!important}.libraryPage:not(.noSecondaryNavPage){padding-top:7.5em!important}.absolutePageTabContent{position:absolute;left:0;right:0;bottom:0;z-index:1;margin:0!important;top:6.9em!important;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.pageTabContent:not(.is-active){display:none!important}.headerUserImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-border-radius:100em;border-radius:100em;display:inline-block}.headerUserButtonRound img{-webkit-border-radius:100em;border-radius:100em}.headerButton{-webkit-flex-shrink:0;flex-shrink:0}.hideMainDrawer .mainDrawerButton{display:none}.noHeaderRight .headerRight,.noHomeButtonHeader .headerHomeButton{display:none!important}.pageTitle{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin:0 0 0 .5em;height:1.7em;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-shrink:1;flex-shrink:1}.detailButton-mobile,.skinHeader{-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal}.pageTitleWithLogo{background-position:left center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;width:13.2em}.pageTitleWithDefaultLogo{height:1.22em}.skinHeader{position:fixed;right:0;left:0;z-index:999;top:0;border:0;display:-webkit-box;display:-webkit-flex;display:flex;flex-direction:column;background-color:#121212;color:#ccc;contain:layout style paint}.mainAnimatedPages,.pageTabContent{contain:layout style}.hiddenViewMenuBar .skinHeader{display:none}.headerLeft,.headerRight{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.headerTop{padding:.865em 0}.headerLeft{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;overflow:hidden}.sectionTabs{width:100%}.headerRight{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.selectedMediaFolder{background-color:#f2f2f2!important}.navMenuOption{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-decoration:none;color:inherit;padding:.9em 0 .9em 2.4em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.layout-desktop .searchTabButton,.layout-mobile .searchTabButton,.layout-tv .headerSearchButton,body:not(.dashboardDocument) .btnNotifications{display:none!important}.navMenuOptionIcon{margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0}.sidebarHeader{padding-left:1.2em;margin:1em 0 .5em}.dashboardDocument .skinBody{-webkit-transition:left ease-in-out .3s,padding ease-in-out .3s;-o-transition:left ease-in-out .3s,padding ease-in-out .3s;transition:left ease-in-out .3s,padding ease-in-out .3s;position:absolute;top:0;right:0;bottom:0;left:0}.mainDrawer-scrollContainer{padding-bottom:10vh}@media all and (min-width:40em){.dashboardDocument .adminDrawerLogo,.dashboardDocument .mainDrawerButton{display:none!important}.dashboardDocument .mainDrawer{z-index:inherit!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;width:20.205em!important;font-size:94%}.dashboardDocument .mainDrawer-scrollContainer{margin-top:5em!important}.dashboardDocument withSectionTabs .mainDrawer-scrollContainer{margin-top:8.7em!important}.dashboardDocument .skinBody{left:20em}}@media all and (min-width:40em) and (max-width:84em){.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.4em!important}}@media all and (max-width:60em){.libraryDocument .mainDrawerButton{display:none}}@media all and (max-width:84em){.withSectionTabs .headerTop{padding-bottom:.2em}.sectionTabs{font-size:83.5%}}@media all and (min-width:84em){.headerTop{padding:1.489em 0}.headerTabs{-webkit-align-self:center;align-self:center;width:auto;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin-top:-3.34em;position:relative;top:-1.05em}.libraryPage:not(.noSecondaryNavPage){padding-top:4.6em!important}.pageWithAbsoluteTabs:not(.noSecondaryNavPage){padding-top:6.7em!important}.absolutePageTabContent{top:5.7em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:6.1em!important}.dashboardDocument .mainDrawer-scrollContainer{margin-top:6.3em!important}}.headerSelectedPlayer{max-width:10em;white-space:nowrap}@media all and (max-width:37.5em){.headerSelectedPlayer{display:none}}.hidingAnimatedTab{visibility:hidden}.headerArrowImage{height:20px;margin-left:.5em}.backdropContainer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.libraryPage .header{padding-bottom:0}.flexPageTabContent.is-active{display:-webkit-box!important;display:-webkit-flex!important;display:flex!important}.viewSettings{margin:0 0 .25em}.viewControls+.listTopPaging{margin-left:.5em!important}.criticReview{margin:1.5em 0;background:#222;padding:.8em .8em .8em 3em;-webkit-border-radius:.3em;border-radius:.3em;position:relative}.detailLogo,.itemBackdrop{background-repeat:no-repeat;background-position:center center}.criticReview:first-child{margin-top:.5em}.criticReview img{width:2.4em}.criticRatingScore{margin-bottom:.5em}.itemTag{display:inline-block;margin-right:1em}.itemOverview{white-space:pre-wrap}.itemLinks{padding:0}.itemLinks p{margin:.5em 0}.reviewLink,.reviewerName{margin-top:.5em}.reviewerName{color:#ccc}.reviewDate{margin-left:1em}.reviewScore{position:absolute;left:.8em}.itemBackdrop{-webkit-background-size:cover;background-size:cover;height:50vh;position:relative}.itemBackdropProgressBar{position:absolute!important;bottom:0;left:0;right:0}.itemBackdropFader{position:absolute;bottom:-1px;left:0;right:0;height:15vh}.desktopMiscInfoContainer{position:absolute;bottom:.75em}.detailImageContainer{margin-right:2em;width:280px;-webkit-flex-shrink:0;flex-shrink:0}.detailPagePrimaryContent{position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.detailLogo{width:21.3em;height:5em;position:absolute;top:13.5%;right:19.5%;-webkit-background-size:contain;background-size:contain}@media all and (max-width:87.5em){.detailLogo{right:5%}}@media all and (max-width:75em){.detailLogo{right:2%}}@media all and (max-width:68.75em){.detailLogo{width:14.91em;height:3.5em;right:5%;bottom:5%;top:auto;background-position:center right;display:none}}.itemDetailImage{width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}@media all and (max-width:62.5em){.detailPageContent{position:relative}.detailImageContainer{position:absolute;top:-90px;left:5%;width:auto}.itemDetailImage{height:120px;width:auto!important}.btnPlaySimple{display:none!important}}@media all and (min-width:62.5em){.itemBackdrop{display:none}.detailPagePrimaryContainer{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:3.6em}}@media all and (max-width:75em){.lnkSibling{display:none!important}}.parentName{display:block;margin-bottom:.5em}.emby-button.detailFloatingButton{position:absolute;background-color:rgba(0,0,0,.5)!important;z-index:1;top:50%;left:50%;margin:-2.2em 0 0 -2.2em;border:2.7px solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76)}.emby-button.detailFloatingButton i{font-size:3.5em}@media all and (max-width:62.5em){.parentName{margin-bottom:1em}.itemDetailPage{padding-top:0!important}.detailimg-hidemobile{display:none}}@media all and (min-width:31.25em){.mobileDetails{display:none}}@media all and (max-width:31.25em){.desktopDetails{display:none!important}}.detailButton-mobile,.mainDetailButtons{display:-webkit-box;display:-webkit-flex}.itemName{margin:.5em 0}.empty{margin:0}.detailCollapsibleSection:not(.hide)+.detailCollapsibleSection{margin-top:-2em}.detailPageCollabsible{margin-top:0}.mainDetailButtons{display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:1em 0}.recordingFields button{margin-left:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.mainDetailButtons.hide+.recordingFields{margin-top:1.5em!important}.mainDetailButtons>.raised{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.detailButton-mobile{display:flex;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0!important;padding:.5em .7em!important}@media all and (min-width:29em){.detailButton-mobile{padding-left:.75em!important;padding-right:.75em!important}}@media all and (min-width:32em){.detailButton-mobile{padding-left:.8em!important;padding-right:.8em!important}}@media all and (min-width:35em){.detailButton-mobile{padding-left:.85em!important;padding-right:.85em!important}}.detailButton-mobile-content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.detailButton-mobile-icon{font-size:1.6em!important;width:1em;height:1em}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}@media all and (max-width:62.5em){.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400}.mainDetailButtons{margin-left:-.5em}}@media all and (min-width:62.5em){.detailButton-mobile-icon:not(.always),.detailButton-mobile-text.texthide{display:none!important}.detailButton-mobile{padding-top:0!important;padding-bottom:0!important;height:3em;margin-right:.3em!important}.mainDetailButtons{font-size:108%;margin:1.25em 0}.detailButton-mobile-icon:not(.notext){margin-right:.25em}.detailButton-mobile-icon.playstatebutton-icon-unplayed{opacity:.2}.detailButton-mobile-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:50em){.editorMenuLink{display:none}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:31.25em){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.layout-tv .detailVerticalSection{margin-bottom:3.4em!important}.detailPageContent{border-spacing:0;border-collapse:collapse;padding-top:3em}@media all and (max-width:62.5em){.detailPageContent-nodetailimg{padding-top:0;margin-top:-3em}}@media all and (min-width:75em){.itemDetailPage .padded-left{padding-left:4%!important}.itemDetailPage .padded-right{padding-right:4%!important}}.mediaInfoStream{margin:0 3em 0 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin:1em 0}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:600}.recordingProgressBar::-moz-progress-bar{background-color:#c33}.recordingProgressBar::-webkit-progress-value{background-color:#c33}.recordingProgressBar[aria-valuenow]:before{background-color:#c33}.timelineHeader{margin-bottom:.25em;line-height:1.25em;line-height:initial}.itemsContainer{margin:0 auto}@media all and (max-height:31.25em){.itemBackdrop{height:52vh}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1em 0;-webkit-flex-wrap:wrap;flex-wrap:wrap}.verticalSection-extrabottompadding{margin-bottom:2.7em}.sectionTitleContainer{margin:1.25em 0}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.sectionTitleContainer-cards{margin-bottom:.5em}.sectionTitle{margin-bottom:1em}.sectionTitle-cards{margin-left:.4em;margin-bottom:.1em}@media all and (max-width:50em){.sectionTitle-cards{margin-left:.28em}}.sectionTitleContainer>.sectionTitle{margin-top:0;margin-bottom:0;display:inline-block;vertical-align:middle}.sectionTitleButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0}.sectionTitleButton+.sectionTitleButton{margin-left:.5em!important}.sectionTitleIconButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0;font-size:84%!important;padding:.5em!important}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0!important;display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:inline-flex!important;color:inherit!important}.sectionTitleTextButton:not(.padded-left){padding:0!important}.sectionTitleTextButton.padded-left{padding-bottom:0!important;padding-right:0!important;padding-top:0!important}.sectionTitleTextButton>.sectionTitle{margin-bottom:0;margin-top:0}.padded-left{padding-left:2%}.padded-right{padding-right:2%}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.layout-tv .padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.layout-tv .padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:7.5%}.padded-right-withalphapicker{padding-right:7.5%}}@media all and (min-width:500px){.padded-left{padding-left:6%}.padded-right{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:4%}.padded-right{padding-right:4%}}@media all and (min-width:800px){.padded-left{padding-left:3.2%}.padded-right{padding-right:3.2%}}@media all and (min-width:1280px){.padded-left{padding-left:3.3%}.padded-right{padding-right:3.3%}}@media all and (min-width:800px){.layout-tv .padded-left-withalphapicker{padding-left:4.5%}.layout-tv .padded-right-withalphapicker{padding-right:4.5%}}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{text-decoration:none;font-weight:inherit!important;vertical-align:middle;color:inherit!important}.itemsViewSettingsContainer{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}@media all and (min-width:40em){.listIconButton-autohide{display:none!important}}@media all and (max-width:40em){.listTextButton-autohide{display:none!important}}.layout-tv .itemsViewSettingsContainer{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;padding:1.5em .75em 1em 0;font-size:92%}.itemsViewSettingsContainer>.button-flat{margin:0} \ No newline at end of file +.headerUserImage,.navMenuOption,.pageTitle{vertical-align:middle}.detailButton-mobile,.itemLinks,.listPaging,.sectionTabs,.viewSettings{text-align:center}.headerSelectedPlayer,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.libraryPage{padding-top:7em!important}.itemDetailPage{padding-top:4em!important}.standalonePage{padding-top:4.5em!important}.wizardPage{padding-top:7em!important}.libraryPage:not(.noSecondaryNavPage){padding-top:7.5em!important}.absolutePageTabContent{position:absolute;left:0;right:0;bottom:0;z-index:1;margin:0!important;top:6.9em!important;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.pageTabContent:not(.is-active){display:none!important}.headerUserImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-border-radius:100em;border-radius:100em;display:inline-block}.headerUserButtonRound img{-webkit-border-radius:100em;border-radius:100em}.headerButton{-webkit-flex-shrink:0;flex-shrink:0}.hideMainDrawer .mainDrawerButton{display:none}.noHeaderRight .headerRight,.noHomeButtonHeader .headerHomeButton{display:none!important}.pageTitle{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin:0 0 0 .5em;height:1.7em;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-shrink:1;flex-shrink:1}.detailButton-mobile,.skinHeader{-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal}.pageTitleWithLogo{background-position:left center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;width:13.2em}.pageTitleWithDefaultLogo{height:1.22em}.skinHeader{position:fixed;right:0;left:0;z-index:999;top:0;border:0;display:-webkit-box;display:-webkit-flex;display:flex;flex-direction:column;background-color:#121212;color:#ccc;contain:layout style paint}.mainAnimatedPages,.pageTabContent{contain:layout style}.hiddenViewMenuBar .skinHeader{display:none}.headerLeft,.headerRight{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.headerTop{padding:.865em 0}.headerLeft{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;overflow:hidden}.sectionTabs{width:100%}.headerRight{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.selectedMediaFolder{background-color:#f2f2f2!important}.navMenuOption{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-decoration:none;color:inherit;padding:.9em 0 .9em 2.4em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.layout-desktop .searchTabButton,.layout-mobile .searchTabButton,.layout-tv .headerSearchButton,body:not(.dashboardDocument) .btnNotifications{display:none!important}.navMenuOptionIcon{margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0}.sidebarHeader{padding-left:1.2em;margin:1em 0 .5em}.dashboardDocument .skinBody{-webkit-transition:left ease-in-out .3s,padding ease-in-out .3s;-o-transition:left ease-in-out .3s,padding ease-in-out .3s;transition:left ease-in-out .3s,padding ease-in-out .3s;position:absolute;top:0;right:0;bottom:0;left:0}.mainDrawer-scrollContainer{padding-bottom:10vh}@media all and (min-width:40em){.dashboardDocument .adminDrawerLogo,.dashboardDocument .mainDrawerButton{display:none!important}.dashboardDocument .mainDrawer{z-index:inherit!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;width:20.205em!important;font-size:94%}.dashboardDocument .mainDrawer-scrollContainer{margin-top:5em!important}.dashboardDocument withSectionTabs .mainDrawer-scrollContainer{margin-top:8.7em!important}.dashboardDocument .skinBody{left:20em}}@media all and (min-width:40em) and (max-width:84em){.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.4em!important}}@media all and (max-width:60em){.libraryDocument .mainDrawerButton{display:none}}@media all and (max-width:84em){.withSectionTabs .headerTop{padding-bottom:.2em}.sectionTabs{font-size:83.5%}}@media all and (min-width:84em){.headerTop{padding:1.489em 0}.headerTabs{-webkit-align-self:center;align-self:center;width:auto;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin-top:-3.34em;position:relative;top:-1.05em}.libraryPage:not(.noSecondaryNavPage){padding-top:4.6em!important}.pageWithAbsoluteTabs:not(.noSecondaryNavPage){padding-top:6.7em!important}.absolutePageTabContent{top:5.7em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:6.1em!important}.dashboardDocument .mainDrawer-scrollContainer{margin-top:6.3em!important}}.headerSelectedPlayer{max-width:10em;white-space:nowrap}@media all and (max-width:37.5em){.headerSelectedPlayer{display:none}}.hidingAnimatedTab{visibility:hidden}.headerArrowImage{height:20px;margin-left:.5em}.backdropContainer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.libraryPage .header{padding-bottom:0}.flexPageTabContent.is-active{display:-webkit-box!important;display:-webkit-flex!important;display:flex!important}.viewSettings{margin:0 0 .25em}.viewControls+.listTopPaging{margin-left:.5em!important}.criticReview{margin:1.5em 0;background:#222;padding:.8em .8em .8em 3em;-webkit-border-radius:.3em;border-radius:.3em;position:relative}.detailLogo,.itemBackdrop{background-repeat:no-repeat;background-position:center center}.criticReview:first-child{margin-top:.5em}.criticReview img{width:2.4em}.criticRatingScore{margin-bottom:.5em}.itemTag{display:inline-block;margin-right:1em}.itemOverview{white-space:pre-wrap}.itemLinks{padding:0}.itemLinks p{margin:.5em 0}.reviewLink,.reviewerName{margin-top:.5em}.reviewerName{color:#ccc}.reviewDate{margin-left:1em}.reviewScore{position:absolute;left:.8em}.itemBackdrop{-webkit-background-size:cover;background-size:cover;height:50vh;position:relative}.itemBackdropProgressBar{position:absolute!important;bottom:0;left:0;right:0}.itemBackdropFader{position:absolute;bottom:-1px;left:0;right:0;height:15vh}.desktopMiscInfoContainer{position:absolute;bottom:.75em}.detailImageContainer{margin-right:2em;width:280px;-webkit-flex-shrink:0;flex-shrink:0}.detailPagePrimaryContent{position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.detailLogo{width:21.3em;height:5em;position:absolute;top:13.5%;right:19.5%;-webkit-background-size:contain;background-size:contain}@media all and (max-width:87.5em){.detailLogo{right:5%}}@media all and (max-width:75em){.detailLogo{right:2%}}@media all and (max-width:68.75em){.detailLogo{width:14.91em;height:3.5em;right:5%;bottom:5%;top:auto;background-position:center right;display:none}}.itemDetailImage{width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}@media all and (max-width:62.5em){.detailPageContent{position:relative}.detailImageContainer{position:absolute;top:-90px;left:5%;width:auto}.itemDetailImage{height:120px;width:auto!important}.btnPlaySimple{display:none!important}}@media all and (min-width:62.5em){.itemBackdrop{display:none}.detailPagePrimaryContainer{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:3.6em}}@media all and (max-width:75em){.lnkSibling{display:none!important}}.parentName{display:block;margin-bottom:.5em}.emby-button.detailFloatingButton{position:absolute;background-color:rgba(0,0,0,.5)!important;z-index:1;top:50%;left:50%;margin:-2.2em 0 0 -2.2em;border:2.7px solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76)}.emby-button.detailFloatingButton i{font-size:3.5em}@media all and (max-width:62.5em){.parentName{margin-bottom:1em}.itemDetailPage{padding-top:0!important}.detailimg-hidemobile{display:none}}@media all and (min-width:31.25em){.mobileDetails{display:none}}@media all and (max-width:31.25em){.desktopDetails{display:none!important}}.detailButton-mobile,.mainDetailButtons{display:-webkit-box;display:-webkit-flex}.itemName{margin:.5em 0}.empty{margin:0}.detailCollapsibleSection:not(.hide)+.detailCollapsibleSection{margin-top:-2em}.detailPageCollabsible{margin-top:0}.mainDetailButtons{display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:1em 0}.recordingFields button{margin-left:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.mainDetailButtons.hide+.recordingFields{margin-top:1.5em!important}.mainDetailButtons>.raised{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.detailButton-mobile{display:flex;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0!important;padding:.5em .7em!important}@media all and (min-width:29em){.detailButton-mobile{padding-left:.75em!important;padding-right:.75em!important}}@media all and (min-width:32em){.detailButton-mobile{padding-left:.8em!important;padding-right:.8em!important}}@media all and (min-width:35em){.detailButton-mobile{padding-left:.85em!important;padding-right:.85em!important}}.detailButton-mobile-content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.detailButton-mobile-icon{font-size:1.6em!important;width:1em;height:1em}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}@media all and (max-width:62.5em){.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400}.mainDetailButtons{margin-left:-.5em}}@media all and (min-width:62.5em){.detailButton-mobile-icon:not(.always),.detailButton-mobile-text.texthide{display:none!important}.detailButton-mobile{padding-top:0!important;padding-bottom:0!important;height:3em;margin-right:.3em!important}.mainDetailButtons{font-size:108%;margin:1.25em 0}.detailButton-mobile-icon:not(.notext){margin-right:.25em}.detailButton-mobile-icon.playstatebutton-icon-unplayed{opacity:.2}.detailButton-mobile-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:50em){.editorMenuLink{display:none}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:31.25em){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.layout-tv .detailVerticalSection{margin-bottom:3.4em!important}.detailPageContent{border-spacing:0;border-collapse:collapse;padding-top:3em}@media all and (max-width:62.5em){.detailPageContent-nodetailimg{padding-top:0;margin-top:-3em}}@media all and (min-width:75em){.itemDetailPage .padded-left{padding-left:4%!important}.itemDetailPage .padded-right{padding-right:4%!important}}.mediaInfoStream{margin:0 3em 0 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin:1em 0}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:600}.recordingProgressBar::-moz-progress-bar{background-color:#c33}.recordingProgressBar::-webkit-progress-value{background-color:#c33}.recordingProgressBar[aria-valuenow]:before{background-color:#c33}.timelineHeader{margin-bottom:.25em;line-height:1.25em;line-height:initial}.itemsContainer{margin:0 auto}@media all and (max-height:31.25em){.itemBackdrop{height:52vh}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1em 0;-webkit-flex-wrap:wrap;flex-wrap:wrap}.verticalSection-extrabottompadding{margin-bottom:2.7em}.sectionTitleContainer{margin:1.25em 0}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.sectionTitleContainer-cards{margin-bottom:.2em}.sectionTitle{margin-bottom:1em}.sectionTitle-cards{margin-left:.45em;margin-bottom:0}@media all and (max-width:50em){.sectionTitle-cards{margin-left:.28em}}.sectionTitleContainer>.sectionTitle{margin-top:0;margin-bottom:0;display:inline-block;vertical-align:middle}.sectionTitleButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0}.sectionTitleButton+.sectionTitleButton{margin-left:.5em!important}.sectionTitleIconButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0;font-size:84%!important;padding:.5em!important}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0!important;display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:inline-flex!important;color:inherit!important}.sectionTitleTextButton:not(.padded-left){padding:0!important}.sectionTitleTextButton.padded-left{padding-bottom:0!important;padding-right:0!important;padding-top:0!important}.sectionTitleTextButton>.sectionTitle{margin-bottom:0;margin-top:0}.padded-left{padding-left:2%}.padded-right{padding-right:2%}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.layout-tv .padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.layout-tv .padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:7.5%}.padded-right-withalphapicker{padding-right:7.5%}}@media all and (min-width:500px){.padded-left{padding-left:6%}.padded-right{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:4%}.padded-right{padding-right:4%}}@media all and (min-width:800px){.padded-left{padding-left:3.2%}.padded-right{padding-right:3.2%}}@media all and (min-width:1280px){.padded-left{padding-left:3.3%}.padded-right{padding-right:3.3%}}@media all and (min-width:800px){.layout-tv .padded-left-withalphapicker{padding-left:4%}.layout-tv .padded-right-withalphapicker{padding-right:4%}}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{text-decoration:none;font-weight:inherit!important;vertical-align:middle;color:inherit!important}.itemsViewSettingsContainer{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}@media all and (min-width:40em){.listIconButton-autohide{display:none!important}}@media all and (max-width:40em){.listTextButton-autohide{display:none!important}}.layout-tv .itemsViewSettingsContainer{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;padding:1.5em .75em 1em 0;font-size:92%}.itemsViewSettingsContainer>.button-flat{margin:0} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/editorsidebar.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/editorsidebar.js index c4fa74dcc0..1bd7331ffe 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/editorsidebar.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/editorsidebar.js @@ -1 +1 @@ -define(["datetime","jQuery","material-icons"],function(datetime,$){"use strict";function getNode(item,folderState,selected){var htmlName=getNodeInnerHtml(item),node={id:item.Id,text:htmlName,state:{opened:item.IsFolder&&"open"==folderState,selected:selected},li_attr:{serveritemtype:item.Type,collectiontype:item.CollectionType}};return item.IsFolder?(node.children=[{text:"Loading...",icon:!1}],node.icon=!1):node.icon=!1,node.state.opened&&(node.li_attr.loadedFromServer=!0),selected&&(selectedNodeId=item.Id),node}function getNodeInnerHtml(item){var name=item.Name;item.Number&&(name=item.Number+" - "+name),null!=item.IndexNumber&&"Season"!=item.Type&&(name=item.IndexNumber+" - "+name);var htmlName="
";if(item.LockData&&(htmlName+='lock'),htmlName+=name,item.ImageTags&&item.ImageTags.Primary||(htmlName+=''),item.BackdropImageTags&&item.BackdropImageTags.length||"Episode"!==item.Type&&"Season"!==item.Type&&"Audio"!==item.MediaType&&"TvChannel"!==item.Type&&"MusicAlbum"!==item.Type&&(htmlName+=''),item.ImageTags&&item.ImageTags.Logo||"Movie"!=item.Type&&"Trailer"!=item.Type&&"Series"!=item.Type&&"MusicArtist"!=item.Type&&"BoxSet"!=item.Type||(htmlName+=''),"Episode"==item.Type&&"Virtual"==item.LocationType)try{item.PremiereDate&&(new Date).getTime()>=datetime.parseISO8601Date(item.PremiereDate,!0).getTime()&&(htmlName+='')}catch(err){}return htmlName+="
"}function loadChildrenOfRootNode(page,scope,callback){ApiClient.getLiveTvChannels({limit:0}).then(function(result){var nodes=[];nodes.push({id:"MediaFolders",text:Globalize.translate("HeaderMediaFolders"),state:{opened:!0},li_attr:{itemtype:"mediafolders",loadedFromServer:!0},icon:!1}),result.TotalRecordCount&&nodes.push({id:"livetv",text:Globalize.translate("HeaderLiveTV"),state:{opened:!1},li_attr:{itemtype:"livetv"},children:[{text:"Loading...",icon:!1}],icon:!1}),callback.call(scope,nodes),nodesToLoad.push("MediaFolders")})}function loadLiveTvChannels(service,openItems,callback){ApiClient.getLiveTvChannels({ServiceName:service,AddCurrentProgram:!1}).then(function(result){var nodes=result.Items.map(function(i){return getNode(i,-1==openItems.indexOf(i.Id)?"closed":"open",!1)});callback(nodes)})}function loadMediaFolders(page,scope,openItems,callback){ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders")).then(function(result){var nodes=result.Items.map(function(n){return getNode(n,-1==openItems.indexOf(n.Id)?"closed":"open",!1)});callback.call(scope,nodes);for(var i=0,length=nodes.length;ia",page)[0];if(null!=elem&&($(".editorNode",elem).remove(),$(elem).append(getNodeInnerHtml(item)),item.IsFolder)){var tree=jQuery.jstree._reference(".libraryTree"),currentNode=tree._get_node(null,!1);tree.refresh(currentNode)}}function setCurrentItemId(id){itemId=id}function getCurrentItemId(){if(itemId)return itemId;var url=window.location.hash||window.location.href;return getParameterByName("id",url)}var selectedNodeId,nodesToLoad=[];$(document).on("itemsaved",".metadataEditorPage",function(e,item){updateEditorNode(this,item)}).on("pagebeforeshow",".metadataEditorPage",function(){require(["css!css/metadataeditor.css"])}).on("pagebeforeshow",".metadataEditorPage",function(){var page=this;Dashboard.getCurrentUser().then(function(user){var id=getCurrentItemId();id?ApiClient.getAncestorItems(id,user.Id).then(function(ancestors){var ids=ancestors.map(function(i){return i.Id});initializeTree(page,user,ids,id)}):initializeTree(page,user,[])})}).on("pagebeforehide",".metadataEditorPage",function(){$(".libraryTree",this).off("select_node.jstree",onNodeSelect).off("open_node.jstree",onNodeOpen).off("load_node.jstree",onNodeLoad)});var itemId;window.MetadataEditor={getItemPromise:function(){var currentItemId=getCurrentItemId();return currentItemId?ApiClient.getItem(Dashboard.getCurrentUserId(),currentItemId):ApiClient.getRootFolder(Dashboard.getCurrentUserId())},getCurrentItemId:getCurrentItemId,setCurrentItemId:setCurrentItemId}}); \ No newline at end of file +define(["datetime","jQuery","material-icons"],function(datetime,$){"use strict";function getNode(item,folderState,selected){var htmlName=getNodeInnerHtml(item),node={id:item.Id,text:htmlName,state:{opened:item.IsFolder&&"open"==folderState,selected:selected},li_attr:{serveritemtype:item.Type,collectiontype:item.CollectionType}};return item.IsFolder?(node.children=[{text:"Loading...",icon:!1}],node.icon=!1):node.icon=!1,node.state.opened&&(node.li_attr.loadedFromServer=!0),selected&&(selectedNodeId=item.Id),node}function getNodeInnerHtml(item){var name=item.Name;item.Number&&(name=item.Number+" - "+name),null!=item.IndexNumber&&"Season"!=item.Type&&(name=item.IndexNumber+" - "+name);var htmlName="
";if(item.LockData&&(htmlName+='lock'),htmlName+=name,item.ImageTags&&item.ImageTags.Primary||(htmlName+=''),item.BackdropImageTags&&item.BackdropImageTags.length||"Episode"!==item.Type&&"Season"!==item.Type&&"Audio"!==item.MediaType&&"TvChannel"!==item.Type&&"MusicAlbum"!==item.Type&&(htmlName+=''),item.ImageTags&&item.ImageTags.Logo||"Movie"!=item.Type&&"Trailer"!=item.Type&&"Series"!=item.Type&&"MusicArtist"!=item.Type&&"BoxSet"!=item.Type||(htmlName+=''),"Episode"==item.Type&&"Virtual"==item.LocationType)try{item.PremiereDate&&(new Date).getTime()>=datetime.parseISO8601Date(item.PremiereDate,!0).getTime()&&(htmlName+='')}catch(err){}return htmlName+="
"}function loadChildrenOfRootNode(page,scope,callback){ApiClient.getLiveTvChannels({limit:0}).then(function(result){var nodes=[];nodes.push({id:"MediaFolders",text:Globalize.translate("HeaderMediaFolders"),state:{opened:!0},li_attr:{itemtype:"mediafolders",loadedFromServer:!0},icon:!1}),result.TotalRecordCount&&nodes.push({id:"livetv",text:Globalize.translate("HeaderLiveTV"),state:{opened:!1},li_attr:{itemtype:"livetv"},children:[{text:"Loading...",icon:!1}],icon:!1}),callback.call(scope,nodes),nodesToLoad.push("MediaFolders")})}function loadLiveTvChannels(openItems,callback){ApiClient.getLiveTvChannels({AddCurrentProgram:!1}).then(function(result){var nodes=result.Items.map(function(i){return getNode(i,-1==openItems.indexOf(i.Id)?"closed":"open",!1)});callback(nodes)})}function loadMediaFolders(page,scope,openItems,callback){ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders")).then(function(result){var nodes=result.Items.map(function(n){return getNode(n,-1==openItems.indexOf(n.Id)?"closed":"open",!1)});callback.call(scope,nodes);for(var i=0,length=nodes.length;ia",page)[0];if(null!=elem&&($(".editorNode",elem).remove(),$(elem).append(getNodeInnerHtml(item)),item.IsFolder)){var tree=jQuery.jstree._reference(".libraryTree"),currentNode=tree._get_node(null,!1);tree.refresh(currentNode)}}function setCurrentItemId(id){itemId=id}function getCurrentItemId(){if(itemId)return itemId;var url=window.location.hash||window.location.href;return getParameterByName("id",url)}var selectedNodeId,nodesToLoad=[];$(document).on("itemsaved",".metadataEditorPage",function(e,item){updateEditorNode(this,item)}).on("pagebeforeshow",".metadataEditorPage",function(){require(["css!css/metadataeditor.css"])}).on("pagebeforeshow",".metadataEditorPage",function(){var page=this;Dashboard.getCurrentUser().then(function(user){var id=getCurrentItemId();id?ApiClient.getAncestorItems(id,user.Id).then(function(ancestors){var ids=ancestors.map(function(i){return i.Id});initializeTree(page,user,ids,id)}):initializeTree(page,user,[])})}).on("pagebeforehide",".metadataEditorPage",function(){$(".libraryTree",this).off("select_node.jstree",onNodeSelect).off("open_node.jstree",onNodeOpen).off("load_node.jstree",onNodeLoad)});var itemId;window.MetadataEditor={getItemPromise:function(){var currentItemId=getCurrentItemId();return currentItemId?ApiClient.getItem(Dashboard.getCurrentUserId(),currentItemId):ApiClient.getRootFolder(Dashboard.getCurrentUserId())},getCurrentItemId:getCurrentItemId,setCurrentItemId:setCurrentItemId}}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/packages.config b/MediaBrowser.WebDashboard/packages.config index b703a4ca6e..6932ba28ad 100644 --- a/MediaBrowser.WebDashboard/packages.config +++ b/MediaBrowser.WebDashboard/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj index 9a3626a8b9..b33dd37d15 100644 --- a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj +++ b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj @@ -61,13 +61,13 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Server.Core.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Controller.dll + ..\packages\MediaBrowser.Server.Core.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs index 56a3516ab5..97e97cc9c1 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs @@ -375,18 +375,6 @@ protected virtual void FetchDataFromXmlNode(XmlReader reader, MetadataResult break; } - case "website": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val)) - { - item.HomePageUrl = val; - } - - break; - } - case "lockedfields": { var val = reader.ReadElementContentAsString(); diff --git a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs index bbbb157ab8..89fbcbce84 100644 --- a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs +++ b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs @@ -44,7 +44,6 @@ public abstract class BaseNfoSaver : IMetadataFileSaver "sorttitle", "mpaa", "aspectratio", - "website", "collectionnumber", "tmdbid", "rottentomatoesid", @@ -568,11 +567,6 @@ private void AddCommonNodes(BaseItem item, XmlWriter writer, ILibraryManager lib } } - if (!string.IsNullOrEmpty(item.HomePageUrl)) - { - writer.WriteElementString("website", item.HomePageUrl); - } - var tmdbCollection = item.GetProviderId(MetadataProviders.TmdbCollection); if (!string.IsNullOrEmpty(tmdbCollection)) @@ -818,23 +812,6 @@ private void AddCommonNodes(BaseItem item, XmlWriter writer, ILibraryManager lib } } - public static void AddChapters(Video item, XmlWriter writer, IItemRepository repository) - { - var chapters = repository.GetChapters(item.Id); - - foreach (var chapter in chapters) - { - writer.WriteStartElement("chapter"); - writer.WriteElementString("name", chapter.Name); - - var time = TimeSpan.FromTicks(chapter.StartPositionTicks); - var ms = Convert.ToInt64(time.TotalMilliseconds); - - writer.WriteElementString("startpositionms", ms.ToString(UsCulture)); - writer.WriteEndElement(); - } - } - private void AddCollectionItems(Folder item, XmlWriter writer) { var items = item.LinkedChildren diff --git a/MediaBrowser.XbmcMetadata/packages.config b/MediaBrowser.XbmcMetadata/packages.config index b703a4ca6e..6932ba28ad 100644 --- a/MediaBrowser.XbmcMetadata/packages.config +++ b/MediaBrowser.XbmcMetadata/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Mono.Nat/Mono.Nat.csproj b/Mono.Nat/Mono.Nat.csproj index 496857fcc5..f9b4a962e2 100644 --- a/Mono.Nat/Mono.Nat.csproj +++ b/Mono.Nat/Mono.Nat.csproj @@ -32,10 +32,10 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/Mono.Nat/packages.config b/Mono.Nat/packages.config index c6ba3586c6..2d97e2a363 100644 --- a/Mono.Nat/packages.config +++ b/Mono.Nat/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/RSSDP/RSSDP.csproj b/RSSDP/RSSDP.csproj index 5db502cd7a..47bd02f8b5 100644 --- a/RSSDP/RSSDP.csproj +++ b/RSSDP/RSSDP.csproj @@ -58,10 +58,10 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/RSSDP/packages.config b/RSSDP/packages.config index c6ba3586c6..2d97e2a363 100644 --- a/RSSDP/packages.config +++ b/RSSDP/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/SharedVersion.cs b/SharedVersion.cs index b7dfc43bdc..f0c08629a6 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.4.1.14")] +[assembly: AssemblyVersion("3.4.1.15")] diff --git a/SocketHttpListener/SocketHttpListener.csproj b/SocketHttpListener/SocketHttpListener.csproj index aacd43e56e..03ba6d8e53 100644 --- a/SocketHttpListener/SocketHttpListener.csproj +++ b/SocketHttpListener/SocketHttpListener.csproj @@ -36,10 +36,10 @@ - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Common.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll - ..\packages\MediaBrowser.Common.3.3.48-beta\lib\netstandard2.0\MediaBrowser.Model.dll + ..\packages\MediaBrowser.Common.3.3.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll diff --git a/SocketHttpListener/packages.config b/SocketHttpListener/packages.config index c6ba3586c6..2d97e2a363 100644 --- a/SocketHttpListener/packages.config +++ b/SocketHttpListener/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/ThirdParty/emby/Emby.Server.Connect.dll b/ThirdParty/emby/Emby.Server.Connect.dll index bee397c2fd..895094845c 100644 Binary files a/ThirdParty/emby/Emby.Server.Connect.dll and b/ThirdParty/emby/Emby.Server.Connect.dll differ diff --git a/ThirdParty/emby/Emby.Server.MediaEncoding.dll b/ThirdParty/emby/Emby.Server.MediaEncoding.dll index ab0aeed81d..34b241f289 100644 Binary files a/ThirdParty/emby/Emby.Server.MediaEncoding.dll and b/ThirdParty/emby/Emby.Server.MediaEncoding.dll differ diff --git a/ThirdParty/emby/Emby.Server.Sync.dll b/ThirdParty/emby/Emby.Server.Sync.dll index 4421cd9bfd..ee268945ed 100644 Binary files a/ThirdParty/emby/Emby.Server.Sync.dll and b/ThirdParty/emby/Emby.Server.Sync.dll differ diff --git a/packages/MediaBrowser.Common.3.3.48-beta/MediaBrowser.Common.3.3.48-beta.nupkg b/packages/MediaBrowser.Common.3.3.48-beta/MediaBrowser.Common.3.3.48-beta.nupkg deleted file mode 100644 index 10fb24d72d..0000000000 Binary files a/packages/MediaBrowser.Common.3.3.48-beta/MediaBrowser.Common.3.3.48-beta.nupkg and /dev/null differ diff --git a/packages/MediaBrowser.Common.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Common.dll b/packages/MediaBrowser.Common.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Common.dll deleted file mode 100644 index c0ec892001..0000000000 Binary files a/packages/MediaBrowser.Common.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Common.dll and /dev/null differ diff --git a/packages/MediaBrowser.Common.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Model.dll b/packages/MediaBrowser.Common.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Model.dll deleted file mode 100644 index 296c15f662..0000000000 Binary files a/packages/MediaBrowser.Common.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Model.dll and /dev/null differ diff --git a/packages/MediaBrowser.Common.3.3.49-beta/MediaBrowser.Common.3.3.49-beta.nupkg b/packages/MediaBrowser.Common.3.3.49-beta/MediaBrowser.Common.3.3.49-beta.nupkg new file mode 100644 index 0000000000..b150430a19 Binary files /dev/null and b/packages/MediaBrowser.Common.3.3.49-beta/MediaBrowser.Common.3.3.49-beta.nupkg differ diff --git a/packages/MediaBrowser.Common.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Common.dll b/packages/MediaBrowser.Common.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Common.dll new file mode 100644 index 0000000000..a6e3e4b387 Binary files /dev/null and b/packages/MediaBrowser.Common.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Common.dll differ diff --git a/packages/MediaBrowser.Common.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Model.dll b/packages/MediaBrowser.Common.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Model.dll new file mode 100644 index 0000000000..974abc877a Binary files /dev/null and b/packages/MediaBrowser.Common.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Model.dll differ diff --git a/packages/MediaBrowser.Server.Core.3.3.48-beta/MediaBrowser.Server.Core.3.3.48-beta.nupkg b/packages/MediaBrowser.Server.Core.3.3.48-beta/MediaBrowser.Server.Core.3.3.48-beta.nupkg deleted file mode 100644 index fb02e25874..0000000000 Binary files a/packages/MediaBrowser.Server.Core.3.3.48-beta/MediaBrowser.Server.Core.3.3.48-beta.nupkg and /dev/null differ diff --git a/packages/MediaBrowser.Server.Core.3.3.49-beta/MediaBrowser.Server.Core.3.3.49-beta.nupkg b/packages/MediaBrowser.Server.Core.3.3.49-beta/MediaBrowser.Server.Core.3.3.49-beta.nupkg new file mode 100644 index 0000000000..97afa6d0e6 Binary files /dev/null and b/packages/MediaBrowser.Server.Core.3.3.49-beta/MediaBrowser.Server.Core.3.3.49-beta.nupkg differ diff --git a/packages/MediaBrowser.Server.Core.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Controller.dll b/packages/MediaBrowser.Server.Core.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Controller.dll similarity index 94% rename from packages/MediaBrowser.Server.Core.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Controller.dll rename to packages/MediaBrowser.Server.Core.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Controller.dll index 1de8065f61..5d527366f1 100644 Binary files a/packages/MediaBrowser.Server.Core.3.3.48-beta/lib/netstandard2.0/MediaBrowser.Controller.dll and b/packages/MediaBrowser.Server.Core.3.3.49-beta/lib/netstandard2.0/MediaBrowser.Controller.dll differ