• 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: 6
    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,673
    Threads: 11
    Joined: 2023 Jun
    Reputation: 473
    Country:United States
    #2
    2025-01-03, 08:12 PM
    What are you trying to do?
    Jellyfin 10.11.11 (Docker)
    Debian 13 w/Xanmod amd64v3 LTS kernel
    AMD Ryzen 5500 w/32GB DDR4
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    ZFS Storage pool
        vdev1 - 6x WD Red Pro 6TB CMR in RAIDZ1
        vdev2 - 3x WD Red Pro 18TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    void
    Offline

    Junior Member

    Posts: 6
    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: 34
    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: 401
    Threads: 9
    Joined: 2023 Jun
    Reputation: 18
    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.
    Jellyfin 12.0 release will be Soon™
    Soon™ is an unregistered trademark of Jellyfin International

    [Image: default-yellow.png]

    void
    Offline

    Junior Member

    Posts: 6
    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.
    void
    Offline

    Junior Member

    Posts: 6
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    Country:United States
    #9
    2026-06-06, 04:16 PM
    It's been a bit so I was wondering if there was any update on this, just a small bump
    User 22046
    Offline

    Unregistered
    Posts: 22
    Threads: 4
    Joined: 2025 Nov
    #10
    2026-06-27, 09:18 PM (This post was last modified: 2026-06-27, 09:21 PM by User 22046. Edited 1 time in total.)
    (2026-06-06, 04:16 PM)void Wrote: It's been a bit so I was wondering if there was any update on this, just a small bump

    No idea about plugin which would most likely be the correct way, but since no one answered yet here a rednecky version that would work:

    You have free access to the css  through "custom css" you can add or adjust any element e.g. add a button to the header which opens a modal that contains your search/request logic.

    Due to cross-origin i think the call would only work through a reverse proxy where ip:8096 is jellyfin and ip:8096/search goes to your custom server which does the logic.

    (only gonna work for any web based clients)

    Then you can directly add the javascript connected to the css element you added above to the compiled jellyin-web javascript files, 
    for this first find the chunk.js in \jellyfin\jellyfin-web which is active on the page you added your button/modal,
    ideally open your browser first go to the page you want the new function placed in and look which .js files are loaded there - then add the endpoint call for your search directly into the chunk.js (just put it at the end no need to specially format it).

    The call could be a simple fetch (ideally reverse proxy and example.org is the same address/ip as your jellyfin server)
      const url = "https://example.org/search";
      try {
        const response = await fetch(url);
    ...

    If your new search server/backend downloads and adds the files to a existing library which has "monitor file changes" enabled the new download will show up by itself once downloaded.
    « 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