mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
consolidate internal interfaces
This commit is contained in:
@@ -123,8 +123,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
|
||||
return;
|
||||
}
|
||||
|
||||
var themeMedia = item as IThemeMedia;
|
||||
if (themeMedia != null && themeMedia.IsThemeMedia)
|
||||
if (item.IsThemeMedia)
|
||||
{
|
||||
// Don't report theme song or local trailer playback
|
||||
return;
|
||||
@@ -156,8 +155,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
|
||||
return;
|
||||
}
|
||||
|
||||
var themeMedia = item as IThemeMedia;
|
||||
if (themeMedia != null && themeMedia.IsThemeMedia)
|
||||
if (item.IsThemeMedia)
|
||||
{
|
||||
// Don't report theme song or local trailer playback
|
||||
return;
|
||||
|
||||
@@ -256,9 +256,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||
}
|
||||
|
||||
var item = e.MediaInfo;
|
||||
var themeMedia = item as IThemeMedia;
|
||||
|
||||
if (themeMedia != null && themeMedia.IsThemeMedia)
|
||||
if ( item.IsThemeMedia)
|
||||
{
|
||||
// Don't report theme song or local trailer playback
|
||||
return;
|
||||
|
||||
@@ -367,7 +367,6 @@
|
||||
<Compile Include="Persistence\SqliteUserDataRepository.cs" />
|
||||
<Compile Include="Persistence\SqliteUserRepository.cs" />
|
||||
<Compile Include="Sorting\StudioComparer.cs" />
|
||||
<Compile Include="Sorting\VideoBitRateComparer.cs" />
|
||||
<Compile Include="Sync\AppSyncProvider.cs" />
|
||||
<Compile Include="Sync\CloudSyncProfile.cs" />
|
||||
<Compile Include="Sync\IHasSyncQuality.cs" />
|
||||
|
||||
@@ -1611,7 +1611,8 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
IndexNumber = item.IndexNumber,
|
||||
ParentIndexNumber = item.ParentIndexNumber,
|
||||
PremiereDate = item.PremiereDate,
|
||||
ProductionYear = item.ProductionYear
|
||||
ProductionYear = item.ProductionYear,
|
||||
IsThemeMedia = item.IsThemeMedia
|
||||
};
|
||||
|
||||
info.PrimaryImageTag = GetImageCacheTag(item, ImageType.Primary);
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Sorting
|
||||
{
|
||||
class VideoBitRateComparer : 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 int GetValue(BaseItem item)
|
||||
{
|
||||
var video = item as Video;
|
||||
|
||||
if (video != null)
|
||||
{
|
||||
return video.VideoBitRate ?? 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get { return ItemSortBy.VideoBitRate; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user