add additional info to timer infos

pull/1154/head
Luke Pulverenti 7 years ago
parent bca5f49ac9
commit 12adc7ae4c

@ -89,6 +89,11 @@ namespace Emby.Server.Implementations.LiveTv
if (channel != null)
{
dto.ChannelName = channel.Name;
if (channel.HasImage(ImageType.Primary))
{
dto.ChannelPrimaryImageTag = GetImageTag(channel);
}
}
return dto;

@ -27,7 +27,7 @@
"Artists": "\u041e\u0440\u044b\u043d\u0434\u0430\u0443\u0448\u044b\u043b\u0430\u0440",
"Folders": "\u049a\u0430\u043b\u0442\u0430\u043b\u0430\u0440",
"Songs": "\u04d8\u0443\u0435\u043d\u0434\u0435\u0440",
"TvShows": "TV Shows",
"TvShows": "\u0422\u0414-\u043a\u04e9\u0440\u0441\u0435\u0442\u0456\u043c\u0434\u0435\u0440",
"Shows": "\u041a\u04e9\u0440\u0441\u0435\u0442\u0456\u043c\u0434\u0435\u0440",
"Genres": "\u0416\u0430\u043d\u0440\u043b\u0430\u0440",
"NameSeasonNumber": "{0}-\u043c\u0430\u0443\u0441\u044b\u043c",

@ -2,13 +2,13 @@
"Latest": "\u041d\u043e\u0432\u0435\u0439\u0448\u0435\u0435",
"ValueSpecialEpisodeName": "\u0421\u043f\u0435\u0446\u044d\u043f\u0438\u0437\u043e\u0434 - {0}",
"Inherit": "\u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0435",
"Books": "\u041a\u043d\u0438\u0433\u0438",
"Books": "\u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430",
"Music": "\u041c\u0443\u0437\u044b\u043a\u0430",
"Games": "\u0418\u0433\u0440\u044b",
"Photos": "\u0424\u043e\u0442\u043e",
"MixedContent": "\u0421\u043c\u0435\u0448\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435",
"MusicVideos": "\u041c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0434\u0435\u043e",
"HomeVideos": "\u0414\u043e\u043c\u0430\u0448\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e",
"MusicVideos": "\u041c\u0443\u0437. \u0432\u0438\u0434\u0435\u043e",
"HomeVideos": "\u0414\u043e\u043c. \u0432\u0438\u0434\u0435\u043e",
"Playlists": "\u041f\u043b\u0435\u0439-\u043b\u0438\u0441\u0442\u044b",
"HeaderRecordingGroups": "\u0413\u0440\u0443\u043f\u043f\u044b \u0437\u0430\u043f\u0438\u0441\u0435\u0439",
"HeaderContinueWatching": "\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430",
@ -22,12 +22,12 @@
"Favorites": "\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435",
"Collections": "\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438",
"Channels": "\u041a\u0430\u043d\u0430\u043b\u044b",
"Movies": "\u0424\u0438\u043b\u044c\u043c\u044b",
"Movies": "\u041a\u0438\u043d\u043e",
"Albums": "\u0410\u043b\u044c\u0431\u043e\u043c\u044b",
"Artists": "\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0438",
"Folders": "\u041f\u0430\u043f\u043a\u0438",
"Songs": "\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438",
"TvShows": "TV Shows",
"TvShows": "\u0422\u0412",
"Shows": "\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0438",
"Genres": "\u0416\u0430\u043d\u0440\u044b",
"NameSeasonNumber": "\u0421\u0435\u0437\u043e\u043d {0}",
@ -49,7 +49,7 @@
"DeviceOnlineWithName": "{0} - \u043f\u043e\u0434\u043a\u043b. \u0443\u0441\u0442-\u043d\u043e",
"UserOnlineFromDevice": "{0} - \u043f\u043e\u0434\u043a\u043b. \u0441 {1} \u0443\u0441\u0442-\u043d\u043e",
"ProviderValue": "\u041f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a: {0}",
"SubtitlesDownloadedForItem": "\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b \u0434\u043b\u044f {0} \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b",
"SubtitlesDownloadedForItem": "\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b \u043a {0} \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b",
"UserCreatedWithName": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c {0} \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d",
"UserPasswordChangedWithName": "\u041f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437-\u043b\u044f {0} \u0431\u044b\u043b \u0438\u0437\u043c\u0435\u043d\u0451\u043d",
"UserDeletedWithName": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c {0} \u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0451\u043d",

@ -50,21 +50,40 @@ namespace MediaBrowser.Controller.LiveTv
public static double? GetDefaultPrimaryImageAspectRatio(IHasProgramAttributes item)
{
var serviceName = item.ServiceName;
if (!item.IsMovie
&& !string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase)
&& !string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
if (item.IsMovie)
{
double value = 16;
value /= 9;
if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
{
double value = 2;
value /= 3;
return value;
}
else
{
double value = 16;
value /= 9;
return value;
return value;
}
}
else
{
double value = 2;
value /= 3;
if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
{
double value = 2;
value /= 3;
return value;
return value;
}
else
{
double value = 16;
value /= 9;
return value;
}
}
}

@ -41,6 +41,8 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
public string ChannelName { get; set; }
public string ChannelPrimaryImageTag { get; set; }
/// <summary>
/// Gets or sets the program identifier.
/// </summary>

@ -38,28 +38,6 @@ namespace MediaBrowser.Providers.Manager
LibraryManager = libraryManager;
}
private bool RequiresRefresh(IHasMetadata item, IDirectoryService directoryService)
{
if (item.RequiresRefresh())
{
return true;
}
if (item.SupportsLocalMetadata)
{
var video = item as Video;
if (video != null && !video.IsPlaceHolder)
{
return !video.SubtitleFiles
.SequenceEqual(SubtitleResolver.GetSubtitleFiles(video, directoryService, FileSystem, false)
.OrderBy(i => i), StringComparer.OrdinalIgnoreCase);
}
}
return false;
}
public async Task<ItemUpdateType> RefreshMetadata(IHasMetadata item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
{
var itemOfType = (TItemType)item;
@ -70,6 +48,11 @@ namespace MediaBrowser.Providers.Manager
var libraryOptions = LibraryManager.GetLibraryOptions((BaseItem)item);
if (!requiresRefresh && libraryOptions.AutomaticRefreshIntervalDays > 0 && (DateTime.UtcNow - item.DateLastRefreshed).TotalDays >= libraryOptions.AutomaticRefreshIntervalDays)
{
requiresRefresh = true;
}
DateTime? newDateModified = null;
if (item.LocationType == LocationType.FileSystem)
{
@ -85,18 +68,25 @@ namespace MediaBrowser.Providers.Manager
requiresRefresh = true;
}
}
}
}
if (!requiresRefresh && libraryOptions.AutomaticRefreshIntervalDays > 0 && (DateTime.UtcNow - item.DateLastRefreshed).TotalDays >= libraryOptions.AutomaticRefreshIntervalDays)
{
requiresRefresh = true;
if (!requiresRefresh && item.SupportsLocalMetadata)
{
var video = item as Video;
if (video != null && !video.IsPlaceHolder)
{
requiresRefresh = !video.SubtitleFiles
.SequenceEqual(SubtitleResolver.GetSubtitleFiles(video, refreshOptions.DirectoryService, FileSystem, false)
.OrderBy(i => i), StringComparer.OrdinalIgnoreCase);
}
}
}
}
if (!requiresRefresh && refreshOptions.MetadataRefreshMode != MetadataRefreshMode.None)
{
// TODO: If this returns true, should we instead just change metadata refresh mode to Full?
requiresRefresh = RequiresRefresh(item, refreshOptions.DirectoryService);
requiresRefresh = item.RequiresRefresh();
}
var itemImageProvider = new ItemImageProvider(Logger, ProviderManager, ServerConfigurationManager, FileSystem);

@ -152,7 +152,7 @@ namespace MediaBrowser.WebDashboard.Api
}
}
html = html.Replace("<head>", "<head>" + GetMetaTags(mode) + GetCommonCss(mode, appVersion));
html = html.Replace("<head>", "<head>" + GetMetaTags(mode));
// Disable embedded scripts from plugins. We'll run them later once resources have loaded
if (html.IndexOf("<script", StringComparison.OrdinalIgnoreCase) != -1)
@ -229,26 +229,6 @@ namespace MediaBrowser.WebDashboard.Api
return sb.ToString();
}
/// <summary>
/// Gets the common CSS.
/// </summary>
/// <param name="mode">The mode.</param>
/// <param name="version">The version.</param>
/// <returns>System.String.</returns>
private string GetCommonCss(string mode, string version)
{
var versionString = string.IsNullOrWhiteSpace(mode) ? "?v=" + version : string.Empty;
var files = new[]
{
"css/site.css" + versionString
};
var tags = files.Select(s => string.Format("<link rel=\"stylesheet\" href=\"{0}\" async />", s)).ToArray();
return string.Join(string.Empty, tags);
}
/// <summary>
/// Gets the common javascript.
/// </summary>

Loading…
Cancel
Save