Removed old proto definitions (not tested)
This commit is contained in:
@ -3,27 +3,23 @@ using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Aurora.Proto.General;
|
||||
using Aurora.Proto.Playback;
|
||||
using Aurora.Proto.Sync;
|
||||
using Aurora.Proto.Party;
|
||||
|
||||
namespace Aurora.Models.Media
|
||||
{
|
||||
public class RemoteAudio : BaseMedia
|
||||
{
|
||||
private RemotePlaybackService.RemotePlaybackServiceClient _remotePlaybackClient;
|
||||
private RemoteSyncService.RemoteSyncServiceClient _remoteSyncClient;
|
||||
private RemotePartyService.RemotePartyServiceClient _remotePartyService;
|
||||
private CancellationTokenSource _cancellationTokenSource;
|
||||
|
||||
#region Constructor
|
||||
public RemoteAudio(string id,
|
||||
bool fromHost,
|
||||
AudioMetadata metadata,
|
||||
RemotePlaybackService.RemotePlaybackServiceClient playbackClient,
|
||||
RemoteSyncService.RemoteSyncServiceClient syncClient)
|
||||
RemotePartyService.RemotePartyServiceClient partyClient)
|
||||
{
|
||||
this.Id = id;
|
||||
this._remotePlaybackClient = playbackClient;
|
||||
this._remoteSyncClient = syncClient;
|
||||
this._remotePartyService = partyClient;
|
||||
this.Metadata = metadata;
|
||||
this.FromHost = fromHost;
|
||||
|
||||
@ -41,11 +37,11 @@ namespace Aurora.Models.Media
|
||||
get { return MediaTypeEnum.Audio; }
|
||||
}
|
||||
|
||||
public RemoteSyncService.RemoteSyncServiceClient RemoteSyncClient
|
||||
public RemotePartyService.RemotePartyServiceClient RemotePartyServiceClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return _remoteSyncClient;
|
||||
return _remotePartyService;
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +54,7 @@ namespace Aurora.Models.Media
|
||||
public override async Task Load()
|
||||
{
|
||||
this.DataStream = new MemoryStream();
|
||||
using (var call = _remotePlaybackClient.GetSongStream(new SongRequest() { Id = this.Id }))
|
||||
using (var call = _remotePartyService.StreamMedia(new StreamMediaRequest { Name = this.Id }))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -5,17 +5,17 @@ namespace Aurora.Proto.Party
|
||||
/// <summary>
|
||||
/// Partial PartyMember class with a constructor that generates a new id
|
||||
/// </summary>
|
||||
public partial class PartyMember
|
||||
public partial class Member
|
||||
{
|
||||
public PartyMember(string id)
|
||||
public Member(string id)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
Id = id;
|
||||
Name = id;
|
||||
}
|
||||
else
|
||||
{
|
||||
Id = Guid.NewGuid().ToString();
|
||||
Name = Guid.NewGuid().ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user