Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
caee267f8b | ||
| 5a60a6f5b4 | |||
|
|
133c00fab0 | ||
| 0bafe691a0 | |||
| 82b34e288c | |||
|
|
8c77f82d2c |
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "0.1.2"
|
||||
".": "0.1.3"
|
||||
}
|
||||
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 0.1.3 (2026-04-05)
|
||||
|
||||
## 0.1.3 (2026-04-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
Gebe keine Notification wenn der Name der Serie tmdbid oder ähnliches enthält.
|
||||
Dies verhindert das die Notification kommt wenn noch nicht die Metadaten gezogen wurden.
|
||||
## 0.1.2 (2026-04-04)
|
||||
|
||||
## 0.1.2 (2026-04-04)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>Jellyfin.Plugin.SmartNotify</RootNamespace>
|
||||
<AssemblyVersion>0.1.2.0</AssemblyVersion>
|
||||
<FileVersion>0.1.2.0</FileVersion>
|
||||
<AssemblyVersion>0.1.3.0</AssemblyVersion>
|
||||
<FileVersion>0.1.3.0</FileVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
@@ -318,10 +319,11 @@ public class SmartNotifyBackgroundService : IHostedService, IDisposable
|
||||
|
||||
if (item is Episode episode)
|
||||
{
|
||||
// episode.SeriesName / SeriesId are often null with Shokofin VFS,
|
||||
// but the Series navigation property usually works
|
||||
var seriesObj = episode.Series;
|
||||
notification.SeriesName = episode.SeriesName ?? seriesObj?.Name;
|
||||
var rawSeriesName = episode.SeriesName ?? seriesObj?.Name;
|
||||
// If the name still looks like a Sonarr folder name, leave it null
|
||||
// so the incomplete-episode logic defers until metadata scrape is done.
|
||||
notification.SeriesName = LooksLikeFolderName(rawSeriesName) ? null : rawSeriesName;
|
||||
notification.SeriesId = (episode.SeriesId != Guid.Empty
|
||||
? episode.SeriesId
|
||||
: seriesObj?.Id ?? Guid.Empty).ToString();
|
||||
@@ -430,18 +432,38 @@ public class SmartNotifyBackgroundService : IHostedService, IDisposable
|
||||
|
||||
var changed = false;
|
||||
|
||||
// Always refresh SeriesName from the library — at queue time the name
|
||||
// may have been the Sonarr folder name (before metadata refresh).
|
||||
// Refresh SeriesName from the library. At queue time the name is often
|
||||
// the Sonarr folder name (e.g. "Chained Soldier (2024) [tmdbid-139060]").
|
||||
// After Jellyfin's metadata scrape completes, the name changes to the
|
||||
// correct provider name (e.g. "Demon Slave - The Chained Soldier").
|
||||
// We detect the unscraped folder name by checking for bracket patterns
|
||||
// like [tmdbid-...] or (2024) and clear the SeriesName so the
|
||||
// incomplete-episode logic defers sending until the scrape is done.
|
||||
{
|
||||
var freshSeriesName = episode.SeriesName ?? episode.Series?.Name;
|
||||
if (!string.IsNullOrEmpty(freshSeriesName) && freshSeriesName != notification.SeriesName)
|
||||
if (!string.IsNullOrEmpty(freshSeriesName))
|
||||
{
|
||||
_logger.LogInformation(
|
||||
"[DEBUG Refresh] SeriesName changed: '{Old}' -> '{New}'",
|
||||
notification.SeriesName,
|
||||
freshSeriesName);
|
||||
notification.SeriesName = freshSeriesName;
|
||||
changed = true;
|
||||
if (LooksLikeFolderName(freshSeriesName))
|
||||
{
|
||||
// Still the Sonarr folder name — clear so we keep waiting
|
||||
if (!string.IsNullOrEmpty(notification.SeriesName))
|
||||
{
|
||||
_logger.LogInformation(
|
||||
"[DEBUG Refresh] SeriesName '{Name}' looks like a folder name, clearing to defer",
|
||||
freshSeriesName);
|
||||
notification.SeriesName = null;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
else if (freshSeriesName != notification.SeriesName)
|
||||
{
|
||||
_logger.LogInformation(
|
||||
"[DEBUG Refresh] SeriesName changed: '{Old}' -> '{New}'",
|
||||
notification.SeriesName,
|
||||
freshSeriesName);
|
||||
notification.SeriesName = freshSeriesName;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -705,6 +727,19 @@ public class SmartNotifyBackgroundService : IHostedService, IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Detects Sonarr-style folder names that haven't been replaced by a metadata scrape yet.
|
||||
/// Matches patterns like "[tmdbid-139060]", "[tvdbid-412656]", "[imdbid-tt1234]".
|
||||
/// </summary>
|
||||
private static readonly Regex FolderNamePattern = new(
|
||||
@"\[(tmdbid|tvdbid|imdbid)-[^\]]+\]",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static bool LooksLikeFolderName(string? name)
|
||||
{
|
||||
return !string.IsNullOrEmpty(name) && FolderNamePattern.IsMatch(name);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
"category": "Notifications",
|
||||
"imageUrl": "",
|
||||
"versions": [
|
||||
{
|
||||
"version": "0.1.2.0",
|
||||
"changelog": "## 0.1.2 (2026-04-04)\n\n### Bug Fixes\n\n* Problem behoben das der Serienname vor der Benachrichtigung nicht aktualisiert wurde.",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://git.tdpi.dev/TDPI/jellyfin-plugin-smartnotify/releases/download/v0.1.2/smartnotify_0.1.2.zip",
|
||||
"checksum": "56e2b0005f5bc3368c9a7f53b2f806a0",
|
||||
"timestamp": "2026-04-04T09:39:49Z"
|
||||
},
|
||||
{
|
||||
"version": "0.1.1.0",
|
||||
"changelog": "## 0.1.1 (2026-04-03)\n\n### Bug Fixes\n\n* fix: unknown series\n\n### Chores\n\n* chore: workflow fix\n* chore: removed old versions\n* chore: update manifest for v0.1.0",
|
||||
|
||||
Reference in New Issue
Block a user