mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-24 11:05:08 +01:00
fixes #506 - Song list - make columns headers clickable for sorting
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -30,28 +29,9 @@ namespace MediaBrowser.Server.Implementations.Sorting
|
||||
/// <returns>System.String.</returns>
|
||||
private string GetValue(BaseItem x)
|
||||
{
|
||||
var audio = x as Audio;
|
||||
var audio = x as IHasAlbumArtist;
|
||||
|
||||
if (audio != null)
|
||||
{
|
||||
return audio.AlbumArtist;
|
||||
}
|
||||
|
||||
var album = x as MusicAlbum;
|
||||
|
||||
if (album != null)
|
||||
{
|
||||
var song = album.RecursiveChildren
|
||||
.OfType<Audio>()
|
||||
.FirstOrDefault(i => !string.IsNullOrEmpty(i.AlbumArtist));
|
||||
|
||||
if (song != null)
|
||||
{
|
||||
return song.AlbumArtist;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return audio != null ? audio.AlbumArtist : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user