diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index e8223ef100..27beabcc1f 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -345,7 +345,6 @@ - diff --git a/MediaBrowser.Controller/Sync/ICloudSyncProvider.cs b/MediaBrowser.Controller/Sync/ICloudSyncProvider.cs index dae7faef8d..f9327a71c3 100644 --- a/MediaBrowser.Controller/Sync/ICloudSyncProvider.cs +++ b/MediaBrowser.Controller/Sync/ICloudSyncProvider.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using MediaBrowser.Model.Sync; +using System.Collections.Generic; namespace MediaBrowser.Controller.Sync { @@ -13,7 +14,8 @@ namespace MediaBrowser.Controller.Sync /// /// Gets the synchronize targets. /// + /// The user identifier. /// IEnumerable<SyncTarget>. - IEnumerable GetSyncAccounts(); + IEnumerable GetSyncTargets(string userId); } } diff --git a/MediaBrowser.Controller/Sync/ISyncProvider.cs b/MediaBrowser.Controller/Sync/ISyncProvider.cs index af08edb5ea..6f24eac1ae 100644 --- a/MediaBrowser.Controller/Sync/ISyncProvider.cs +++ b/MediaBrowser.Controller/Sync/ISyncProvider.cs @@ -12,12 +12,6 @@ namespace MediaBrowser.Controller.Sync /// The name. string Name { get; } - /// - /// Gets the synchronize targets. - /// - /// IEnumerable<SyncTarget>. - IEnumerable GetSyncTargets(); - /// /// Gets the synchronize targets. /// diff --git a/MediaBrowser.Controller/Sync/SyncAccount.cs b/MediaBrowser.Controller/Sync/SyncAccount.cs deleted file mode 100644 index 882e948d1b..0000000000 --- a/MediaBrowser.Controller/Sync/SyncAccount.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections.Generic; - -namespace MediaBrowser.Controller.Sync -{ - public class SyncAccount - { - /// - /// Gets or sets the name. - /// - /// The name. - public string Name { get; set; } - /// - /// Gets or sets the identifier. - /// - /// The identifier. - public string Id { get; set; } - /// - /// Gets or sets the user identifier. - /// - /// The user identifier. - public List UserIds { get; set; } - - public SyncAccount() - { - UserIds = new List(); - } - } -} diff --git a/MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs b/MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs index 6cc5be9555..d35ff8fc46 100644 --- a/MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs +++ b/MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs @@ -17,19 +17,6 @@ namespace MediaBrowser.Server.Implementations.Sync _deviceManager = deviceManager; } - public IEnumerable GetSyncTargets() - { - return _deviceManager.GetDevices(new DeviceQuery - { - SupportsSync = true - - }).Items.Select(i => new SyncTarget - { - Id = i.Id, - Name = i.Name - }); - } - public IEnumerable GetSyncTargets(string userId) { return _deviceManager.GetDevices(new DeviceQuery diff --git a/MediaBrowser.Server.Implementations/Sync/CloudSyncProvider.cs b/MediaBrowser.Server.Implementations/Sync/CloudSyncProvider.cs index a843772384..59713b1384 100644 --- a/MediaBrowser.Server.Implementations/Sync/CloudSyncProvider.cs +++ b/MediaBrowser.Server.Implementations/Sync/CloudSyncProvider.cs @@ -19,16 +19,9 @@ namespace MediaBrowser.Server.Implementations.Sync _providers = appHost.GetExports().ToArray(); } - public IEnumerable GetSyncTargets() - { - return _providers - .SelectMany(i => i.GetSyncAccounts().Select(a => GetSyncTarget(i, a))); - } - public IEnumerable GetSyncTargets(string userId) { - return _providers - .SelectMany(i => i.GetSyncAccounts().Where(a => a.UserIds.Contains(userId, StringComparer.OrdinalIgnoreCase)).Select(a => GetSyncTarget(i, a))); + return _providers.SelectMany(i => i.GetSyncTargets(userId)); } public DeviceProfile GetDeviceProfile(SyncTarget target) @@ -36,15 +29,6 @@ namespace MediaBrowser.Server.Implementations.Sync return new DeviceProfile(); } - private SyncTarget GetSyncTarget(ICloudSyncProvider provider, SyncAccount account) - { - return new SyncTarget - { - Name = account.Name, - Id = account.Name - }; - } - public string Name { get { return "Cloud Sync"; } diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index 1a65fba676..34759abd6c 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.560 + 3.0.561 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption. Copyright © Media Browser 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index d28f98aff4..fb39927749 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.560 + 3.0.561 MediaBrowser.Common Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec index d4b030ba1c..288293f293 100644 --- a/Nuget/MediaBrowser.Model.Signed.nuspec +++ b/Nuget/MediaBrowser.Model.Signed.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Model.Signed - 3.0.560 + 3.0.561 MediaBrowser.Model - Signed Edition Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index e5b7a27bae..be141bb4d6 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.560 + 3.0.561 Media Browser.Server.Core Media Browser Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Media Browser Server. Copyright © Media Browser 2013 - +