forked from musicbeeremote/mbrc-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MockNowPlaying.cs
33 lines (30 loc) · 960 Bytes
/
MockNowPlaying.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Collections.Generic;
using System.Linq;
using MusicBeeRemote.Core.Model.Entities;
namespace MbrcTester
{
public class MockNowPlaying
{
public List<MockTrackMetadata> NowPlayingList { get; } = new List<MockTrackMetadata>();
public IEnumerable<NowPlaying> GetNowPlaying()
{
return NowPlayingList.Select((metadata, index) => new NowPlaying()
{
Artist = metadata.Artist,
Path = metadata._id,
Position = index,
Title = metadata.Title
});
}
public IEnumerable<NowPlayingListTrack> GetNowPlayingLegacy()
{
return NowPlayingList.Select((metadata, index) => new NowPlayingListTrack()
{
Artist = metadata.Artist,
Path = metadata.Album,
Position = index,
Title = metadata.Title
});
}
}
}