6 Commits

Author SHA1 Message Date
Gitea Actions
caee267f8b docs: update changelog for v0.1.3
Some checks failed
Create Release PR / Create Release PR (push) Has been cancelled
Build and Publish Plugin / Build Plugin + Update Manifest (release) Successful in 1m1s
2026-04-05 16:12:18 +00:00
5a60a6f5b4 Merge pull request 'chore(main): release 0.1.3' (#26) from release-please--branches--main into main
Some checks failed
Create Release PR / Create Release PR (push) Has been cancelled
Reviewed-on: #26
2026-04-05 18:12:06 +02:00
Gitea Actions
133c00fab0 chore(main): release 0.1.3
All checks were successful
Create Release / Publish Release (pull_request) Successful in 15s
2026-04-05 15:22:58 +00:00
0bafe691a0 Merge branch 'main' of https://git.tdpi.dev/TDPI/jellyfin-plugin-smartnotify
All checks were successful
Create Release PR / Create Release PR (push) Successful in 16s
2026-04-05 17:22:37 +02:00
82b34e288c fix: stop fodler name as names 2026-04-05 17:22:35 +02:00
Gitea Actions
8c77f82d2c chore: update manifest for v0.1.2
All checks were successful
Create Release PR / Create Release PR (push) Successful in 4s
2026-04-04 09:39:49 +00:00
5 changed files with 66 additions and 15 deletions

View File

@@ -1,3 +1,3 @@
{
".": "0.1.2"
".": "0.1.3"
}

View File

@@ -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)

View File

@@ -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>

View File

@@ -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()
{

View File

@@ -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",