Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/18d34f953b4639240b92b373b3f660e87a1e55b5
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
61 additions and
14 deletions
@ -63,7 +63,6 @@ namespace Emby.Server.Implementations.Activity
_sessionManager . AuthenticationSucceeded + = OnAuthenticationSucceeded ;
_sessionManager . SessionEnded + = OnSessionEnded ;
_userManager . OnUserCreated + = OnUserCreated ;
_userManager . OnUserPasswordChanged + = OnUserPasswordChanged ;
_userManager . OnUserDeleted + = OnUserDeleted ;
_userManager . OnUserLockedOut + = OnUserLockedOut ;
@ -171,18 +170,6 @@ namespace Emby.Server.Implementations.Activity
. ConfigureAwait ( false ) ;
}
private async void OnUserCreated ( object sender , GenericEventArgs < User > e )
{
await CreateLogEntry ( new ActivityLog (
string . Format (
CultureInfo . InvariantCulture ,
_localization . GetLocalizedString ( "UserCreatedWithName" ) ,
e . Argument . Username ) ,
"UserCreated" ,
e . Argument . Id ) )
. ConfigureAwait ( false ) ;
}
private async void OnSessionStarted ( object sender , SessionEventArgs e )
{
var session = e . SessionInfo ;
@ -291,7 +278,6 @@ namespace Emby.Server.Implementations.Activity
_sessionManager . AuthenticationSucceeded - = OnAuthenticationSucceeded ;
_sessionManager . SessionEnded - = OnSessionEnded ;
_userManager . OnUserCreated - = OnUserCreated ;
_userManager . OnUserPasswordChanged - = OnUserPasswordChanged ;
_userManager . OnUserDeleted - = OnUserDeleted ;
_userManager . OnUserLockedOut - = OnUserLockedOut ;
@ -0,0 +1,18 @@
using Jellyfin.Data.Entities ;
namespace Jellyfin.Data.Events.Users
{
/// <summary>
/// An event that occurs when a user is created.
/// </summary>
public class UserCreatedEventArgs : GenericEventArgs < User >
{
/// <summary>
/// Initializes a new instance of the <see cref="UserCreatedEventArgs"/> class.
/// </summary>
/// <param name="arg">The user.</param>
public UserCreatedEventArgs ( User arg ) : base ( arg )
{
}
}
}
@ -0,0 +1,43 @@
using System.Globalization ;
using System.Threading.Tasks ;
using Jellyfin.Data.Entities ;
using Jellyfin.Data.Events.Users ;
using MediaBrowser.Controller.Events ;
using MediaBrowser.Model.Activity ;
using MediaBrowser.Model.Globalization ;
namespace Jellyfin.Server.Implementations.Events.Consumers.Users
{
/// <summary>
/// Creates an entry in the activity log when a user is created.
/// </summary>
public class UserCreatedLogger : IEventConsumer < UserCreatedEventArgs >
{
private readonly ILocalizationManager _localizationManager ;
private readonly IActivityManager _activityManager ;
/// <summary>
/// Initializes a new instance of the <see cref="UserCreatedLogger"/> class.
/// </summary>
/// <param name="localizationManager">The localization manager.</param>
/// <param name="activityManager">The activity manager.</param>
public UserCreatedLogger ( ILocalizationManager localizationManager , IActivityManager activityManager )
{
_localizationManager = localizationManager ;
_activityManager = activityManager ;
}
/// <inheritdoc />
public async Task OnEvent ( UserCreatedEventArgs eventArgs )
{
await _activityManager . CreateAsync ( new ActivityLog (
string . Format (
CultureInfo . InvariantCulture ,
_localizationManager . GetLocalizedString ( "UserCreatedWithName" ) ,
eventArgs . Argument . Username ) ,
"UserCreated" ,
eventArgs . Argument . Id ) )
. ConfigureAwait ( false ) ;
}
}
}