mirror of
https://github.com/Royce551/FRESHMusicPlayer.git
synced 2025-01-22 10:51:52 -05:00
more mpris
This commit is contained in:
parent
a94ce2abed
commit
4f8cd9b2bd
2 changed files with 9 additions and 4 deletions
|
@ -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()
|
||||
|
|
|
@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue