mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-24 02:56:31 +00:00
Use new Random.Shared instead of creating new instances
This commit is contained in:
@@ -420,7 +420,7 @@ namespace Emby.Server.Implementations.Dto
|
||||
// Just return something so that apps that are expecting a value won't think the folders are empty
|
||||
if (folder is ICollectionFolder || folder is UserView)
|
||||
{
|
||||
return new Random().Next(1, 10);
|
||||
return Random.Shared.Next(1, 10);
|
||||
}
|
||||
|
||||
return folder.GetChildCount(user);
|
||||
|
||||
@@ -150,8 +150,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
|
||||
if (!_lockkey.HasValue)
|
||||
{
|
||||
var rand = new Random();
|
||||
_lockkey = (uint)rand.Next();
|
||||
_lockkey = (uint)Random.Shared.Next();
|
||||
}
|
||||
|
||||
var lockKeyValue = _lockkey.Value;
|
||||
|
||||
Reference in New Issue
Block a user