mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
add option to merge metadata and IBN paths
This commit is contained in:
@@ -83,5 +83,40 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
.Take(100)
|
||||
.OrderBy(i => Guid.NewGuid());
|
||||
}
|
||||
|
||||
public IEnumerable<Audio> GetInstantMixFromItem(BaseItem item, User user)
|
||||
{
|
||||
var genre = item as MusicGenre;
|
||||
if (genre != null)
|
||||
{
|
||||
return GetInstantMixFromGenres(new[] { item.Name }, user);
|
||||
}
|
||||
|
||||
var playlist = item as Playlist;
|
||||
if (playlist != null)
|
||||
{
|
||||
return GetInstantMixFromPlaylist(playlist, user);
|
||||
}
|
||||
|
||||
var album = item as MusicAlbum;
|
||||
if (album != null)
|
||||
{
|
||||
return GetInstantMixFromAlbum(album, user);
|
||||
}
|
||||
|
||||
var artist = item as MusicArtist;
|
||||
if (artist != null)
|
||||
{
|
||||
return GetInstantMixFromArtist(artist.Name, user);
|
||||
}
|
||||
|
||||
var song = item as Audio;
|
||||
if (song != null)
|
||||
{
|
||||
return GetInstantMixFromSong(song, user);
|
||||
}
|
||||
|
||||
return new Audio[] { };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user