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 #129

Open
devfake opened this issue Dec 25, 2019 · 2 comments
Open

Jellyfin #129

devfake opened this issue Dec 25, 2019 · 2 comments

Comments

@devfake
Copy link
Owner

devfake commented Dec 25, 2019

I am looking for someone who could build a simple Jellyfin API for Flox.

There is already one for Plex (#127). However, I don't think there is any simple webhook functionality built in for Jellyfin?

The required data for Flox are very simple. The class must inherit from the abstract api class and implement the necessary methods. Example from Plex: https://github.com/devfake/flox/blob/master/backend/app/Services/Api/Plex.php.

Or is it necessary to request the API of Jellyfin itself? For example via a cronjob.

@sum01
Copy link

sum01 commented May 11, 2021

I believe this would require a plugin to be installed on the Jellyfin server for it to make calls to your API.
Otherwise you need to constantly query the API, which is annoying.

See here for a webhook plugin that might work.
If someone writes up a nice template for that plugin to interact with your Plex API you probably don't need to do any work on this codebase. At least I think that's what this plugin is capable of with that PlayedToCompletion hook...

@sa-egor
Copy link

sa-egor commented Mar 21, 2023

I maked this template. Works fine.

{"payload": "{\"Metadata\": {\"type\": {{#if_equals ItemType 'Episode'}}\"episode\"{{else}}{{#if_equals ItemType 'Movie'}}\"movie\"{{else}}\"{{ItemType}}\"{{/if_equals}}{{/if_equals}}, \"parentIndex\": \"{{SeasonNumber}}\", \"index\": \"{{EpisodeNumber}}\", \"grandparentTitle\": \"{{{SeriesName}}}\", \"title\": \"{{{Name}}}\", \"year\": \"{{Year}}\", \"tmdb_id\": \"{{Provider_tmdb}}\", \"imdb_id\": \"{{Provider_imdb}}\"}, \"event\": {{#if_equals NotificationType 'PlaybackStart'}}\"media.play\"{{/if_equals}}{{#if_equals NotificationType 'PlaybackStop'}}{{#if_equals PlayedToCompletion true}}\"media.scrobble\"{{else}}\"media.stop\"{{/if_equals}}{{/if_equals}} }"}

And headers:
Screenshot_20230321_233714

I taken this data from Plex request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants