using new api

This commit is contained in:
watsonb8 2020-02-02 17:28:34 -05:00
parent 51ab2d9c42
commit be5c9a8de0
4 changed files with 12 additions and 6 deletions

View File

@ -7,6 +7,8 @@ using Aurora.Design.Views.Profile;
using Aurora.Design.Views.Songs; using Aurora.Design.Views.Songs;
using Aurora.Design.Views.Stations; using Aurora.Design.Views.Stations;
using Aurora.Services.EventManager; using Aurora.Services.EventManager;
using Aurora.Services.Server;
using Aurora.Services.Client;
using Autofac; using Autofac;
using LibVLCSharp.Shared; using LibVLCSharp.Shared;
using Xamarin.Forms; using Xamarin.Forms;
@ -31,6 +33,8 @@ namespace Aurora
_builder.RegisterType<SettingsService>().As<ISettingsService>().SingleInstance(); _builder.RegisterType<SettingsService>().As<ISettingsService>().SingleInstance();
_builder.RegisterType<LibraryService>().As<ILibraryService>().SingleInstance(); _builder.RegisterType<LibraryService>().As<ILibraryService>().SingleInstance();
_builder.RegisterType<EventManager>().As<IEventManager>().SingleInstance(); _builder.RegisterType<EventManager>().As<IEventManager>().SingleInstance();
_builder.RegisterType<ServerService>().As<IServerService>().SingleInstance();
_builder.RegisterType<ClientService>().As<IClientService>().SingleInstance();
_builder.RegisterType<MainView>().SingleInstance(); _builder.RegisterType<MainView>().SingleInstance();
_builder.RegisterType<AlbumsViewModel>(); _builder.RegisterType<AlbumsViewModel>();
_builder.RegisterType<ArtistsViewModel>(); _builder.RegisterType<ArtistsViewModel>();

View File

@ -24,7 +24,7 @@ namespace Aurora.Design.Views.Party
Hosting, Hosting,
Connecting, Connecting,
} }
public delegate void EventHandler(BaseEvent e); delegate void EventHandler(BaseEvent e);
public class PartyViewModel : BaseViewModel public class PartyViewModel : BaseViewModel
{ {
private PartyState _state; private PartyState _state;
@ -47,7 +47,8 @@ namespace Aurora.Design.Views.Party
public PartyViewModel( public PartyViewModel(
ISettingsService settingsService, ISettingsService settingsService,
IServerService serverService, IServerService serverService,
IEventManager eventManager) IEventManager eventManager,
IClientService clientService)
{ {
_members = new ObservableCollection<Member>(); _members = new ObservableCollection<Member>();
_queue = new ObservableCollection<BaseMedia>(); _queue = new ObservableCollection<BaseMedia>();
@ -55,6 +56,7 @@ namespace Aurora.Design.Views.Party
this._settingsService = settingsService; this._settingsService = settingsService;
this._serverService = serverService; this._serverService = serverService;
this._eventManager = eventManager; this._eventManager = eventManager;
this._clientService = clientService;
SetState(PartyState.SelectingHost); SetState(PartyState.SelectingHost);
@ -282,7 +284,7 @@ namespace Aurora.Design.Views.Party
try try
{ {
SetState(PartyState.Hosting); SetState(PartyState.Hosting);
// await _clientService.RemotePartyServiceClient.GetEvents().ConfigureAwait(true); await GetEvents().ConfigureAwait(false);
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -41,8 +41,6 @@ namespace Aurora.Services.Server.Controllers
IpAddress = ServerService.GetLocalIPAddress(), IpAddress = ServerService.GetLocalIPAddress(),
}; };
this._memberList.Add(_hostMember.Name, _hostMember);
//Add media from library //Add media from library
//This will change as queuing operation gets solidified //This will change as queuing operation gets solidified
//Simply return the hosts library //Simply return the hosts library

View File

@ -67,7 +67,9 @@ namespace Aurora.Services.Server.Controllers
{ {
ILibraryService library = scope.Resolve<ILibraryService>(); ILibraryService library = scope.Resolve<ILibraryService>();
BaseMedia originalSong = library.GetSong(request.Name); string mediaName = request.Name.Split('/')[1];
BaseMedia originalSong = library.GetSong(mediaName);
if (!(originalSong is LocalAudio)) if (!(originalSong is LocalAudio))
{ {
return; return;