mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 18:44:45 +01:00
update translations
This commit is contained in:
@@ -349,6 +349,13 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <exception cref="ArgumentNullException">userId</exception>
|
||||
Task<ItemsResult> GetArtistsAsync(ArtistsQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the album artists asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>Task{ItemsResult}.</returns>
|
||||
Task<ItemsResult> GetAlbumArtistsAsync(ArtistsQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a studio
|
||||
/// </summary>
|
||||
|
||||
@@ -28,6 +28,12 @@ namespace MediaBrowser.Model.Channels
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports latest items]; otherwise, <c>false</c>.</value>
|
||||
public bool? SupportsLatestItems { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is favorite.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is favorite] contains no value, <c>true</c> if [is favorite]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsFavorite { get; set; }
|
||||
}
|
||||
|
||||
public class AllChannelMediaQuery
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
@@ -87,7 +86,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public bool IsMetadataSaverEnabled(string name)
|
||||
{
|
||||
return !DisabledMetadataSavers.Contains(name, StringComparer.OrdinalIgnoreCase);
|
||||
return !ListHelper.ContainsIgnoreCase(DisabledMetadataSavers, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +246,9 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
MinResumePct = 5;
|
||||
MaxResumePct = 90;
|
||||
MinResumeDurationSeconds = Convert.ToInt32(TimeSpan.FromMinutes(5).TotalSeconds);
|
||||
|
||||
// 5 minutes
|
||||
MinResumeDurationSeconds = 300;
|
||||
|
||||
RealtimeMonitorDelay = 30;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
int? videoBitrate,
|
||||
string videoProfile,
|
||||
double? videoLevel,
|
||||
double? videoFramerate,
|
||||
float? videoFramerate,
|
||||
int? packetLength,
|
||||
TransportStreamTimestamp? timestamp,
|
||||
bool? isAnamorphic)
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
long? runtimeTicks,
|
||||
string videoProfile,
|
||||
double? videoLevel,
|
||||
double? videoFramerate,
|
||||
float? videoFramerate,
|
||||
int? packetLength,
|
||||
TranscodeSeekInfo transcodeSeekInfo,
|
||||
bool? isAnamorphic)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
@@ -157,12 +155,12 @@ namespace MediaBrowser.Model.Dlna
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!i.GetAudioCodecs().Contains(audioCodec ?? string.Empty))
|
||||
if (!ListHelper.ContainsIgnoreCase(i.GetAudioCodecs(), audioCodec ?? string.Empty))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!StringHelper.EqualsIgnoreCase(videoCodec, i.VideoCodec))
|
||||
if (!StringHelper.EqualsIgnoreCase(videoCodec, i.VideoCodec ?? string.Empty))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -190,7 +188,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
List<string> audioCodecs = i.GetAudioCodecs();
|
||||
if (audioCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(audioCodecs, audioCodec))
|
||||
if (audioCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(audioCodecs, audioCodec ?? string.Empty))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -267,7 +265,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
int? videoBitrate,
|
||||
string videoProfile,
|
||||
double? videoLevel,
|
||||
double? videoFramerate,
|
||||
float? videoFramerate,
|
||||
int? packetLength,
|
||||
TransportStreamTimestamp timestamp,
|
||||
bool? isAnamorphic)
|
||||
@@ -282,19 +280,19 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
List<string> containers = i.GetContainers();
|
||||
if (containers.Count > 0 && !ListHelper.ContainsIgnoreCase(containers, container))
|
||||
if (containers.Count > 0 && !ListHelper.ContainsIgnoreCase(containers, container ?? string.Empty))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
List<string> audioCodecs = i.GetAudioCodecs();
|
||||
if (audioCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(audioCodecs, audioCodec))
|
||||
if (audioCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(audioCodecs, audioCodec ?? string.Empty))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
List<string> videoCodecs = i.GetVideoCodecs();
|
||||
if (videoCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(videoCodecs, videoCodec))
|
||||
if (videoCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(videoCodecs, videoCodec ?? string.Empty))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
public class MediaFormatProfileResolver
|
||||
{
|
||||
public IEnumerable<MediaFormatProfile> ResolveVideoFormat(string container, string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestampType)
|
||||
public List<MediaFormatProfile> ResolveVideoFormat(string container, string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestampType)
|
||||
{
|
||||
if (StringHelper.EqualsIgnoreCase(container, "asf"))
|
||||
{
|
||||
@@ -22,18 +22,18 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "avi"))
|
||||
return new[] { MediaFormatProfile.AVI };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.AVI };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "mkv"))
|
||||
return new[] { MediaFormatProfile.MATROSKA };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.MATROSKA };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "mpeg2ps") ||
|
||||
StringHelper.EqualsIgnoreCase(container, "ts"))
|
||||
|
||||
return new[] { MediaFormatProfile.MPEG_PS_NTSC, MediaFormatProfile.MPEG_PS_PAL };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.MPEG_PS_NTSC, MediaFormatProfile.MPEG_PS_PAL };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "mpeg1video"))
|
||||
return new[] { MediaFormatProfile.MPEG1 };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.MPEG1 };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "mpeg2ts") ||
|
||||
StringHelper.EqualsIgnoreCase(container, "mpegts") ||
|
||||
@@ -44,10 +44,10 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "flv"))
|
||||
return new[] { MediaFormatProfile.FLV };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.FLV };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "wtv"))
|
||||
return new[] { MediaFormatProfile.WTV };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.WTV };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "3gp"))
|
||||
{
|
||||
@@ -56,12 +56,12 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(container, "ogv") || StringHelper.EqualsIgnoreCase(container, "ogg"))
|
||||
return new[] { MediaFormatProfile.OGV };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.OGV };
|
||||
|
||||
return new List<MediaFormatProfile>();
|
||||
}
|
||||
|
||||
private IEnumerable<MediaFormatProfile> ResolveVideoMPEG2TSFormat(string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestampType)
|
||||
private List<MediaFormatProfile> ResolveVideoMPEG2TSFormat(string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestampType)
|
||||
{
|
||||
string suffix = "";
|
||||
|
||||
@@ -98,36 +98,36 @@ namespace MediaBrowser.Model.Dlna
|
||||
if (StringHelper.EqualsIgnoreCase(videoCodec, "h264"))
|
||||
{
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "lpcm"))
|
||||
return new[] { MediaFormatProfile.AVC_TS_HD_50_LPCM_T };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.AVC_TS_HD_50_LPCM_T };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "dts"))
|
||||
{
|
||||
if (timestampType == TransportStreamTimestamp.None)
|
||||
{
|
||||
return new[] { MediaFormatProfile.AVC_TS_HD_DTS_ISO };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.AVC_TS_HD_DTS_ISO };
|
||||
}
|
||||
return new[] { MediaFormatProfile.AVC_TS_HD_DTS_T };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.AVC_TS_HD_DTS_T };
|
||||
}
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "mp3"))
|
||||
{
|
||||
if (timestampType == TransportStreamTimestamp.None)
|
||||
{
|
||||
return new[] { ValueOf(string.Format("AVC_TS_HP_{0}D_MPEG1_L2_ISO", resolution)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("AVC_TS_HP_{0}D_MPEG1_L2_ISO", resolution)) };
|
||||
}
|
||||
|
||||
return new[] { ValueOf(string.Format("AVC_TS_HP_{0}D_MPEG1_L2_T", resolution)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("AVC_TS_HP_{0}D_MPEG1_L2_T", resolution)) };
|
||||
}
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "aac"))
|
||||
return new[] { ValueOf(string.Format("AVC_TS_MP_{0}D_AAC_MULT5{1}", resolution, suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("AVC_TS_MP_{0}D_AAC_MULT5{1}", resolution, suffix)) };
|
||||
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "mp3"))
|
||||
return new[] { ValueOf(string.Format("AVC_TS_MP_{0}D_MPEG1_L3{1}", resolution, suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("AVC_TS_MP_{0}D_MPEG1_L3{1}", resolution, suffix)) };
|
||||
|
||||
if (string.IsNullOrEmpty(audioCodec) ||
|
||||
StringHelper.EqualsIgnoreCase(audioCodec, "ac3"))
|
||||
return new[] { ValueOf(string.Format("AVC_TS_MP_{0}D_AC3{1}", resolution, suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("AVC_TS_MP_{0}D_AC3{1}", resolution, suffix)) };
|
||||
}
|
||||
else if (StringHelper.EqualsIgnoreCase(videoCodec, "vc1"))
|
||||
{
|
||||
@@ -135,28 +135,28 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
if ((width.HasValue && width.Value > 720) || (height.HasValue && height.Value > 576))
|
||||
{
|
||||
return new[] { MediaFormatProfile.VC1_TS_AP_L2_AC3_ISO };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.VC1_TS_AP_L2_AC3_ISO };
|
||||
}
|
||||
return new[] { MediaFormatProfile.VC1_TS_AP_L1_AC3_ISO };
|
||||
return new List<MediaFormatProfile> { MediaFormatProfile.VC1_TS_AP_L1_AC3_ISO };
|
||||
}
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "dts"))
|
||||
{
|
||||
suffix = StringHelper.EqualsIgnoreCase(suffix, "_ISO") ? suffix : "_T";
|
||||
|
||||
return new[] { ValueOf(string.Format("VC1_TS_HD_DTS{0}", suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("VC1_TS_HD_DTS{0}", suffix)) };
|
||||
}
|
||||
|
||||
}
|
||||
else if (StringHelper.EqualsIgnoreCase(videoCodec, "mpeg4") || StringHelper.EqualsIgnoreCase(videoCodec, "msmpeg4"))
|
||||
{
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "aac"))
|
||||
return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AAC{0}", suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("MPEG4_P2_TS_ASP_AAC{0}", suffix)) };
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "mp3"))
|
||||
return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG1_L3{0}", suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG1_L3{0}", suffix)) };
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "mp2"))
|
||||
return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG2_L2{0}", suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG2_L2{0}", suffix)) };
|
||||
if (StringHelper.EqualsIgnoreCase(audioCodec, "ac3"))
|
||||
return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AC3{0}", suffix)) };
|
||||
return new List<MediaFormatProfile> { ValueOf(string.Format("MPEG4_P2_TS_ASP_AC3{0}", suffix)) };
|
||||
}
|
||||
|
||||
return new List<MediaFormatProfile>();
|
||||
|
||||
@@ -323,6 +323,12 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
playlistItem.VideoBitrate = Math.Min(videoBitrate, currentValue);
|
||||
}
|
||||
|
||||
// Hate to hard-code this, but it's still probably better than being subjected to encoder defaults
|
||||
if (!playlistItem.VideoBitrate.HasValue)
|
||||
{
|
||||
playlistItem.VideoBitrate = 5000000;
|
||||
}
|
||||
}
|
||||
|
||||
return playlistItem;
|
||||
@@ -555,8 +561,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
case ProfileConditionValue.VideoFramerate:
|
||||
{
|
||||
double num;
|
||||
if (DoubleHelper.TryParseCultureInvariant(value, out num))
|
||||
float num;
|
||||
if (FloatHelper.TryParseCultureInvariant(value, out num))
|
||||
{
|
||||
item.MaxFramerate = num;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
public int? MaxWidth { get; set; }
|
||||
public int? MaxHeight { get; set; }
|
||||
|
||||
public double? MaxFramerate { get; set; }
|
||||
public float? MaxFramerate { get; set; }
|
||||
|
||||
public string DeviceProfileId { get; set; }
|
||||
public string DeviceId { get; set; }
|
||||
@@ -191,7 +191,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
/// <summary>
|
||||
/// Predicts the audio sample rate that will be in the output stream
|
||||
/// </summary>
|
||||
public double? TargetFramerate
|
||||
public float? TargetFramerate
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -19,6 +19,20 @@ namespace MediaBrowser.Model.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
public static class FloatHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Tries the parse culture invariant.
|
||||
/// </summary>
|
||||
/// <param name="s">The s.</param>
|
||||
/// <param name="result">The result.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
public static bool TryParseCultureInvariant(string s, out float result)
|
||||
{
|
||||
return float.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out result);
|
||||
}
|
||||
}
|
||||
|
||||
public static class BoolHelper
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace MediaBrowser.Model.Extensions
|
||||
{
|
||||
public static class ListHelper
|
||||
{
|
||||
public static bool ContainsIgnoreCase(List<string> list, string value)
|
||||
public static bool ContainsIgnoreCase(IEnumerable<string> list, string value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace MediaBrowser.Model.Querying
|
||||
/// </summary>
|
||||
/// <value>The name starts with or greater.</value>
|
||||
public string NameStartsWith { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the name less than.
|
||||
/// </summary>
|
||||
/// <value>The name less than.</value>
|
||||
|
||||
Reference in New Issue
Block a user