Modified setter to allow for usernames with spaces
This commit is contained in:
@@ -125,7 +125,19 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Configuration
|
|||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
value.Replace(" ", string.Empty, StringComparison.CurrentCulture).Split(',').ToList().ForEach(u => _jfUsernamesTo.Add(u));
|
// Clear existing usernames
|
||||||
|
_jfUsernamesTo.Clear();
|
||||||
|
|
||||||
|
// Split by comma, then trim each part to remove leading/trailing spaces
|
||||||
|
foreach (var username in value.Split(','))
|
||||||
|
{
|
||||||
|
var trimmedUsername = username.Trim();
|
||||||
|
if (!string.IsNullOrEmpty(trimmedUsername))
|
||||||
|
{
|
||||||
|
_jfUsernamesTo.Add(trimmedUsername);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_logger.LogDebug("Set JFUsernamesTo to: {Message}", value);
|
_logger.LogDebug("Set JFUsernamesTo to: {Message}", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user