|
|
|
@ -20,13 +20,14 @@ namespace QuickPlay
|
|
|
|
|
// MpcCore uses strings, so be it
|
|
|
|
|
string mpdIP, mpdPort;
|
|
|
|
|
|
|
|
|
|
public Dictionary<string, IPlayable> Songs { get; private set; }
|
|
|
|
|
public Dictionary<string, IPlayable> Songs { get; private set; }
|
|
|
|
|
public string PlayerName { get; private set; }
|
|
|
|
|
public float CurrentProgress { get {
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
} }
|
|
|
|
|
public bool IsReady { get
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
return mpd.IsConnected;
|
|
|
|
|
} }
|
|
|
|
|
public void Play(string songId)
|
|
|
|
|
{
|
|
|
|
@ -40,6 +41,7 @@ namespace QuickPlay
|
|
|
|
|
{
|
|
|
|
|
// Populate known fields/properties
|
|
|
|
|
Songs = cfg.songs;
|
|
|
|
|
PlayerName = cfg.playerName;
|
|
|
|
|
// NOTE: We separate the port by '@', since ':' could be part of IPv6 and we do not want to complicate parsing.
|
|
|
|
|
var connDetails = cfg.playerConnectionDetails.Split('@');
|
|
|
|
|
if (connDetails.Length > 2) throw new InvalidOperationException("Bad connection details");
|
|
|
|
|