mirror of https://github.com/jellyfin/jellyfin.git
rework settings page
This commit is contained in:
parent
713a9e779b
commit
d95057f13b
|
@ -1124,6 +1124,11 @@ namespace MediaBrowser.Controller.Entities
|
||||||
rating = OfficialRatingForComparison;
|
rating = OfficialRatingForComparison;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(rating))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return LocalizationManager.GetRatingLevel(rating);
|
return LocalizationManager.GetRatingLevel(rating);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,5 +227,19 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
info.IsMovie = IsMovie;
|
info.IsMovie = IsMovie;
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool SupportsPeople
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
// Optimization
|
||||||
|
if (IsNews || IsSports)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.SupportsPeople;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,24 +7,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
{
|
{
|
||||||
public interface ISubtitleEncoder
|
public interface ISubtitleEncoder
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Converts the subtitles.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="stream">The stream.</param>
|
|
||||||
/// <param name="inputFormat">The input format.</param>
|
|
||||||
/// <param name="outputFormat">The output format.</param>
|
|
||||||
/// <param name="startTimeTicks">The start time ticks.</param>
|
|
||||||
/// <param name="endTimeTicks">The end time ticks.</param>
|
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
|
||||||
/// <returns>Task{Stream}.</returns>
|
|
||||||
Task<Stream> ConvertSubtitles(
|
|
||||||
Stream stream,
|
|
||||||
string inputFormat,
|
|
||||||
string outputFormat,
|
|
||||||
long startTimeTicks,
|
|
||||||
long? endTimeTicks,
|
|
||||||
CancellationToken cancellationToken);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the subtitles.
|
/// Gets the subtitles.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Stream> ConvertSubtitles(Stream stream,
|
private async Task<Stream> ConvertSubtitles(Stream stream,
|
||||||
string inputFormat,
|
string inputFormat,
|
||||||
string outputFormat,
|
string outputFormat,
|
||||||
long startTimeTicks,
|
long startTimeTicks,
|
||||||
|
@ -64,7 +64,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var trackInfo = await GetTrackInfo(stream, inputFormat, cancellationToken).ConfigureAwait(false);
|
var reader = GetReader(inputFormat, true);
|
||||||
|
|
||||||
|
var trackInfo = reader.Parse(stream, cancellationToken);
|
||||||
|
|
||||||
FilterEvents(trackInfo, startTimeTicks, endTimeTicks, false);
|
FilterEvents(trackInfo, startTimeTicks, endTimeTicks, false);
|
||||||
|
|
||||||
|
@ -257,15 +259,6 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||||
return new Tuple<string, MediaProtocol, string, bool>(subtitleStream.Path, protocol, currentFormat, true);
|
return new Tuple<string, MediaProtocol, string, bool>(subtitleStream.Path, protocol, currentFormat, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<SubtitleTrackInfo> GetTrackInfo(Stream stream,
|
|
||||||
string inputFormat,
|
|
||||||
CancellationToken cancellationToken)
|
|
||||||
{
|
|
||||||
var reader = GetReader(inputFormat, true);
|
|
||||||
|
|
||||||
return reader.Parse(stream, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ISubtitleParser GetReader(string format, bool throwIfMissing)
|
private ISubtitleParser GetReader(string format, bool throwIfMissing)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(format))
|
if (string.IsNullOrEmpty(format))
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Common.IO;
|
using System.ComponentModel;
|
||||||
|
using MediaBrowser.Common.IO;
|
||||||
using MediaBrowser.Common.ScheduledTasks;
|
using MediaBrowser.Common.ScheduledTasks;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
@ -370,6 +371,17 @@ namespace MediaBrowser.Server.Implementations.IO
|
||||||
Logger.ErrorException("Error in Directory watcher for: " + dw.Path, ex);
|
Logger.ErrorException("Error in Directory watcher for: " + dw.Path, ex);
|
||||||
|
|
||||||
DisposeWatcher(dw);
|
DisposeWatcher(dw);
|
||||||
|
|
||||||
|
if (ex is Win32Exception)
|
||||||
|
{
|
||||||
|
Logger.Info("Disabling realtime monitor to prevent future instability");
|
||||||
|
|
||||||
|
if (ConfigurationManager.Configuration.EnableLibraryMonitor == AutoOnOff.Auto)
|
||||||
|
{
|
||||||
|
ConfigurationManager.Configuration.EnableLibraryMonitor = AutoOnOff.Disabled;
|
||||||
|
Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -2071,14 +2071,17 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
|
|
||||||
public List<PersonInfo> GetPeople(BaseItem item)
|
public List<PersonInfo> GetPeople(BaseItem item)
|
||||||
{
|
{
|
||||||
var people = GetPeople(new InternalPeopleQuery
|
if (item.SupportsPeople)
|
||||||
{
|
{
|
||||||
ItemId = item.Id
|
var people = GetPeople(new InternalPeopleQuery
|
||||||
});
|
{
|
||||||
|
ItemId = item.Id
|
||||||
|
});
|
||||||
|
|
||||||
if (people.Count > 0)
|
if (people.Count > 0)
|
||||||
{
|
{
|
||||||
return people;
|
return people;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return item.People ?? new List<PersonInfo>();
|
return item.People ?? new List<PersonInfo>();
|
||||||
|
|
|
@ -173,7 +173,5 @@
|
||||||
"HeaderProducer": "Producers",
|
"HeaderProducer": "Producers",
|
||||||
"HeaderWriter": "Writers",
|
"HeaderWriter": "Writers",
|
||||||
"HeaderParentalRatings": "Parental Ratings",
|
"HeaderParentalRatings": "Parental Ratings",
|
||||||
"HeaderCommunityRatings": "Community ratings",
|
"HeaderCommunityRatings": "Community ratings"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,6 +204,7 @@
|
||||||
<Content Include="dashboard-ui\mypreferenceshome.html">
|
<Content Include="dashboard-ui\mypreferenceshome.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\mypreferencesmenu.html" />
|
||||||
<Content Include="dashboard-ui\scripts\actionsheet.js">
|
<Content Include="dashboard-ui\scripts\actionsheet.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
Loading…
Reference in New Issue