mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 01:05:19 +03:00
revise opt-in tags
This commit is contained in:
@@ -168,7 +168,6 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
foreach (var user in users)
|
||||
{
|
||||
await DoPolicyMigration(user).ConfigureAwait(false);
|
||||
await DoBlockedTagMigration(user).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
// If there are no local users with admin rights, make them all admins
|
||||
@@ -347,25 +346,6 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
}
|
||||
}
|
||||
|
||||
private async Task DoBlockedTagMigration(User user)
|
||||
{
|
||||
if (user.Policy.BlockedTags != null)
|
||||
{
|
||||
user.Policy.TagFilters = user.Policy
|
||||
.BlockedTags
|
||||
.Select(i => new TagFilter
|
||||
{
|
||||
Tag = i,
|
||||
Mode = TagFilterMode.Block
|
||||
})
|
||||
.ToArray();
|
||||
|
||||
user.Policy.BlockedTags = null;
|
||||
|
||||
await UpdateUserPolicy(user, user.Policy, false);
|
||||
}
|
||||
}
|
||||
|
||||
public UserDto GetUserDto(User user, string remoteEndPoint = null)
|
||||
{
|
||||
if (user == null)
|
||||
@@ -1036,4 +1016,4 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user