0.2.64 update

This commit is contained in:
ponzischeme89
2026-08-15 09:23:26 +12:00
parent a2ca7e8061
commit d5d47473a2
90 changed files with 9188 additions and 451 deletions
+4 -4
View File
@@ -155,7 +155,7 @@ func sonarrStatus(series sonarr.Series) string {
}
func (s *Server) handleNotifications(w http.ResponseWriter, r *http.Request, sess store.Session) {
prefs, err := s.store.NotificationPreferences(r.Context(), sess.EmbyUserID)
prefs, err := s.notificationPreferencesFor(r.Context(), sess.EmbyUserID)
if err != nil {
writeError(w, http.StatusInternalServerError, "could not load notification preferences")
return
@@ -164,12 +164,12 @@ func (s *Server) handleNotifications(w http.ResponseWriter, r *http.Request, ses
if !decodeJSON(w, r, &prefs) {
return
}
if err := s.store.SetNotificationPreferences(r.Context(), sess.EmbyUserID, prefs); err != nil {
if err := s.saveNotificationPreferences(r.Context(), sess.EmbyUserID, prefs); err != nil {
writeError(w, http.StatusInternalServerError, "could not save notification preferences")
return
}
}
if prefs.Enabled && prefs.ShowReturnAlerts {
if prefs.Enabled && prefs.SonarrAlerts && prefs.ShowReturnAlerts {
s.syncReturnNotifications(r, sess, prefs)
}
notifications, err := s.store.UserNotifications(r.Context(), sess.EmbyUserID)
@@ -178,7 +178,7 @@ func (s *Server) handleNotifications(w http.ResponseWriter, r *http.Request, ses
return
}
writeJSON(w, http.StatusOK, notificationsResponse{
Notifications: notifications,
Notifications: filterStoredNotifications(notifications, prefs),
Preferences: prefs,
})
}