jellyfin-server/MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs

44 lines
1.1 KiB
C#
Raw Normal View History

2014-12-15 05:49:04 +00:00
using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Sync;
using MediaBrowser.Model.Devices;
2014-07-22 01:29:06 +00:00
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Sync;
using System.Collections.Generic;
2014-12-15 05:49:04 +00:00
using System.Linq;
2014-07-22 01:29:06 +00:00
namespace MediaBrowser.Server.Implementations.Sync
{
2014-12-24 06:28:40 +00:00
public class AppSyncProvider : ISyncProvider, IHasUniqueTargetIds
2014-07-22 01:29:06 +00:00
{
2014-12-15 05:49:04 +00:00
private readonly IDeviceManager _deviceManager;
public AppSyncProvider(IDeviceManager deviceManager)
{
_deviceManager = deviceManager;
}
2014-07-22 01:29:06 +00:00
public IEnumerable<SyncTarget> GetSyncTargets()
{
2014-12-15 05:49:04 +00:00
return _deviceManager.GetDevices(new DeviceQuery
{
SupportsSync = true
}).Items.Select(i => new SyncTarget
{
Id = i.Id,
Name = i.Name
});
2014-07-22 01:29:06 +00:00
}
public DeviceProfile GetDeviceProfile(SyncTarget target)
{
2014-07-22 16:36:34 +00:00
return new DeviceProfile();
2014-07-22 01:29:06 +00:00
}
public string Name
{
get { return "App Sync"; }
}
}
}