• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Development Server Development Is it possible to inject search results via api?

     
    • 0 Vote(s) - 0 Average

    Is it possible to inject search results via api?

    Is it possible to inject search results via api?
    void
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    Country:United States
    #1
    2025-01-03, 07:06 PM (This post was last modified: 2025-01-03, 07:08 PM by void. Edited 2 times in total.)
    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.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-01-03, 08:12 PM
    What are you trying to do?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    void
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    Country:United States
    #3
    2025-01-03, 08:30 PM (This post was last modified: 2025-01-03, 08:53 PM by void. Edited 7 times in total.)
    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.
    qwerty12
    Offline

    Junior Member

    Posts: 30
    Threads: 0
    Joined: 2023 Jun
    Reputation: 3
    #4
    2025-01-04, 02:16 AM
    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:
    • the Meilisearch Plugin for Jellyfin plugin, which I have never used, talks a little about how it intercepts searches so that it can send them off to an external service: https://github.com/arnesacnussem/jellyfi...w-it-works
      I would guess the ActionFilter it talks about could be used to determine accesses to items with fake IDs that your service may return... An obvious hack, the author seems to be rather forthcoming about the fact that their approach isn't guaranteed to continue working for future Jellyfin versions
    • The plugin mentioned above implements a client-agnostic approach, but if you just plan to search in the browser via Jellyfin's web interface, it may be an easier task to modify and build your own jellyfin-web to hit up your app in addition when searching

    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.
    Venson
    Offline

    Moderator, Server Dev, XBox Maintainer

    Posts: 378
    Threads: 7
    Joined: 2023 Jun
    Reputation: 15
    Country:Germany
    #5
    2025-01-08, 02:36 PM
    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.
    typos are finders, keepers.
    Next Jellyfin release 10.11.0 will be Soon™
    Soon™ is an unregistered trademark of Jellyfin International
    void
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    Country:United States
    #6
    2025-01-09, 07:45 PM
    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
    ickyfehmleh
    Offline

    Junior Member

    Posts: 10
    Threads: 1
    Joined: 2023 Jul
    Reputation: 0
    Country:United States
    #7
    2025-01-13, 02:04 AM
    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.
    raistie
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Feb
    Reputation: 0
    Country:Australia
    #8
    2025-02-25, 09:18 PM
    (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:
    • the Meilisearch Plugin for Jellyfin plugin, which I have never used, talks a little about how it intercepts searches so that it can send them off to an external service: https://github.com/arnesacnussem/jellyfi...w-it-works
      I would guess the ActionFilter it talks about could be used to determine accesses to items with fake IDs that your service may return... An obvious hack, the author seems to be rather forthcoming about the fact that their approach isn't guaranteed to continue working for future Jellyfin versions
    • The plugin mentioned above implements a client-agnostic approach, but if you just plan to search in the browser via Jellyfin's web interface, it may be an easier task to modify and build your own jellyfin-web to hit up your app in addition when searching

    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.

    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.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode