sync updates
This commit is contained in:
parent
5812a989c2
commit
2485b5c22d
|
@ -172,6 +172,6 @@ namespace MediaBrowser.Controller.Sync
|
|||
/// </summary>
|
||||
/// <param name="targetId">The target identifier.</param>
|
||||
/// <returns>IEnumerable<SyncQualityOption>.</returns>
|
||||
IEnumerable<SyncQualityOption> GetProfileOptions(string targetId);
|
||||
IEnumerable<SyncProfileOption> GetProfileOptions(string targetId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1133,8 +1133,8 @@
|
|||
<Compile Include="..\MediaBrowser.Model\Sync\SyncParameter.cs">
|
||||
<Link>Sync\SyncParameter.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Sync\SyncQuality.cs">
|
||||
<Link>Sync\SyncQuality.cs</Link>
|
||||
<Compile Include="..\MediaBrowser.Model\Sync\SyncProfileOption.cs">
|
||||
<Link>Sync\SyncProfileOption.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Sync\SyncQualityOption.cs">
|
||||
<Link>Sync\SyncQualityOption.cs</Link>
|
||||
|
|
|
@ -1092,8 +1092,8 @@
|
|||
<Compile Include="..\MediaBrowser.Model\Sync\SyncParameter.cs">
|
||||
<Link>Sync\SyncParameter.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Sync\SyncQuality.cs">
|
||||
<Link>Sync\SyncQuality.cs</Link>
|
||||
<Compile Include="..\MediaBrowser.Model\Sync\SyncProfileOption.cs">
|
||||
<Link>Sync\SyncProfileOption.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Sync\SyncQualityOption.cs">
|
||||
<Link>Sync\SyncQualityOption.cs</Link>
|
||||
|
|
|
@ -398,7 +398,7 @@
|
|||
<Compile Include="Sync\SyncJobStatus.cs" />
|
||||
<Compile Include="Sync\SyncOptions.cs" />
|
||||
<Compile Include="Sync\SyncParameter.cs" />
|
||||
<Compile Include="Sync\SyncQuality.cs" />
|
||||
<Compile Include="Sync\SyncProfileOption.cs" />
|
||||
<Compile Include="Sync\SyncQualityOption.cs" />
|
||||
<Compile Include="Sync\SyncTarget.cs" />
|
||||
<Compile Include="System\LogFile.cs" />
|
||||
|
|
|
@ -23,14 +23,14 @@ namespace MediaBrowser.Model.Sync
|
|||
/// Gets or sets the profile options.
|
||||
/// </summary>
|
||||
/// <value>The profile options.</value>
|
||||
public List<SyncQualityOption> ProfileOptions { get; set; }
|
||||
public List<SyncProfileOption> ProfileOptions { get; set; }
|
||||
|
||||
public SyncDialogOptions()
|
||||
{
|
||||
Targets = new List<SyncTarget>();
|
||||
Options = new List<SyncJobOption>();
|
||||
QualityOptions = new List<SyncQualityOption>();
|
||||
ProfileOptions = new List<SyncQualityOption>();
|
||||
ProfileOptions = new List<SyncProfileOption>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,11 @@ namespace MediaBrowser.Model.Sync
|
|||
/// <value>The quality.</value>
|
||||
public string Quality { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the profile.
|
||||
/// </summary>
|
||||
/// <value>The profile.</value>
|
||||
public string Profile { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
|
|
37
MediaBrowser.Model/Sync/SyncProfileOption.cs
Normal file
37
MediaBrowser.Model/Sync/SyncProfileOption.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncProfileOption
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public string Id { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is default.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is default; otherwise, <c>false</c>.</value>
|
||||
public bool IsDefault { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [enable quality options].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [enable quality options]; otherwise, <c>false</c>.</value>
|
||||
public bool EnableQualityOptions { get; set; }
|
||||
|
||||
public SyncProfileOption()
|
||||
{
|
||||
EnableQualityOptions = true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public enum SyncQuality
|
||||
{
|
||||
/// <summary>
|
||||
/// The good
|
||||
/// </summary>
|
||||
Low = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The better
|
||||
/// </summary>
|
||||
Medium = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The best
|
||||
/// </summary>
|
||||
High = 2,
|
||||
/// <summary>
|
||||
/// The original
|
||||
/// </summary>
|
||||
Original = 3
|
||||
}
|
||||
}
|
|
@ -9,6 +9,11 @@ namespace MediaBrowser.Model.Sync
|
|||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System.Net.NetworkInformation;
|
||||
using MediaBrowser.Common.Events;
|
||||
using MediaBrowser.Common.Events;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.Net;
|
||||
|
@ -849,6 +848,12 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||
foreach (var user in users)
|
||||
{
|
||||
await ResetPassword(user).ConfigureAwait(false);
|
||||
|
||||
if (user.Policy.IsDisabled)
|
||||
{
|
||||
user.Policy.IsDisabled = false;
|
||||
await UpdateUserPolicy(user, user.Policy, true).ConfigureAwait(false);
|
||||
}
|
||||
usersReset.Add(user.Name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,6 @@
|
|||
"HeaderSelectSubtitles": "Select Subtitles",
|
||||
"ButtonMarkForRemoval": "Remove from device",
|
||||
"ButtonUnmarkForRemoval": "Cancel removal from device",
|
||||
"LabelSyncQualityHelp": "Select the desired quality. Original quality will sync the original file, regardless of whether the device is capable of playing it or not.",
|
||||
"LabelDefaultStream": "(Default)",
|
||||
"LabelForcedStream": "(Forced)",
|
||||
"LabelDefaultForcedStream": "(Default/Forced)",
|
||||
|
@ -731,10 +730,6 @@
|
|||
"LabelSyncTo": "Sync to:",
|
||||
"LabelSyncJobName": "Sync job name:",
|
||||
"LabelQuality": "Quality:",
|
||||
"OptionOriginal": "Original",
|
||||
"OptionHigh": "High",
|
||||
"OptionMedium": "Medium",
|
||||
"OptionLow": "Low",
|
||||
"HeaderSettings": "Settings",
|
||||
"OptionAutomaticallySyncNewContent": "Automatically sync new content",
|
||||
"OptionAutomaticallySyncNewContentHelp": "New content added to this category will be automatically synced to the device.",
|
||||
|
@ -751,5 +746,7 @@
|
|||
"SyncJobItemStatusSynced": "Synced",
|
||||
"SyncJobItemStatusFailed": "Failed",
|
||||
"SyncJobItemStatusRemovedFromDevice": "Removed from device",
|
||||
"SyncJobItemStatusCancelled": "Cancelled"
|
||||
"SyncJobItemStatusCancelled": "Cancelled",
|
||||
"LabelProfile": "Profile:",
|
||||
"LabelBitrateMbps": "Bitrate (Mbps):"
|
||||
}
|
||||
|
|
|
@ -80,31 +80,32 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
{
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = SyncQuality.Original.ToString(),
|
||||
Id = SyncQuality.Original.ToString()
|
||||
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 = SyncQuality.High.ToString(),
|
||||
Id = SyncQuality.High.ToString(),
|
||||
Name = "High",
|
||||
Id = "high",
|
||||
IsDefault = true
|
||||
},
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = SyncQuality.Medium.ToString(),
|
||||
Id = SyncQuality.Medium.ToString()
|
||||
Name = "Medium",
|
||||
Id = "medium"
|
||||
},
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = SyncQuality.Low.ToString(),
|
||||
Id = SyncQuality.Low.ToString()
|
||||
Name = "Low",
|
||||
Id = "low"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public IEnumerable<SyncQualityOption> GetProfileOptions(SyncTarget target)
|
||||
public IEnumerable<SyncProfileOption> GetProfileOptions(SyncTarget target)
|
||||
{
|
||||
return new List<SyncQualityOption>();
|
||||
return new List<SyncProfileOption>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,6 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <returns>IEnumerable<SyncQualityOption>.</returns>
|
||||
IEnumerable<SyncQualityOption> GetProfileOptions(SyncTarget target);
|
||||
IEnumerable<SyncProfileOption> GetProfileOptions(SyncTarget target);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,7 +159,8 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
ItemCount = items.Count,
|
||||
Category = request.Category,
|
||||
ParentId = request.ParentId,
|
||||
Quality = request.Quality
|
||||
Quality = request.Quality,
|
||||
Profile = request.Profile
|
||||
};
|
||||
|
||||
if (!request.Category.HasValue && request.ItemIds != null)
|
||||
|
@ -1079,29 +1080,29 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
{
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = SyncQuality.Original.ToString(),
|
||||
Id = SyncQuality.Original.ToString()
|
||||
},
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = SyncQuality.High.ToString(),
|
||||
Id = SyncQuality.High.ToString(),
|
||||
Name = "High",
|
||||
Id = "high",
|
||||
IsDefault = true
|
||||
},
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = SyncQuality.Medium.ToString(),
|
||||
Id = SyncQuality.Medium.ToString()
|
||||
Name = "Medium",
|
||||
Id = "medium"
|
||||
},
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = SyncQuality.Low.ToString(),
|
||||
Id = SyncQuality.Low.ToString()
|
||||
Name = "Low",
|
||||
Id = "low"
|
||||
},
|
||||
new SyncQualityOption
|
||||
{
|
||||
Name = "Custom",
|
||||
Id = "custom"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public IEnumerable<SyncQualityOption> GetProfileOptions(string targetId)
|
||||
public IEnumerable<SyncProfileOption> GetProfileOptions(string targetId)
|
||||
{
|
||||
foreach (var provider in _providers)
|
||||
{
|
||||
|
@ -1114,10 +1115,10 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
}
|
||||
}
|
||||
|
||||
return new List<SyncQualityOption>();
|
||||
return new List<SyncProfileOption>();
|
||||
}
|
||||
|
||||
private IEnumerable<SyncQualityOption> GetProfileOptions(ISyncProvider provider, SyncTarget target)
|
||||
private IEnumerable<SyncProfileOption> GetProfileOptions(ISyncProvider provider, SyncTarget target)
|
||||
{
|
||||
var hasQuality = provider as IHasSyncQuality;
|
||||
if (hasQuality != null)
|
||||
|
@ -1125,12 +1126,29 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
return hasQuality.GetProfileOptions(target);
|
||||
}
|
||||
|
||||
var list = new List<SyncQualityOption>();
|
||||
var list = new List<SyncProfileOption>();
|
||||
|
||||
list.Add(new SyncQualityOption
|
||||
list.Add(new SyncProfileOption
|
||||
{
|
||||
Name = SyncQuality.Low.ToString(),
|
||||
Id = SyncQuality.Low.ToString()
|
||||
Name = "Original",
|
||||
Id = "Original",
|
||||
Description = "Syncs original files as-is.",
|
||||
EnableQualityOptions = false
|
||||
});
|
||||
|
||||
list.Add(new SyncProfileOption
|
||||
{
|
||||
Name = "Web - H264/AAC, MP3",
|
||||
Id = "mobile",
|
||||
Description = "Designed for compatibility with all devices, including web browsers."
|
||||
});
|
||||
|
||||
list.Add(new SyncProfileOption
|
||||
{
|
||||
Name = "General - H264/AAC/AC3, MP3",
|
||||
Id = "general",
|
||||
Description = "Designed for compatibility with Chromecast, Roku, Smart TV's, and other similar devices.",
|
||||
IsDefault = true
|
||||
});
|
||||
|
||||
return list;
|
||||
|
|
Loading…
Reference in New Issue
Block a user