more mpris

This commit is contained in:
Royce551 2021-06-03 21:59:41 -05:00
parent a94ce2abed
commit 4f8cd9b2bd
2 changed files with 9 additions and 4 deletions

View file

@ -22,12 +22,17 @@ namespace FRESHMusicPlayer.Handlers.Integrations
public async Task Initialize()
{
Console.WriteLine("Initializing");
var server = new ServerConnectionOptions();
using var connection = new Connection(server);
Console.WriteLine("2");
using var connection = new Connection(Address.Session);
Console.WriteLine("3");
await connection.ConnectAsync();
Console.WriteLine("4");
await connection.RegisterObjectAsync(player);
Console.WriteLine("5");
await connection.RegisterServiceAsync("org.mpris.MediaPlayer2.FRESHMusicPlayer");
Console.WriteLine("Initialization Complete");
}
public void Dispose()

View file

@ -14,12 +14,12 @@ namespace FRESHMusicPlayer.Handlers.Integrations
public void Dispose()
{
Debug.WriteLine("disposing");
Console.WriteLine("disposing");
}
public void Update(Track track, PlaybackStatus status)
{
Debug.WriteLine($"{track.Artist} - {track.Title}; Now {status}");
Console.WriteLine($"{track.Artist} - {track.Title}; Now {status}");
}
}
}