🧪 Beta channel — Pre-release. Add the beta repo URL:
https://raw.githubusercontent.com/peterdu1109/NotifySync/main/repository-beta.json. On 5.5.12.5-beta6, Jellyfin offers this as a regular update.
🇬🇧 English
📝 In Short
Critical fix: every Jellyfin restart was silently wiping the UPD/MAJ badges by re-running the history scan. The bell would show your replaced files as NEW instead of UPD after any reboot. Now fixed.
🐛 What's Fixed
- UPD/MAJ badges no longer disappear after a restart — The plugin had a startup task that re-built the entire notification table from scratch each time Jellyfin restarted. As a side effect, every upgrade flag your library had earned (file replacements, codec swaps, audio additions) was reset to "new". The bell looked like all your replacements were fresh imports, even when the admin Deletions tab still showed them correctly as "Replaced".
- The auto-scan now only runs on a fresh install (empty notification table). On a normal restart with an already-populated bell, your existing badges are preserved.
- The Régénérer l'historique / Regenerate history button in the admin page still does a full rebuild — that's its purpose. Only the silent auto-run on every startup was the problem.
🧪 What to test
After updating to beta7:
- Note the current state of your bell (which items have UPD badges).
- Restart Jellyfin.
- Open the bell again — every UPD badge should still be there.
If anything you expected to keep its badge has gone back to NEW, please report.
🔧 Technical details for the curious
Root cause: HistoryScanTask.GetDefaultTriggers() declared a StartupTrigger, which Jellyfin's task scheduler honored by firing ExecuteAsync on every server start. That method called NotificationManager.Instance.ManualHistoryScan → PopulateInitialHistory → _db.ReplaceAllNotifications(oldDbIds, newNotifs), replacing the entire Notifications table with freshly built rows whose IsUpgrade and UpgradeKind default to false/null. The DeletedItems table was untouched, which is why the admin Deletions tab kept showing the correct "Replaced" status while the bell forgot the corresponding upgrade flags.
Fix in HistoryScanTask.ExecuteAsync:
if (NotificationManager.Instance.GetRecentNotifications().Count > 0) {
return Task.CompletedTask; // skip — events keep the table fresh
}The task is still registered with the startup trigger so fresh installs auto-populate the bell from existing library history. Once populated, the trigger becomes a no-op until the table is explicitly emptied (manual regenerate, plugin uninstall, or DB corruption).
No schema migration needed. Internal version 5.5.12.6 for automatic update from beta6.
🇫🇷 Français
📝 En bref
Fix critique : chaque redémarrage de Jellyfin effaçait silencieusement les badges UPD/MAJ en relançant le scan d'historique. La cloche affichait tes fichiers remplacés en NOUVEAU au lieu de MAJ après tout reboot. Corrigé.
🐛 Corrections
- Les badges UPD/MAJ ne disparaissent plus après un redémarrage — Le plugin avait une tâche au démarrage qui reconstruisait toute la table des notifications from scratch à chaque restart Jellyfin. Effet de bord : chaque flag d'upgrade que ta bibliothèque avait acquis (remplacements de fichiers, changements de codec, ajouts audio) était réinitialisé à "nouveau". La cloche affichait tous tes remplacements comme des imports frais, même quand l'onglet admin Suppressions les montrait toujours correctement en "Remplacé".
- Le scan auto ne tourne plus que sur une fresh install (table de notifications vide). Sur un redémarrage normal avec une cloche déjà peuplée, tes badges existants sont préservés.
- Le bouton Régénérer l'historique dans la page admin fait toujours un rebuild complet — c'est son rôle. Seul le rebuild silencieux à chaque démarrage était le problème.
🧪 À tester
Après update vers beta7 :
- Note l'état actuel de ta cloche (quels items ont des badges MAJ).
- Redémarre Jellyfin.
- Re-ouvre la cloche — chaque badge MAJ doit toujours être là.
Si quelque chose que tu pensais garder son badge est repassé à NOUVEAU, signale-le.
🔧 Détails techniques pour les curieux
Cause racine : HistoryScanTask.GetDefaultTriggers() déclarait un StartupTrigger, que le task scheduler de Jellyfin honorait en lançant ExecuteAsync à chaque démarrage serveur. Cette méthode appelait NotificationManager.Instance.ManualHistoryScan → PopulateInitialHistory → _db.ReplaceAllNotifications(oldDbIds, newNotifs), remplaçant toute la table Notifications par des lignes fraîchement construites dont IsUpgrade et UpgradeKind valent false/null par défaut. La table DeletedItems n'était pas touchée, ce qui explique pourquoi l'onglet admin Suppressions continuait à montrer le bon statut "Remplacé" alors que la cloche oubliait les flags d'upgrade correspondants.
Fix dans HistoryScanTask.ExecuteAsync :
if (NotificationManager.Instance.GetRecentNotifications().Count > 0) {
return Task.CompletedTask; // skip — les events maintiennent la table fraîche
}La tâche est toujours enregistrée avec le startup trigger pour que les fresh installs auto-peuplent la cloche depuis l'historique de la bibliothèque. Une fois peuplée, le trigger devient no-op jusqu'à ce que la table soit explicitement vidée (régénération manuelle, désinstallation du plugin, ou corruption DB).
Pas de migration de schéma nécessaire. Version interne 5.5.12.6 pour update automatique depuis beta6.