check against repeat programs
This commit is contained in:
parent
bb117d6b98
commit
bfb2f64ea4
|
@ -403,6 +403,14 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||
|
||||
public async Task<UserLinkResult> LinkUser(string userId, string connectUsername)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(userId))
|
||||
{
|
||||
throw new ArgumentNullException("userId");
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(connectUsername))
|
||||
{
|
||||
throw new ArgumentNullException("connectUsername");
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(ConnectServerId))
|
||||
{
|
||||
await UpdateConnectInfo().ConfigureAwait(false);
|
||||
|
@ -422,14 +430,6 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||
|
||||
private async Task<UserLinkResult> LinkUserInternal(string userId, string connectUsername)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(userId))
|
||||
{
|
||||
throw new ArgumentNullException("userId");
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(connectUsername))
|
||||
{
|
||||
throw new ArgumentNullException("connectUsername");
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(ConnectServerId))
|
||||
{
|
||||
throw new ArgumentNullException("ConnectServerId");
|
||||
|
@ -446,6 +446,12 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||
throw new ArgumentException("The Emby account has been disabled.");
|
||||
}
|
||||
|
||||
var existingUser = _userManager.Users.FirstOrDefault(i => string.Equals(i.ConnectUserId, connectUser.Id) && !string.IsNullOrWhiteSpace(i.ConnectAccessKey));
|
||||
if (existingUser != null)
|
||||
{
|
||||
throw new InvalidOperationException("This connect user is already linked to local user " + existingUser.Name);
|
||||
}
|
||||
|
||||
var user = GetUser(userId);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(user.ConnectUserId))
|
||||
|
|
|
@ -253,7 +253,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||
}
|
||||
|
||||
var durationParam = " -t " + _mediaEncoder.GetTimeParameter(duration.Ticks);
|
||||
var commandLineArgs = "-fflags +genpts -async 1 -vsync -1 -re -i \"{0}\"{4} -sn {2} -map_metadata -1 -threads 0 {3} -y \"{1}\"";
|
||||
var commandLineArgs = "-fflags +genpts -async 1 -vsync -1 -i \"{0}\"{4} -sn {2} -map_metadata -1 -threads 0 {3} -y \"{1}\"";
|
||||
|
||||
if (mediaSource.ReadAtNativeFramerate)
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|||
var data = images[imageIndex].data ?? new List<ScheduleDirect.ImageData>();
|
||||
data = data.OrderByDescending(GetSizeOrder).ToList();
|
||||
|
||||
programEntry.primaryImage = GetProgramImage(ApiUrl, data, "Logo", true, 800);
|
||||
programEntry.primaryImage = GetProgramImage(ApiUrl, data, "Logo", true, 600);
|
||||
//programEntry.thumbImage = GetProgramImage(ApiUrl, data, "Iconic", false);
|
||||
//programEntry.bannerImage = GetProgramImage(ApiUrl, data, "Banner", false) ??
|
||||
// GetProgramImage(ApiUrl, data, "Banner-L1", false) ??
|
||||
|
@ -485,7 +485,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(details.originalAirDate))
|
||||
if (!string.IsNullOrWhiteSpace(details.originalAirDate) && (!info.IsSeries || info.IsRepeat))
|
||||
{
|
||||
info.OriginalAirDate = DateTime.Parse(details.originalAirDate);
|
||||
}
|
||||
|
|
|
@ -2837,6 +2837,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
feature = "embytvseriesrecordings";
|
||||
}
|
||||
|
||||
if (string.Equals(feature, "dvr-l", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var config = GetConfiguration();
|
||||
if (config.TunerHosts.Count(i => i.IsEnabled) > 0 &&
|
||||
config.ListingProviders.Count(i => (i.EnableAllTuners || i.EnabledTuners.Length > 0) && string.Equals(i.Type, SchedulesDirect.TypeName, StringComparison.OrdinalIgnoreCase)) > 0)
|
||||
{
|
||||
return Task.FromResult(new MBRegistrationRecord
|
||||
{
|
||||
IsRegistered = true,
|
||||
IsValid = true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (string.Equals(feature, "dvr", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var config = GetConfiguration();
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
<package id="morelinq" version="1.4.0" targetFramework="net45" />
|
||||
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
|
||||
<package id="SimpleInjector" version="3.2.2" targetFramework="net45" />
|
||||
<package id="SocketHttpListener" version="1.0.0.39" targetFramework="net45" />
|
||||
<package id="SocketHttpListener" version="1.0.0.40" targetFramework="net45" />
|
||||
</packages>
|
|
@ -346,7 +346,7 @@ namespace MediaBrowser.WebDashboard.Api
|
|||
|
||||
if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
sb.Append("<meta http-equiv=\"Content-Security-Policy\" content=\"default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: file: filesystem:;\">");
|
||||
sb.Append("<meta http-equiv=\"Content-Security-Policy\" content=\"default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: file: filesystem: ws: wss:;\">");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user