mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-15 23:02:18 +01:00
Merge branch 'dev' into code-cleanup
This commit is contained in:
@@ -46,7 +46,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
private readonly ILogger _logger;
|
||||
private readonly IMediaSourceManager _mediaSourceManager;
|
||||
|
||||
public EncodingJob(ILogger logger, IMediaSourceManager mediaSourceManager) :
|
||||
public EncodingJob(ILogger logger, IMediaSourceManager mediaSourceManager) :
|
||||
base(logger, mediaSourceManager, TranscodingJobType.Progressive)
|
||||
{
|
||||
_logger = logger;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
|
||||
protected static readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
|
||||
public EncodingJobFactory(ILogger logger, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager, IConfigurationManager config, IMediaEncoder mediaEncoder)
|
||||
{
|
||||
_logger = logger;
|
||||
@@ -255,7 +255,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
|
||||
if (profile == null)
|
||||
{
|
||||
// Don't use settings from the default profile.
|
||||
// Don't use settings from the default profile.
|
||||
// Only use a specific profile if it was requested.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
/// </summary>
|
||||
/// <value>The bits_per_raw_sample.</value>
|
||||
public int bits_per_raw_sample { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the r_frame_rate.
|
||||
/// </summary>
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
if (!string.IsNullOrWhiteSpace(iTunEXTC))
|
||||
{
|
||||
var parts = iTunEXTC.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
// Example
|
||||
// Example
|
||||
// mpaa|G|100|For crude humor
|
||||
if (parts.Length > 1)
|
||||
{
|
||||
@@ -423,7 +423,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
Type = PersonType.Writer
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (string.Equals(key, "producers", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -619,7 +619,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
else if (string.Equals(stream.Codec, "mjpeg", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// How to differentiate between video and embedded image?
|
||||
// The only difference I've seen thus far is presence of codec tag, also embedded images have high (unusual) framerates
|
||||
// The only difference I've seen thus far is presence of codec tag, also embedded images have high (unusual) framerates
|
||||
if (!string.IsNullOrWhiteSpace(stream.CodecTag))
|
||||
{
|
||||
stream.Type = MediaStreamType.Video;
|
||||
@@ -1054,7 +1054,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
/// <returns>System.String[][].</returns>
|
||||
private IEnumerable<string> Split(string val, bool allowCommaDelimiter)
|
||||
{
|
||||
// Only use the comma as a delimeter if there are no slashes or pipes.
|
||||
// Only use the comma as a delimeter if there are no slashes or pipes.
|
||||
// We want to be careful not to split names that have commas in them
|
||||
var delimeter = !allowCommaDelimiter || _nameDelimiters.Any(i => val.IndexOf(i) != -1) ?
|
||||
_nameDelimiters :
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("MediaBrowser.MediaEncoding")]
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
continue;
|
||||
@@ -49,7 +49,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
RemoteNativeFormatting(subEvent);
|
||||
|
||||
subEvent.Text = subEvent.Text.Replace("\\n", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
|
||||
subEvent.Text = Regex.Replace(subEvent.Text, @"\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}", string.Empty, RegexOptions.IgnoreCase);
|
||||
|
||||
trackEvents.Add(subEvent);
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
_config.NamedConfigurationUpdating += _config_NamedConfigurationUpdating;
|
||||
|
||||
Utilities.HttpClient = httpClient;
|
||||
OpenSubtitles.SetUserAgent("mediabrowser.tv");
|
||||
OpenSubtitles.SetUserAgent("jellyfin");
|
||||
}
|
||||
|
||||
private const string PasswordHashPrefix = "h:";
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
var time = Regex.Split(line, @"[\t ]*-->[\t ]*");
|
||||
|
||||
if (time.Length < 2)
|
||||
@@ -85,7 +85,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
TimeSpan span;
|
||||
return TimeSpan.TryParseExact(time, @"hh\:mm\:ss\.fff", _usCulture, out span)
|
||||
? span.Ticks
|
||||
: (TimeSpan.TryParseExact(time, @"hh\:mm\:ss\,fff", _usCulture, out span)
|
||||
: (TimeSpan.TryParseExact(time, @"hh\:mm\:ss\,fff", _usCulture, out span)
|
||||
? span.Ticks : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,8 +129,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//if (header.Length > 0)
|
||||
//subtitle.Header = header.ToString();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
|
||||
writer.WriteLine("</div>");
|
||||
writer.WriteLine("</body>");
|
||||
|
||||
|
||||
writer.WriteLine("</tt>");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user