You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
44 lines
1.0 KiB
using MediaBrowser.Controller.Devices;
|
|
using MediaBrowser.Controller.Sync;
|
|
using MediaBrowser.Model.Devices;
|
|
using MediaBrowser.Model.Dlna;
|
|
using MediaBrowser.Model.Sync;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace MediaBrowser.Server.Implementations.Sync
|
|
{
|
|
public class AppSyncProvider : ISyncProvider
|
|
{
|
|
private readonly IDeviceManager _deviceManager;
|
|
|
|
public AppSyncProvider(IDeviceManager deviceManager)
|
|
{
|
|
_deviceManager = deviceManager;
|
|
}
|
|
|
|
public IEnumerable<SyncTarget> GetSyncTargets()
|
|
{
|
|
return _deviceManager.GetDevices(new DeviceQuery
|
|
{
|
|
SupportsSync = true
|
|
|
|
}).Items.Select(i => new SyncTarget
|
|
{
|
|
Id = i.Id,
|
|
Name = i.Name
|
|
});
|
|
}
|
|
|
|
public DeviceProfile GetDeviceProfile(SyncTarget target)
|
|
{
|
|
return new DeviceProfile();
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get { return "App Sync"; }
|
|
}
|
|
}
|
|
}
|