From f41485cecfa23a2dd9dabb70c7e216f2d8740144 Mon Sep 17 00:00:00 2001 From: redxef Date: Fri, 8 Nov 2024 03:41:24 +0100 Subject: [PATCH] feat: allow to initialize empty playlist file. --- Jellyfin.Plugin.SmartPlaylist/Store.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jellyfin.Plugin.SmartPlaylist/Store.cs b/Jellyfin.Plugin.SmartPlaylist/Store.cs index 5507e9b..2fdf84d 100644 --- a/Jellyfin.Plugin.SmartPlaylist/Store.cs +++ b/Jellyfin.Plugin.SmartPlaylist/Store.cs @@ -15,6 +15,9 @@ namespace Jellyfin.Plugin.SmartPlaylist { } private async Task LoadPlaylistAsync(string filename) { var r = File.ReadAllText(filename); + if (r.Equals("")) { + r = "{}"; + } var dto = new DeserializerBuilder().Build().Deserialize(r); if (dto == null) {