Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jellyfin notification API changes #5828

Closed
1 task done
JeWe37 opened this issue Jul 22, 2023 · 6 comments
Closed
1 task done

Jellyfin notification API changes #5828

JeWe37 opened this issue Jul 22, 2023 · 6 comments

Comments

@JeWe37
Copy link
Contributor

JeWe37 commented Jul 22, 2023

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Current Behavior

With jellyfin/jellyfin#9147 having been merged notifications will not be sent to Jellyfin properly anymore.

Expected Behavior

This should likely be updated to use the Events API.

Steps To Reproduce

  1. Run the jellyfin/jellyfin:unstable docker container
  2. Add a connection to it from Sonarr
  3. Add something that would cause a notification
  4. See that no notifications are sent

Environment

- OS: Irrelevant
- Sonarr: develop
- Docker Install: Irrelevant
- Using Reverse Proxy: Irrelevant
- Browser: Irrelevant

What branch are you running?

Develop

Trace Logs?

[v10.0.0.6501] NzbDrone.Common.Http.HttpException: HTTP request failed: [404:NotFound] [POST] at [https://jellyfin.jendrik.malined.com:443/Notifications/Admin]
   at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in ./Sonarr.Common/Http/HttpClient.cs:line 108
   at NzbDrone.Common.Http.HttpClient.Post(HttpRequest request) in ./Sonarr.Common/Http/HttpClient.cs:line 318
   at NzbDrone.Core.Notifications.Emby.MediaBrowserProxy.ProcessRequest(HttpRequest request, MediaBrowserSettings settings) in ./Sonarr.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs:line 97
   at NzbDrone.Core.Notifications.Emby.MediaBrowserProxy.Notify(MediaBrowserSettings settings, String title, String message) in ./Sonarr.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs:line 32
   at NzbDrone.Core.Notifications.Emby.MediaBrowserService.Notify(MediaBrowserSettings settings, String title, String message) in ./Sonarr.Core/Notifications/MediaBrowser/MediaBrowserService.cs:line 30
   at NzbDrone.Core.Notifications.Emby.MediaBrowser.OnEpisodeFileDelete(EpisodeDeleteMessage deleteMessage) in ./Sonarr.Core/Notifications/MediaBrowser/MediaBrowser.cs:line 54
   at NzbDrone.Core.Notifications.NotificationService.Handle(EpisodeFileDeletedEvent message) in ./Sonarr.Core/Notifications/NotificationService.cs:line 280

Anything else?

Noticed while looking to prepare a PR for #5826.

@augustuen
Copy link
Contributor

Are the changes this merge brings documented somewhere? I don't know what sort of time-frame we're looking at for these changes to come to stable JF, but if we want we might be able to do something akin to what we do with the qbittorrent API and support both versions.

@JeWe37
Copy link
Contributor Author

JeWe37 commented Jul 22, 2023

I can't say I know. As things stand there is simply no functional notification functionality in the stable version. Jellyfin is a little slow with releases, this is probably best left as is for now. I just happened to notice this while testing other things, and figured that this was bound to become a problem in the future.

@JeWe37
Copy link
Contributor Author

JeWe37 commented Jul 22, 2023

Also I dug around a little more, prior to the PR I mentioned apparently jellyfin/jellyfin#8952 was introduced, which cut out the part of the functionality that Sonarr actually uses. I'm not actually totally sure right now whether there are going to be alternatives given they are seemingly only talking about their own clients.

@augustuen
Copy link
Contributor

Well, if the notifications API has been removed entirely we could just yank those parts of the code out. It doesn't look like api.jellyfin.org has been updated with these changes, since it still refers to the notification endpoints. Feel free to hit me up on Discord to discuss more back-and-forth.

@JeWe37
Copy link
Contributor Author

JeWe37 commented Jul 22, 2023

I'm guessing those are still present in Emby, so likely best kept around unchanged. The path based updates also still work(and are very useful if you have no inotify support) and are actually what got me here.

@markus101
Copy link
Member

If Jellyfin is diverging from Emby and making breaking changes then a separate connection may be warranted, though for the majority of people these notifications are probably unused and worst case they can just turn them off.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants