diff options
| author | JPVenson <ger-delta-07@hotmail.de> | 2024-11-14 21:56:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-14 21:56:18 +0100 |
| commit | e8be7ab01192465735793c98bf9bbab9fca9cb8d (patch) | |
| tree | 86de393341830e834b0fec743d060a80a57332b3 /Jellyfin.Server.Implementations | |
| parent | 30ba35aa0ce10916c6bd4cb6b33d573af52219ec (diff) | |
| parent | 53683809d94cae373882d59e8b6761c517e0af1d (diff) | |
Merge branch 'jellyfin:master' into feature/EFUserData
Diffstat (limited to 'Jellyfin.Server.Implementations')
| -rw-r--r-- | Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs | 6 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/UserManager.cs | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs index 9fe3ee010..f6174579f 100644 --- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs +++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs @@ -498,7 +498,11 @@ public class TrickplayManager : ITrickplayManager var trickplayManifest = new Dictionary<string, Dictionary<int, TrickplayInfo>>(); foreach (var mediaSource in item.GetMediaSources(false)) { - var mediaSourceId = Guid.Parse(mediaSource.Id); + if (mediaSource.IsRemote || !Guid.TryParse(mediaSource.Id, out var mediaSourceId)) + { + continue; + } + var trickplayResolutions = await GetTrickplayResolutions(mediaSourceId).ConfigureAwait(false); if (trickplayResolutions.Count > 0) diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index eb4bc2aff..c7ae0f4db 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -113,7 +113,7 @@ namespace Jellyfin.Server.Implementations.Users // This is some regex that matches only on unicode "word" characters, as well as -, _ and @ // In theory this will cut out most if not all 'control' characters which should help minimize any weirdness // Usernames can contain letters (a-z + whatever else unicode is cool with), numbers (0-9), at-signs (@), dashes (-), underscores (_), apostrophes ('), periods (.) and spaces ( ) - [GeneratedRegex(@"^[\w\ \-'._@]+$")] + [GeneratedRegex(@"^[\w\ \-'._@+]+$")] private static partial Regex ValidUsernameRegex(); /// <inheritdoc/> @@ -201,8 +201,6 @@ namespace Jellyfin.Server.Implementations.Users user.AddDefaultPermissions(); user.AddDefaultPreferences(); - _users.Add(user.Id, user); - return user; } @@ -227,6 +225,7 @@ namespace Jellyfin.Server.Implementations.Users dbContext.Users.Add(newUser); await dbContext.SaveChangesAsync().ConfigureAwait(false); + _users.Add(newUser.Id, newUser); } await _eventManager.PublishAsync(new UserCreatedEventArgs(newUser)).ConfigureAwait(false); @@ -560,6 +559,7 @@ namespace Jellyfin.Server.Implementations.Users dbContext.Users.Add(newUser); await dbContext.SaveChangesAsync().ConfigureAwait(false); + _users.Add(newUser.Id, newUser); } } |
