commit
b3640fbc9a
|
@ -882,15 +882,6 @@ namespace Emby.Server.Implementations.Dto
|
|||
dto.AspectRatio = hasAspectRatio.AspectRatio;
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.Metascore))
|
||||
{
|
||||
var hasMetascore = item as IHasMetascore;
|
||||
if (hasMetascore != null)
|
||||
{
|
||||
dto.Metascore = hasMetascore.Metascore;
|
||||
}
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.AwardSummary))
|
||||
{
|
||||
var hasAwards = item as IHasAwards;
|
||||
|
|
|
@ -247,7 +247,6 @@
|
|||
<Compile Include="Sorting\IsFolderComparer.cs" />
|
||||
<Compile Include="Sorting\IsPlayedComparer.cs" />
|
||||
<Compile Include="Sorting\IsUnplayedComparer.cs" />
|
||||
<Compile Include="Sorting\MetascoreComparer.cs" />
|
||||
<Compile Include="Sorting\NameComparer.cs" />
|
||||
<Compile Include="Sorting\OfficialRatingComparer.cs" />
|
||||
<Compile Include="Sorting\PlayCountComparer.cs" />
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
|
||||
namespace Emby.Server.Implementations.Sorting
|
||||
{
|
||||
public class MetascoreComparer : IBaseItemComparer
|
||||
{
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
/// </summary>
|
||||
/// <param name="x">The x.</param>
|
||||
/// <param name="y">The y.</param>
|
||||
/// <returns>System.Int32.</returns>
|
||||
public int Compare(BaseItem x, BaseItem y)
|
||||
{
|
||||
return GetValue(x).CompareTo(GetValue(y));
|
||||
}
|
||||
|
||||
private float GetValue(BaseItem x)
|
||||
{
|
||||
var hasMetascore = x as IHasMetascore;
|
||||
|
||||
if (hasMetascore != null)
|
||||
{
|
||||
return hasMetascore.Metascore ?? 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get { return ItemSortBy.Metascore; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -336,12 +336,6 @@ namespace MediaBrowser.Api
|
|||
video.Video3DFormat = request.Video3DFormat;
|
||||
}
|
||||
|
||||
var hasMetascore = item as IHasMetascore;
|
||||
if (hasMetascore != null)
|
||||
{
|
||||
hasMetascore.Metascore = request.Metascore;
|
||||
}
|
||||
|
||||
var hasAwards = item as IHasAwards;
|
||||
if (hasAwards != null)
|
||||
{
|
||||
|
|
|
@ -761,11 +761,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
Logger.Debug("Query requires post-filtering due to ItemSortBy.GameSystem");
|
||||
return true;
|
||||
}
|
||||
if (query.SortBy.Contains(ItemSortBy.Metascore, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
Logger.Debug("Query requires post-filtering due to ItemSortBy.Metascore");
|
||||
return true;
|
||||
}
|
||||
if (query.SortBy.Contains(ItemSortBy.Players, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
Logger.Debug("Query requires post-filtering due to ItemSortBy.Players");
|
||||
|
@ -778,12 +773,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
}
|
||||
}
|
||||
|
||||
if (query.ItemIds.Length > 0)
|
||||
{
|
||||
Logger.Debug("Query requires post-filtering due to ItemIds");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (query.IsInBoxSet.HasValue)
|
||||
{
|
||||
Logger.Debug("Query requires post-filtering due to IsInBoxSet");
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHasMetascore
|
||||
/// </summary>
|
||||
public interface IHasMetascore
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the metascore.
|
||||
/// </summary>
|
||||
/// <value>The metascore.</value>
|
||||
float? Metascore { get; set; }
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||
/// <summary>
|
||||
/// Class Movie
|
||||
/// </summary>
|
||||
public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasAwards, IHasMetascore, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
||||
public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasAwards, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
||||
{
|
||||
public List<Guid> SpecialFeatureIds { get; set; }
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@
|
|||
<Compile Include="Entities\IHasImages.cs" />
|
||||
<Compile Include="Entities\KeywordExtensions.cs" />
|
||||
<Compile Include="Entities\IHasMediaSources.cs" />
|
||||
<Compile Include="Entities\IHasMetascore.cs" />
|
||||
<Compile Include="Entities\IHasProgramAttributes.cs" />
|
||||
<Compile Include="Entities\IHasScreenshots.cs" />
|
||||
<Compile Include="Entities\IHasSeries.cs" />
|
||||
|
|
|
@ -1741,13 +1741,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
return "-c:v h264_qsv ";
|
||||
}
|
||||
break;
|
||||
case "hevc":
|
||||
case "h265":
|
||||
if (_mediaEncoder.SupportsDecoder("hevc_qsv"))
|
||||
{
|
||||
return "-c:v hevc_qsv ";
|
||||
}
|
||||
break;
|
||||
//case "hevc":
|
||||
//case "h265":
|
||||
// if (_mediaEncoder.SupportsDecoder("hevc_qsv"))
|
||||
// {
|
||||
// return "-c:v hevc_qsv ";
|
||||
// }
|
||||
// break;
|
||||
case "mpeg2video":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg2_qsv"))
|
||||
{
|
||||
|
|
|
@ -207,22 +207,6 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
|||
break;
|
||||
}
|
||||
|
||||
case "Metascore":
|
||||
{
|
||||
var text = reader.ReadElementContentAsString();
|
||||
var hasMetascore = item as IHasMetascore;
|
||||
if (hasMetascore != null)
|
||||
{
|
||||
float value;
|
||||
if (float.TryParse(text, NumberStyles.Any, _usCulture, out value))
|
||||
{
|
||||
hasMetascore.Metascore = value;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "AwardSummary":
|
||||
{
|
||||
var text = reader.ReadElementContentAsString();
|
||||
|
|
|
@ -68,7 +68,6 @@ namespace MediaBrowser.LocalMetadata.Savers
|
|||
"LockData",
|
||||
"LockedFields",
|
||||
"Format3D",
|
||||
"Metascore",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"MPAARating",
|
||||
|
@ -421,12 +420,6 @@ namespace MediaBrowser.LocalMetadata.Savers
|
|||
writer.WriteElementString("DisplayOrder", hasDisplayOrder.DisplayOrder);
|
||||
}
|
||||
|
||||
var hasMetascore = item as IHasMetascore;
|
||||
if (hasMetascore != null && hasMetascore.Metascore.HasValue)
|
||||
{
|
||||
writer.WriteElementString("Metascore", hasMetascore.Metascore.Value.ToString(UsCulture));
|
||||
}
|
||||
|
||||
var hasAwards = item as IHasAwards;
|
||||
if (hasAwards != null && !string.IsNullOrEmpty(hasAwards.AwardSummary))
|
||||
{
|
||||
|
|
|
@ -81,8 +81,6 @@ namespace MediaBrowser.Model.Dto
|
|||
|
||||
public string AwardSummary { get; set; }
|
||||
|
||||
public float? Metascore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports synchronize].
|
||||
/// </summary>
|
||||
|
|
|
@ -122,11 +122,6 @@
|
|||
/// </summary>
|
||||
MediaSources,
|
||||
|
||||
/// <summary>
|
||||
/// The metascore
|
||||
/// </summary>
|
||||
Metascore,
|
||||
|
||||
OfficialRatingDescription,
|
||||
|
||||
OriginalTitle,
|
||||
|
|
|
@ -71,7 +71,6 @@ namespace MediaBrowser.Model.Querying
|
|||
public const string SeriesSortName = "SeriesSortName";
|
||||
public const string VideoBitRate = "VideoBitRate";
|
||||
public const string AirTime = "AirTime";
|
||||
public const string Metascore = "Metascore";
|
||||
public const string Studio = "Studio";
|
||||
public const string Players = "Players";
|
||||
public const string GameSystem = "GameSystem";
|
||||
|
|
|
@ -195,7 +195,6 @@ namespace MediaBrowser.Providers.Manager
|
|||
}
|
||||
|
||||
MergeAlbumArtist(source, target, lockedFields, replaceData);
|
||||
MergeMetascore(source, target, lockedFields, replaceData);
|
||||
MergeCriticRating(source, target, lockedFields, replaceData);
|
||||
MergeAwards(source, target, lockedFields, replaceData);
|
||||
MergeTrailers(source, target, lockedFields, replaceData);
|
||||
|
@ -246,20 +245,6 @@ namespace MediaBrowser.Providers.Manager
|
|||
}
|
||||
}
|
||||
|
||||
private static void MergeMetascore(BaseItem source, BaseItem target, List<MetadataFields> lockedFields, bool replaceData)
|
||||
{
|
||||
var sourceCast = source as IHasMetascore;
|
||||
var targetCast = target as IHasMetascore;
|
||||
|
||||
if (sourceCast != null && targetCast != null)
|
||||
{
|
||||
if (replaceData || !targetCast.Metascore.HasValue)
|
||||
{
|
||||
targetCast.Metascore = sourceCast.Metascore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void MergeAwards(BaseItem source, BaseItem target, List<MetadataFields> lockedFields, bool replaceData)
|
||||
{
|
||||
var sourceCast = source as IHasAwards;
|
||||
|
|
|
@ -409,17 +409,6 @@ namespace MediaBrowser.Providers.Omdb
|
|||
}
|
||||
}
|
||||
|
||||
var hasMetascore = item as IHasMetascore;
|
||||
if (hasMetascore != null)
|
||||
{
|
||||
float metascore;
|
||||
|
||||
if (!string.IsNullOrEmpty(result.Metascore) && float.TryParse(result.Metascore, NumberStyles.Any, _usCulture, out metascore) && metascore >= 0)
|
||||
{
|
||||
hasMetascore.Metascore = metascore;
|
||||
}
|
||||
}
|
||||
|
||||
var hasAwards = item as IHasAwards;
|
||||
if (hasAwards != null && !string.IsNullOrEmpty(result.Awards))
|
||||
{
|
||||
|
|
|
@ -207,7 +207,7 @@ namespace MediaBrowser.ServerApplication
|
|||
{
|
||||
_logger.Info("Found a duplicate process. Giving it time to exit.");
|
||||
|
||||
if (!duplicate.WaitForExit(30000))
|
||||
if (!duplicate.WaitForExit(40000))
|
||||
{
|
||||
_logger.Info("The duplicate process did not exit.");
|
||||
return true;
|
||||
|
|
|
@ -320,22 +320,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
break;
|
||||
}
|
||||
|
||||
case "metascore":
|
||||
{
|
||||
var text = reader.ReadElementContentAsString();
|
||||
var hasMetascore = item as IHasMetascore;
|
||||
if (hasMetascore != null)
|
||||
{
|
||||
float value;
|
||||
if (float.TryParse(text, NumberStyles.Any, _usCulture, out value))
|
||||
{
|
||||
hasMetascore.Metascore = value;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "awardsummary":
|
||||
{
|
||||
var text = reader.ReadElementContentAsString();
|
||||
|
|
|
@ -87,7 +87,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
"awardsummary",
|
||||
"enddate",
|
||||
"lockedfields",
|
||||
"metascore",
|
||||
"zap2itid",
|
||||
"tvrageid",
|
||||
"gamesdbid",
|
||||
|
@ -683,12 +682,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
writer.WriteElementString("votes", item.VoteCount.Value.ToString(UsCulture));
|
||||
}
|
||||
|
||||
var hasMetascore = item as IHasMetascore;
|
||||
if (hasMetascore != null && hasMetascore.Metascore.HasValue)
|
||||
{
|
||||
writer.WriteElementString("metascore", hasMetascore.Metascore.Value.ToString(UsCulture));
|
||||
}
|
||||
|
||||
// Use original runtime here, actual file runtime later in MediaInfo
|
||||
var runTimeTicks = item.RunTimeTicks;
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.2.10.2")]
|
||||
[assembly: AssemblyVersion("3.2.10.3")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user