diff --git a/Jellyfin.Plugin.SmartPlaylist/SmartPlaylistDto.cs b/Jellyfin.Plugin.SmartPlaylist/SmartPlaylistDto.cs
index 5a2f41b..3e914e3 100644
--- a/Jellyfin.Plugin.SmartPlaylist/SmartPlaylistDto.cs
+++ b/Jellyfin.Plugin.SmartPlaylist/SmartPlaylistDto.cs
@@ -50,6 +50,7 @@ namespace Jellyfin.Plugin.SmartPlaylist {
public string SortProgram { get; set; }
public string? Filename { get; set; }
public bool Enabled { get; set; }
+ public bool CollectionInsteadOfPlaylist { get; set; }
public SmartPlaylistDto() {
Id = "";
@@ -59,6 +60,7 @@ namespace Jellyfin.Plugin.SmartPlaylist {
SortProgram = DEFAULT_SORT_PROGRAM;
Filename = null;
Enabled = true;
+ CollectionInsteadOfPlaylist = false;
}
protected SmartPlaylistDto(SerializationInfo info, StreamingContext context) {
@@ -97,6 +99,11 @@ namespace Jellyfin.Plugin.SmartPlaylist {
} else {
Enabled = true;
}
+ if (info.GetValue("CollectionInsteadOfPlaylist", typeof(bool)) is bool _CollectionInsteadOfPlaylist) {
+ Enabled = _CollectionInsteadOfPlaylist;
+ } else {
+ Enabled = true;
+ }
}
public void GetObjectData(SerializationInfo info, StreamingContext context) {
@@ -106,6 +113,7 @@ namespace Jellyfin.Plugin.SmartPlaylist {
info.AddValue("Program", Program);
info.AddValue("Filename", Filename);
info.AddValue("Enabled", Enabled);
+ info.AddValue("CollectionInsteadOfPlaylist", CollectionInsteadOfPlaylist);
}
}
}
diff --git a/Jellyfin.Plugin.SmartPlaylist/configPage.html b/Jellyfin.Plugin.SmartPlaylist/configPage.html
index cd597d2..36dce3b 100644
--- a/Jellyfin.Plugin.SmartPlaylist/configPage.html
+++ b/Jellyfin.Plugin.SmartPlaylist/configPage.html
@@ -44,6 +44,19 @@
Is the playlist enabled.
+