Основные изменения: укрупнены use case-интерфейсы, контроллеры переведены на цельные зависимости, логика доступных фильмов перенесена в FilmLibraryService, добавлены проверки существования фильма и улучшена обработка ошибок API. Метрики: FilmService больше не зависит напрямую от Micrometer для counters, используется BusinessMetricsPort; добавлены TimedAspect и duration-метрики через @Timed для create/edit/delete фильмов. Jellyfin: event handling переведен на транзакционную модель, sync учитывает runtime-ошибки, добавлены plugin-token/web-url настройки, webhook и sync endpoints защищены X-MovieNight-Plugin-Token. Плагин: добавлен Jellyfin plugin в plugins/jellyfin, backend принимает push-sync payload, sync-state доступен плагину, pull-sync вынесен в /api/integrations/jellyfin/pull-sync, README описывает фактический контракт. API и DTO: добавлены RecommendationResponse, ContentTypeParser, validation annotations, обработка validation errors и ResponseStatusException, endpoint /api/users/me. БД: добавлена V7 cleanup-миграция для legacy ratings/jellyfin_id объектов; V4/V5 в этот коммит не включались. Проверка: .\gradlew.bat check --stacktrace проходит полностью.
51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using MediaBrowser.Model.Plugins;
|
|
|
|
namespace Jellyfin.Plugin.MovieNight.Configuration;
|
|
|
|
/// <summary>
|
|
/// MovieNight plugin settings persisted by Jellyfin.
|
|
/// </summary>
|
|
public class PluginConfiguration : BasePluginConfiguration
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether integration calls are enabled.
|
|
/// </summary>
|
|
public bool Enabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the MovieNight backend base URL.
|
|
/// </summary>
|
|
public string BackendBaseUrl { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the backend plugin token.
|
|
/// </summary>
|
|
public string ApiToken { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the periodic sync interval in minutes.
|
|
/// </summary>
|
|
public int SyncIntervalMinutes { get; set; } = 30;
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether playback stop events are pushed to MovieNight.
|
|
/// </summary>
|
|
public bool EnablePlaybackEvents { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether periodic backend sync is enabled.
|
|
/// </summary>
|
|
public bool EnablePeriodicSync { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Gets or sets enabled Jellyfin library ids. Empty means all libraries.
|
|
/// </summary>
|
|
public List<string> EnabledLibraryIds { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Gets or sets the path where .strm files will be created.
|
|
/// </summary>
|
|
public string StrmOutputPath { get; set; } = string.Empty;
|
|
}
|