mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Fix warnings
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
@@ -179,7 +181,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
list.Add(new ExternalUrl
|
||||
{
|
||||
Name = "Trakt",
|
||||
Url = string.Format("https://trakt.tv/movies/{0}", imdbId)
|
||||
Url = string.Format(CultureInfo.InvariantCulture, "https://trakt.tv/movies/{0}", imdbId)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
list.Add(new ExternalUrl
|
||||
{
|
||||
Name = "Trakt",
|
||||
Url = string.Format("https://trakt.tv/shows/{0}", imdbId)
|
||||
Url = string.Format(CultureInfo.InvariantCulture, "https://trakt.tv/shows/{0}", imdbId)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
@@ -86,7 +87,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
list.Add(new ExternalUrl
|
||||
{
|
||||
Name = "Trakt",
|
||||
Url = string.Format("https://trakt.tv/movies/{0}", imdbId)
|
||||
Url = string.Format(CultureInfo.InvariantCulture, "https://trakt.tv/movies/{0}", imdbId)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
@@ -13,6 +14,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// The name.
|
||||
/// </summary>
|
||||
readonly string _name;
|
||||
|
||||
/// <summary>
|
||||
/// The stopwatch.
|
||||
/// </summary>
|
||||
@@ -44,6 +46,7 @@ namespace MediaBrowser.Controller.Library
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,13 +61,19 @@ namespace MediaBrowser.Controller.Library
|
||||
string message;
|
||||
if (_stopwatch.ElapsedMilliseconds > 300000)
|
||||
{
|
||||
message = string.Format("{0} took {1} minutes.",
|
||||
_name, ((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F"));
|
||||
message = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} took {1} minutes.",
|
||||
_name,
|
||||
((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F", CultureInfo.InvariantCulture));
|
||||
}
|
||||
else
|
||||
{
|
||||
message = string.Format("{0} took {1} seconds.",
|
||||
_name, ((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000"));
|
||||
message = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} took {1} seconds.",
|
||||
_name,
|
||||
((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000", CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
_logger.LogInformation(message);
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
|
||||
if (double.TryParse(Number, NumberStyles.Any, CultureInfo.InvariantCulture, out number))
|
||||
{
|
||||
return string.Format("{0:00000.0}", number) + "-" + (Name ?? string.Empty);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0:00000.0}", number) + "-" + (Name ?? string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
list.Add(new ExternalUrl
|
||||
{
|
||||
Name = "Trakt",
|
||||
Url = string.Format("https://trakt.tv/movies/{0}", imdbId)
|
||||
Url = string.Format(CultureInfo.InvariantCulture, "https://trakt.tv/movies/{0}", imdbId)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,7 +675,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
// }
|
||||
// }
|
||||
|
||||
// fallbackFontParam = string.Format(":force_style='FontName=Droid Sans Fallback':fontsdir='{0}'", _mediaEncoder.EscapeSubtitleFilterPath(_fileSystem.GetDirectoryName(fallbackFontPath)));
|
||||
// fallbackFontParam = string.Format(CultureInfo.InvariantCulture, ":force_style='FontName=Droid Sans Fallback':fontsdir='{0}'", _mediaEncoder.EscapeSubtitleFilterPath(_fileSystem.GetDirectoryName(fallbackFontPath)));
|
||||
|
||||
if (state.SubtitleStream.IsExternal)
|
||||
{
|
||||
@@ -880,7 +880,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
profileScore = Math.Min(profileScore, 2);
|
||||
|
||||
// http://www.webmproject.org/docs/encoder-parameters/
|
||||
param += string.Format("-speed 16 -quality good -profile:v {0} -slices 8 -crf {1} -qmin {2} -qmax {3}",
|
||||
param += string.Format(CultureInfo.InvariantCulture, "-speed 16 -quality good -profile:v {0} -slices 8 -crf {1} -qmin {2} -qmax {3}",
|
||||
profileScore.ToString(_usCulture),
|
||||
crf,
|
||||
qmin,
|
||||
@@ -904,7 +904,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var framerate = GetFramerateParam(state);
|
||||
if (framerate.HasValue)
|
||||
{
|
||||
param += string.Format(" -r {0}", framerate.Value.ToString(_usCulture));
|
||||
param += string.Format(CultureInfo.InvariantCulture, " -r {0}", framerate.Value.ToString(_usCulture));
|
||||
}
|
||||
|
||||
var targetVideoCodec = state.ActualOutputVideoCodec;
|
||||
@@ -1484,7 +1484,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
if (time > 0)
|
||||
{
|
||||
return string.Format("-ss {0}", _mediaEncoder.GetTimeParameter(time));
|
||||
return string.Format(CultureInfo.InvariantCulture, "-ss {0}", _mediaEncoder.GetTimeParameter(time));
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
/// <returns>Task.</returns>
|
||||
Task SaveImage(BaseItem item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken);
|
||||
|
||||
Task SaveImage(User user, Stream source, string mimeType, string path);
|
||||
Task SaveImage(Stream source, string mimeType, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Adds the metadata providers.
|
||||
|
||||
Reference in New Issue
Block a user