repo creation with initial code after cloning public repo

This commit is contained in:
2026-02-19 07:36:25 -05:00
commit 460884fea3
2860 changed files with 650825 additions and 0 deletions
@@ -0,0 +1,60 @@
using System;
using MediaBrowser.Controller.Session;
namespace MediaBrowser.Controller.Events.Authentication;
/// <summary>
/// A class representing an authentication result event.
/// </summary>
public class AuthenticationRequestEventArgs : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticationRequestEventArgs"/> class.
/// </summary>
/// <param name="request">The <see cref="AuthenticationRequest"/>.</param>
public AuthenticationRequestEventArgs(AuthenticationRequest request)
{
Username = request.Username;
UserId = request.UserId;
App = request.App;
AppVersion = request.AppVersion;
DeviceId = request.DeviceId;
DeviceName = request.DeviceName;
RemoteEndPoint = request.RemoteEndPoint;
}
/// <summary>
/// Gets or sets the user name.
/// </summary>
public string? Username { get; set; }
/// <summary>
/// Gets or sets the user id.
/// </summary>
public Guid? UserId { get; set; }
/// <summary>
/// Gets or sets the app.
/// </summary>
public string? App { get; set; }
/// <summary>
/// Gets or sets the app version.
/// </summary>
public string? AppVersion { get; set; }
/// <summary>
/// Gets or sets the device id.
/// </summary>
public string? DeviceId { get; set; }
/// <summary>
/// Gets or sets the device name.
/// </summary>
public string? DeviceName { get; set; }
/// <summary>
/// Gets or sets the remote endpoint.
/// </summary>
public string? RemoteEndPoint { get; set; }
}
@@ -0,0 +1,37 @@
using System;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Controller.Events.Authentication;
/// <summary>
/// A class representing an authentication result event.
/// </summary>
public class AuthenticationResultEventArgs : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticationResultEventArgs"/> class.
/// </summary>
/// <param name="result">The <see cref="AuthenticationResult"/>.</param>
public AuthenticationResultEventArgs(AuthenticationResult result)
{
User = result.User;
SessionInfo = result.SessionInfo;
ServerId = result.ServerId;
}
/// <summary>
/// Gets or sets the user.
/// </summary>
public UserDto User { get; set; }
/// <summary>
/// Gets or sets the session information.
/// </summary>
public SessionInfoDto? SessionInfo { get; set; }
/// <summary>
/// Gets or sets the server id.
/// </summary>
public string? ServerId { get; set; }
}
@@ -0,0 +1,20 @@
using System;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Events
{
/// <summary>
/// An interface representing a type that consumes events of type <c>T</c>.
/// </summary>
/// <typeparam name="T">The type of events this consumes.</typeparam>
public interface IEventConsumer<in T>
where T : EventArgs
{
/// <summary>
/// A method that is called when an event of type <c>T</c> is fired.
/// </summary>
/// <param name="eventArgs">The event.</param>
/// <returns>A task representing the consumption of the event.</returns>
Task OnEvent(T eventArgs);
}
}
@@ -0,0 +1,28 @@
using System;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Events
{
/// <summary>
/// An interface that handles eventing.
/// </summary>
public interface IEventManager
{
/// <summary>
/// Publishes an event.
/// </summary>
/// <param name="eventArgs">the event arguments.</param>
/// <typeparam name="T">The type of event.</typeparam>
void Publish<T>(T eventArgs)
where T : EventArgs;
/// <summary>
/// Publishes an event asynchronously.
/// </summary>
/// <param name="eventArgs">The event arguments.</param>
/// <typeparam name="T">The type of event.</typeparam>
/// <returns>A task representing the publishing of the event.</returns>
Task PublishAsync<T>(T eventArgs)
where T : EventArgs;
}
}
@@ -0,0 +1,19 @@
using Jellyfin.Data.Events;
using MediaBrowser.Controller.Session;
namespace MediaBrowser.Controller.Events.Session
{
/// <summary>
/// An event that fires when a session is ended.
/// </summary>
public class SessionEndedEventArgs : GenericEventArgs<SessionInfo>
{
/// <summary>
/// Initializes a new instance of the <see cref="SessionEndedEventArgs"/> class.
/// </summary>
/// <param name="arg">The session info.</param>
public SessionEndedEventArgs(SessionInfo arg) : base(arg)
{
}
}
}
@@ -0,0 +1,19 @@
using Jellyfin.Data.Events;
using MediaBrowser.Controller.Session;
namespace MediaBrowser.Controller.Events.Session
{
/// <summary>
/// An event that fires when a session is started.
/// </summary>
public class SessionStartedEventArgs : GenericEventArgs<SessionInfo>
{
/// <summary>
/// Initializes a new instance of the <see cref="SessionStartedEventArgs"/> class.
/// </summary>
/// <param name="arg">The session info.</param>
public SessionStartedEventArgs(SessionInfo arg) : base(arg)
{
}
}
}
@@ -0,0 +1,19 @@
using Jellyfin.Data.Events;
using MediaBrowser.Model.Updates;
namespace MediaBrowser.Controller.Events.Updates
{
/// <summary>
/// An event that occurs when a plugin installation is cancelled.
/// </summary>
public class PluginInstallationCancelledEventArgs : GenericEventArgs<InstallationInfo>
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginInstallationCancelledEventArgs"/> class.
/// </summary>
/// <param name="arg">The installation info.</param>
public PluginInstallationCancelledEventArgs(InstallationInfo arg) : base(arg)
{
}
}
}
@@ -0,0 +1,19 @@
using Jellyfin.Data.Events;
using MediaBrowser.Model.Updates;
namespace MediaBrowser.Controller.Events.Updates
{
/// <summary>
/// An event that occurs when a plugin is installed.
/// </summary>
public class PluginInstalledEventArgs : GenericEventArgs<InstallationInfo>
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginInstalledEventArgs"/> class.
/// </summary>
/// <param name="arg">The installation info.</param>
public PluginInstalledEventArgs(InstallationInfo arg) : base(arg)
{
}
}
}
@@ -0,0 +1,19 @@
using Jellyfin.Data.Events;
using MediaBrowser.Model.Updates;
namespace MediaBrowser.Controller.Events.Updates
{
/// <summary>
/// An event that occurs when a plugin is installing.
/// </summary>
public class PluginInstallingEventArgs : GenericEventArgs<InstallationInfo>
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginInstallingEventArgs"/> class.
/// </summary>
/// <param name="arg">The installation info.</param>
public PluginInstallingEventArgs(InstallationInfo arg) : base(arg)
{
}
}
}
@@ -0,0 +1,19 @@
using Jellyfin.Data.Events;
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Controller.Events.Updates
{
/// <summary>
/// An event that occurs when a plugin is uninstalled.
/// </summary>
public class PluginUninstalledEventArgs : GenericEventArgs<PluginInfo>
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginUninstalledEventArgs"/> class.
/// </summary>
/// <param name="arg">The plugin.</param>
public PluginUninstalledEventArgs(PluginInfo arg) : base(arg)
{
}
}
}
@@ -0,0 +1,19 @@
using Jellyfin.Data.Events;
using MediaBrowser.Model.Updates;
namespace MediaBrowser.Controller.Events.Updates
{
/// <summary>
/// An event that occurs when a plugin is updated.
/// </summary>
public class PluginUpdatedEventArgs : GenericEventArgs<InstallationInfo>
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginUpdatedEventArgs"/> class.
/// </summary>
/// <param name="arg">The installation info.</param>
public PluginUpdatedEventArgs(InstallationInfo arg) : base(arg)
{
}
}
}