![]() |
Is it possible to inject search results via api? - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Development (https://forum.jellyfin.org/f-development) +--- Forum: Server Development (https://forum.jellyfin.org/f-server-development) +--- Thread: Is it possible to inject search results via api? (/t-is-it-possible-to-inject-search-results-via-api) |
Is it possible to inject search results via api? - void - 2025-01-03 As the title says I was wondering if it would be possible to inject search results via an api or plugin. I checked swagger and it didn't seem to have anything related to what I'm looking for. Ideally I would like to have the server ping an endpoint to receive a search result json and then display said json to the user. If the user selects the provided item perhaps send a POST back to the external endpoint or even run a local command/bash script. Is such a thing possible and what files would I have to modify to achieve something like this; are there any plugins that have something similar already implemented? I am a dev and would be willing to write something like this with a bit of direction, thanks in advance. RE: Is it possible to inject search results via api? - TheDreadPirate - 2025-01-03 What are you trying to do? RE: Is it possible to inject search results via api? - void - 2025-01-03 I would like to display external results and download (and ideally begin streaming) when the user hits play. I have written an app to download music from sources like youtube, soundcloud, bandcamp, etc and would like to be able to use the app to pad my rather small music library on jellyfin. When a user submits a search, say for 'Daft Punk', the results would first return local items and then external (or if not possible they would be merged into the local library categories artists, albums, etc displaying in order of whatever is most similar to the query). When an external item is clicked jellyfin would curl my app (or communicate in some other way) to begin downloading the file and then play the result. Most of the processing would be done externally and perhaps once the user clicks play jellyfin would POST the server with the selection via curl and would be returned a file url or filepath. Please let me know if you would like a more indepth explanation. RE: Is it possible to inject search results via api? - qwerty12 - 2025-01-04 I am not a developer, so I wouldn't be able to tell you if Jellyfin actually can do this natively, but my amateur suggestions:
Again, just some ideas on how you could possibly get started, but I know nothing about Jellyfin so take those ideas with a healthy dose of scepticism. RE: Is it possible to inject search results via api? - Venson - 2025-01-08 TLDR; not _yet_. After the EFCore rework i plan on introducing an API to allow plugins to enrich the search results and may provide syntetic baseitems. Until then its currently requireing deep knowlage of JFs systems and a number of hacks that will 100% garanteed break in any update. However deeper interegation with 3rd parties will likely not be possible as they would require something of an adaptation of the WebUI first. RE: Is it possible to inject search results via api? - void - 2025-01-09 Thank you both for the responses, Meilisearch looks really promising. One of the first things I noticed when setting up my jellyfin instance is that search results were unbearably slow, running something like find . -name QUERY in bash is far faster than whatever jellyfin is using in the background. Skimmed through the blog post and pr for EFCore and it looks quite promising. Since it seems like the pr is quite large and you already plan on working on this make sure to post something here if you end up adding some way to inject search results. I'd be more than happy to write a few plugins for 3rd party services once its complete. Thanks again RE: Is it possible to inject search results via api? - ickyfehmleh - 2025-01-13 You could proxy requests to the JF API but you'd have to adhere to the published docs and pass-thru everything you don't want to modify. On calls you DO want to modify, call the JF API, parse and manipulate the results, and return your new json payload. RE: Is it possible to inject search results via api? - raistie - 2025-02-25 (2025-01-04, 02:16 AM)qwerty12 Wrote: I am not a developer, so I wouldn't be able to tell you if Jellyfin actually can do this natively, but my amateur suggestions: I’ve tried this by modifying the jellysearch plugin to also make a call to jellyseerr and return results together with the the json payload. The issue is that Jellyfin then ignores the results because of the fake IDs. It seems that Jellyfin requires real IDs and content to exist before it will display the results. The only way it seems now is perhaps for each search result, on the fly, create the folder structure with a fake video file - so Jellyfin will somehow pick that up? I have given up because it’s too much workaround to hack Jellyfin in this way. The devs need to support custom results first. |