aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Sync/AppSyncProvider.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-02-23 14:13:07 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-02-23 14:13:07 -0500
commite391ee1b1724c44c3a12bca24f3dff9389de4b8b (patch)
treea8174e5dd1adaa876f32b00495becbd1a9246924 /Emby.Server.Implementations/Sync/AppSyncProvider.cs
parent34171a7507d393d2afbe0f4dd2719f9067441e8a (diff)
update components
Diffstat (limited to 'Emby.Server.Implementations/Sync/AppSyncProvider.cs')
-rw-r--r--Emby.Server.Implementations/Sync/AppSyncProvider.cs118
1 files changed, 0 insertions, 118 deletions
diff --git a/Emby.Server.Implementations/Sync/AppSyncProvider.cs b/Emby.Server.Implementations/Sync/AppSyncProvider.cs
deleted file mode 100644
index d405a0ff9..000000000
--- a/Emby.Server.Implementations/Sync/AppSyncProvider.cs
+++ /dev/null
@@ -1,118 +0,0 @@
-using MediaBrowser.Controller.Devices;
-using MediaBrowser.Controller.Sync;
-using MediaBrowser.Model.Devices;
-using MediaBrowser.Model.Dlna;
-using MediaBrowser.Model.Sync;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Emby.Server.Implementations.Sync
-{
- public class AppSyncProvider : ISyncProvider, IHasUniqueTargetIds, IHasSyncQuality, IHasDuplicateCheck
- {
- private readonly IDeviceManager _deviceManager;
-
- public AppSyncProvider(IDeviceManager deviceManager)
- {
- _deviceManager = deviceManager;
- }
-
- public IEnumerable<SyncTarget> GetSyncTargets(string userId)
- {
- return _deviceManager.GetDevices(new DeviceQuery
- {
- SupportsSync = true,
- UserId = userId
-
- }).Items.Select(i => new SyncTarget
- {
- Id = i.Id,
- Name = i.Name
- });
- }
-
- public DeviceProfile GetDeviceProfile(SyncTarget target, string profile, string quality)
- {
- var caps = _deviceManager.GetCapabilities(target.Id);
-
- var deviceProfile = caps == null || caps.DeviceProfile == null ? new DeviceProfile() : caps.DeviceProfile;
- deviceProfile.MaxStaticBitrate = SyncHelper.AdjustBitrate(deviceProfile.MaxStaticBitrate, quality);
-
- return deviceProfile;
- }
-
- public string Name
- {
- get { return "Mobile Sync"; }
- }
-
- public IEnumerable<SyncTarget> GetAllSyncTargets()
- {
- return _deviceManager.GetDevices(new DeviceQuery
- {
- SupportsSync = true
-
- }).Items.Select(i => new SyncTarget
- {
- Id = i.Id,
- Name = i.Name
- });
- }
-
- public IEnumerable<SyncQualityOption> GetQualityOptions(SyncTarget target)
- {
- return new List<SyncQualityOption>
- {
- new SyncQualityOption
- {
- Name = "Original",
- Id = "original",
- Description = "Syncs original files as-is, regardless of whether the device is capable of playing them or not."
- },
- new SyncQualityOption
- {
- Name = "High",
- Id = "high",
- IsDefault = true
- },
- new SyncQualityOption
- {
- Name = "Medium",
- Id = "medium"
- },
- new SyncQualityOption
- {
- Name = "Low",
- Id = "low"
- },
- new SyncQualityOption
- {
- Name = "Custom",
- Id = "custom"
- }
- };
- }
-
- public IEnumerable<SyncProfileOption> GetProfileOptions(SyncTarget target)
- {
- return new List<SyncProfileOption>();
- }
-
- public SyncJobOptions GetSyncJobOptions(SyncTarget target, string profile, string quality)
- {
- var isConverting = !string.Equals(quality, "original", StringComparison.OrdinalIgnoreCase);
-
- return new SyncJobOptions
- {
- DeviceProfile = GetDeviceProfile(target, profile, quality),
- IsConverting = isConverting
- };
- }
-
- public bool AllowDuplicateJobItem(SyncJobItem original, SyncJobItem duplicate)
- {
- return false;
- }
- }
-}