Managed to figure out how to use javascript on the plugin page by utilizing data-controller as found in other repos. Unsure how this is used, but appears to be how you can attach a js file to a div. Also implemented a basic state api to build off of in future.
This commit is contained in:
29
Jellyfin.Plugin.MediaCleaner/Data/PluginState.cs
Normal file
29
Jellyfin.Plugin.MediaCleaner/Data/PluginState.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Collections.Generic;
|
||||
using Jellyfin.Plugin.MediaCleaner.Models;
|
||||
|
||||
namespace Jellyfin.Plugin.MediaCleaner.Data;
|
||||
|
||||
public class PluginState
|
||||
{
|
||||
private readonly object _lock = new();
|
||||
private List<SeriesInfo> _seriesInfo = new List<SeriesInfo>
|
||||
{
|
||||
new SeriesInfo { SeriesName = "TestName", Id = System.Guid.NewGuid() }
|
||||
};
|
||||
|
||||
public void AddSeriesInfo(SeriesInfo seriesInfo)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
_seriesInfo.Add(seriesInfo);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<SeriesInfo> GetSeriesInfo()
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
return _seriesInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user