mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
commit
b5c8f71926
@ -155,6 +155,8 @@ namespace MediaBrowser.Api.Movies
|
|||||||
listEligibleForSuggestion.AddRange(list);
|
listEligibleForSuggestion.AddRange(list);
|
||||||
|
|
||||||
listEligibleForCategories = listEligibleForCategories
|
listEligibleForCategories = listEligibleForCategories
|
||||||
|
// Exclude trailers from the suggestion categories
|
||||||
|
.Where(i => i is Movie)
|
||||||
.DistinctBy(i => i.Name, StringComparer.OrdinalIgnoreCase)
|
.DistinctBy(i => i.Name, StringComparer.OrdinalIgnoreCase)
|
||||||
.DistinctBy(i => i.GetProviderId(MetadataProviders.Imdb) ?? Guid.NewGuid().ToString(), StringComparer.OrdinalIgnoreCase)
|
.DistinctBy(i => i.GetProviderId(MetadataProviders.Imdb) ?? Guid.NewGuid().ToString(), StringComparer.OrdinalIgnoreCase)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
@ -19,6 +19,7 @@ namespace MediaBrowser.Controller.Subtitles
|
|||||||
public int? ParentIndexNumber { get; set; }
|
public int? ParentIndexNumber { get; set; }
|
||||||
public int? ProductionYear { get; set; }
|
public int? ProductionYear { get; set; }
|
||||||
public long? RuntimeTicks { get; set; }
|
public long? RuntimeTicks { get; set; }
|
||||||
|
public bool IsPerfectMatch { get; set; }
|
||||||
public Dictionary<string, string> ProviderIds { get; set; }
|
public Dictionary<string, string> ProviderIds { get; set; }
|
||||||
|
|
||||||
public bool SearchAllProviders { get; set; }
|
public bool SearchAllProviders { get; set; }
|
||||||
|
@ -31,6 +31,7 @@ namespace MediaBrowser.Model.LiveTv
|
|||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public string DeviceId { get; set; }
|
public string DeviceId { get; set; }
|
||||||
public bool ImportFavoritesOnly { get; set; }
|
public bool ImportFavoritesOnly { get; set; }
|
||||||
|
public bool AllowHWTranscoding { get; set; }
|
||||||
public bool IsEnabled { get; set; }
|
public bool IsEnabled { get; set; }
|
||||||
public string M3UUrl { get; set; }
|
public string M3UUrl { get; set; }
|
||||||
public string InfoUrl { get; set; }
|
public string InfoUrl { get; set; }
|
||||||
@ -47,6 +48,7 @@ namespace MediaBrowser.Model.LiveTv
|
|||||||
public TunerHostInfo()
|
public TunerHostInfo()
|
||||||
{
|
{
|
||||||
IsEnabled = true;
|
IsEnabled = true;
|
||||||
|
AllowHWTranscoding = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,4 +72,4 @@ namespace MediaBrowser.Model.LiveTv
|
|||||||
EnableAllTuners = true;
|
EnableAllTuners = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,14 @@ namespace MediaBrowser.Model.Providers
|
|||||||
public string OpenSubtitlesPasswordHash { get; set; }
|
public string OpenSubtitlesPasswordHash { get; set; }
|
||||||
public bool IsOpenSubtitleVipAccount { get; set; }
|
public bool IsOpenSubtitleVipAccount { get; set; }
|
||||||
|
|
||||||
|
public bool RequirePerfectMatch { get; set; }
|
||||||
|
|
||||||
public SubtitleOptions()
|
public SubtitleOptions()
|
||||||
{
|
{
|
||||||
DownloadLanguages = new string[] { };
|
DownloadLanguages = new string[] { };
|
||||||
|
|
||||||
SkipIfAudioTrackMatches = true;
|
SkipIfAudioTrackMatches = true;
|
||||||
|
RequirePerfectMatch = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -532,6 +532,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
currentStreams.Concat(externalSubtitleStreams).ToList(),
|
currentStreams.Concat(externalSubtitleStreams).ToList(),
|
||||||
subtitleOptions.SkipIfEmbeddedSubtitlesPresent,
|
subtitleOptions.SkipIfEmbeddedSubtitlesPresent,
|
||||||
subtitleOptions.SkipIfAudioTrackMatches,
|
subtitleOptions.SkipIfAudioTrackMatches,
|
||||||
|
subtitleOptions.RequirePerfectMatch,
|
||||||
subtitleOptions.DownloadLanguages,
|
subtitleOptions.DownloadLanguages,
|
||||||
cancellationToken).ConfigureAwait(false);
|
cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
List<MediaStream> mediaStreams,
|
List<MediaStream> mediaStreams,
|
||||||
bool skipIfEmbeddedSubtitlesPresent,
|
bool skipIfEmbeddedSubtitlesPresent,
|
||||||
bool skipIfAudioTrackMatches,
|
bool skipIfAudioTrackMatches,
|
||||||
|
bool requirePerfectMatch,
|
||||||
IEnumerable<string> languages,
|
IEnumerable<string> languages,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
@ -59,7 +60,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var downloaded = await DownloadSubtitles(video, mediaStreams, skipIfEmbeddedSubtitlesPresent, skipIfAudioTrackMatches, lang, mediaType, cancellationToken)
|
var downloaded = await DownloadSubtitles(video, mediaStreams, skipIfEmbeddedSubtitlesPresent, skipIfAudioTrackMatches, requirePerfectMatch, lang, mediaType, cancellationToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
if (downloaded)
|
if (downloaded)
|
||||||
@ -80,6 +81,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
List<MediaStream> mediaStreams,
|
List<MediaStream> mediaStreams,
|
||||||
bool skipIfEmbeddedSubtitlesPresent,
|
bool skipIfEmbeddedSubtitlesPresent,
|
||||||
bool skipIfAudioTrackMatches,
|
bool skipIfAudioTrackMatches,
|
||||||
|
bool requirePerfectMatch,
|
||||||
string language,
|
string language,
|
||||||
VideoContentType mediaType,
|
VideoContentType mediaType,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
@ -125,7 +127,9 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
ProviderIds = video.ProviderIds,
|
ProviderIds = video.ProviderIds,
|
||||||
|
|
||||||
// Stop as soon as we find something
|
// Stop as soon as we find something
|
||||||
SearchAllProviders = false
|
SearchAllProviders = false,
|
||||||
|
|
||||||
|
IsPerfectMatch = requirePerfectMatch
|
||||||
};
|
};
|
||||||
|
|
||||||
var episode = video as Episode;
|
var episode = video as Episode;
|
||||||
|
@ -116,6 +116,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
mediaStreams,
|
mediaStreams,
|
||||||
options.SkipIfEmbeddedSubtitlesPresent,
|
options.SkipIfEmbeddedSubtitlesPresent,
|
||||||
options.SkipIfAudioTrackMatches,
|
options.SkipIfAudioTrackMatches,
|
||||||
|
options.RequirePerfectMatch,
|
||||||
options.DownloadLanguages,
|
options.DownloadLanguages,
|
||||||
cancellationToken).ConfigureAwait(false);
|
cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
@ -308,8 +308,8 @@ namespace MediaBrowser.Providers.Subtitles
|
|||||||
// Avoid implicitly captured closure
|
// Avoid implicitly captured closure
|
||||||
var hasCopy = hash;
|
var hasCopy = hash;
|
||||||
|
|
||||||
return results.Where(x => x.SubBad == "0" && mediaFilter(x))
|
return results.Where(x => x.SubBad == "0" && mediaFilter(x) && (!request.IsPerfectMatch || string.Equals(x.MovieHash, hash, StringComparison.OrdinalIgnoreCase)))
|
||||||
.OrderBy(x => (x.MovieHash == hash ? 0 : 1))
|
.OrderBy(x => (string.Equals(x.MovieHash, hash, StringComparison.OrdinalIgnoreCase) ? 0 : 1))
|
||||||
.ThenBy(x => Math.Abs(long.Parse(x.MovieByteSize, _usCulture) - movieByteSize))
|
.ThenBy(x => Math.Abs(long.Parse(x.MovieByteSize, _usCulture) - movieByteSize))
|
||||||
.ThenByDescending(x => int.Parse(x.SubDownloadsCnt, _usCulture))
|
.ThenByDescending(x => int.Parse(x.SubDownloadsCnt, _usCulture))
|
||||||
.ThenByDescending(x => double.Parse(x.SubRating, _usCulture))
|
.ThenByDescending(x => double.Parse(x.SubRating, _usCulture))
|
||||||
|
@ -263,18 +263,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
videoCodec = "h264";
|
videoCodec = "h264";
|
||||||
videoBitrate = 15000000;
|
videoBitrate = 15000000;
|
||||||
}
|
}
|
||||||
else if (string.Equals(profile, "internet720", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
width = 1280;
|
|
||||||
height = 720;
|
|
||||||
isInterlaced = false;
|
|
||||||
videoCodec = "h264";
|
|
||||||
videoBitrate = 8000000;
|
|
||||||
}
|
|
||||||
else if (string.Equals(profile, "internet540", StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(profile, "internet540", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
width = 1280;
|
width = 960;
|
||||||
height = 720;
|
height = 546;
|
||||||
isInterlaced = false;
|
isInterlaced = false;
|
||||||
videoCodec = "h264";
|
videoCodec = "h264";
|
||||||
videoBitrate = 2500000;
|
videoBitrate = 2500000;
|
||||||
@ -397,10 +389,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
string model = await GetModelInfo(info, cancellationToken).ConfigureAwait(false);
|
string model = await GetModelInfo(info, cancellationToken).ConfigureAwait(false);
|
||||||
model = model ?? string.Empty;
|
model = model ?? string.Empty;
|
||||||
|
|
||||||
if (model.IndexOf("hdtc", StringComparison.OrdinalIgnoreCase) != -1)
|
if (info.AllowHWTranscoding && (model.IndexOf("hdtc", StringComparison.OrdinalIgnoreCase) != -1))
|
||||||
{
|
{
|
||||||
list.Add(await GetMediaSource(info, hdhrId, "heavy").ConfigureAwait(false));
|
list.Add(await GetMediaSource(info, hdhrId, "heavy").ConfigureAwait(false));
|
||||||
|
|
||||||
|
list.Add(await GetMediaSource(info, hdhrId, "internet540").ConfigureAwait(false));
|
||||||
list.Add(await GetMediaSource(info, hdhrId, "internet480").ConfigureAwait(false));
|
list.Add(await GetMediaSource(info, hdhrId, "internet480").ConfigureAwait(false));
|
||||||
list.Add(await GetMediaSource(info, hdhrId, "internet360").ConfigureAwait(false));
|
list.Add(await GetMediaSource(info, hdhrId, "internet360").ConfigureAwait(false));
|
||||||
list.Add(await GetMediaSource(info, hdhrId, "internet240").ConfigureAwait(false));
|
list.Add(await GetMediaSource(info, hdhrId, "internet240").ConfigureAwait(false));
|
||||||
|
@ -146,6 +146,9 @@
|
|||||||
<Content Include="dashboard-ui\components\remotecontrolautoplay.js">
|
<Content Include="dashboard-ui\components\remotecontrolautoplay.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\components\servertestermessage.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\components\viewcontainer-lite.js">
|
<Content Include="dashboard-ui\components\viewcontainer-lite.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user