From 5438c813b887348fceb91ad11d1248db2c6aa41d Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Tue, 16 Apr 2024 03:59:53 +0200 Subject: [PATCH] fix: fix signalr models (again) --- Shokofin/SignalR/Models/FileMovedEventArgs.cs | 2 +- Shokofin/SignalR/Models/FileRenamedEventArgs.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Shokofin/SignalR/Models/FileMovedEventArgs.cs b/Shokofin/SignalR/Models/FileMovedEventArgs.cs index 00ed367a..50d71e48 100644 --- a/Shokofin/SignalR/Models/FileMovedEventArgs.cs +++ b/Shokofin/SignalR/Models/FileMovedEventArgs.cs @@ -49,7 +49,7 @@ public class V0 : IFileRelocationEventArgs /// The relative path with no leading slash and directory seperators used on /// the Shoko side. /// - [JsonInclude, JsonPropertyName("RelativePath")] + [JsonInclude, JsonPropertyName("NewRelativePath")] public string InternalPath { get; set; } = string.Empty; /// diff --git a/Shokofin/SignalR/Models/FileRenamedEventArgs.cs b/Shokofin/SignalR/Models/FileRenamedEventArgs.cs index 40c8966b..5ab7f6c6 100644 --- a/Shokofin/SignalR/Models/FileRenamedEventArgs.cs +++ b/Shokofin/SignalR/Models/FileRenamedEventArgs.cs @@ -69,14 +69,13 @@ public class V0 : IFileRelocationEventArgs [JsonInclude, JsonPropertyName("OldFileName")] public string PreviousFileName { get; set; } = string.Empty; - /// [JsonIgnore] public int PreviousImportFolderId => ImportFolderId; /// [JsonIgnore] - public string PreviousRelativePath => RelativePath[^FileName.Length] + PreviousFileName; + public string PreviousRelativePath => RelativePath[..^FileName.Length] + PreviousFileName; /// [JsonIgnore]