Fixed the issue with the null streaming country

pull/3970/head
tidusjar 4 years ago
parent ea7307ac07
commit de886dd800

@ -117,7 +117,8 @@ namespace Ombi.Schedule.Jobs.Emby
ProviderUserId = embyUser.Id,
Alias = isConnectUser ? embyUser.Name : string.Empty,
MovieRequestLimit = userManagementSettings.MovieRequestLimit,
EpisodeRequestLimit = userManagementSettings.EpisodeRequestLimit
EpisodeRequestLimit = userManagementSettings.EpisodeRequestLimit,
StreamingCountry = userManagementSettings.DefaultStreamingCountry
};
var result = await _userManager.CreateAsync(newUser);
if (!result.Succeeded)

@ -115,7 +115,8 @@ namespace Ombi.Schedule.Jobs.Jellyfin
UserType = UserType.JellyfinUser,
ProviderUserId = jellyfinUser.Id,
MovieRequestLimit = userManagementSettings.MovieRequestLimit,
EpisodeRequestLimit = userManagementSettings.EpisodeRequestLimit
EpisodeRequestLimit = userManagementSettings.EpisodeRequestLimit,
StreamingCountry = userManagementSettings.DefaultStreamingCountry;
};
_log.LogInformation("Creating Jellyfin user {0}", newUser.UserName);
var result = await _userManager.CreateAsync(newUser);

@ -98,7 +98,8 @@ namespace Ombi.Schedule.Jobs.Plex
Email = plexUser?.Email ?? string.Empty,
Alias = string.Empty,
MovieRequestLimit = userManagementSettings.MovieRequestLimit,
EpisodeRequestLimit = userManagementSettings.EpisodeRequestLimit
EpisodeRequestLimit = userManagementSettings.EpisodeRequestLimit,
StreamingCountry = userManagementSettings.DefaultStreamingCountry
};
_log.LogInformation("Creating Plex user {0}", newUser.UserName);
var result = await _userManager.CreateAsync(newUser);
@ -161,7 +162,8 @@ namespace Ombi.Schedule.Jobs.Plex
UserName = plexAdmin.username ?? plexAdmin.id,
ProviderUserId = plexAdmin.id,
Email = plexAdmin.email ?? string.Empty,
Alias = string.Empty
Alias = string.Empty,
StreamingCountry = settings.DefaultStreamingCountry;
};
var result = await _userManager.CreateAsync(newUser);

@ -10,6 +10,7 @@ namespace Ombi.Settings.Settings.Models
public bool ImportJellyfinUsers { get; set; }
public int MovieRequestLimit { get; set; }
public int EpisodeRequestLimit { get; set; }
public string DefaultStreamingCountry { get; set; } = "US";
public List<string> DefaultRoles { get; set; } = new List<string>();
public List<string> BannedPlexUserIds { get; set; } = new List<string>();
public List<string> BannedEmbyUserIds { get; set; } = new List<string>();

@ -69,6 +69,7 @@ namespace Ombi.Store.Context
UserName = "Api",
UserType = UserType.SystemUser,
NormalizedUserName = "API",
StreamingCountry = "US"
});
SaveChanges();
tran.Commit();

Loading…
Cancel
Save