Jellyfin Forum
JellySearch - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Plugin Development (https://forum.jellyfin.org/f-plugin-development)
+--- Thread: JellySearch (/t-jellysearch)

Pages: 1 2 3 4


RE: JellySearch - Nerokor - 2024-08-23

Quote:location ~* ^(?!/Genres)(.*) {
    if ($arg_searchTerm) {
        proxy_pass http://jellysearch:5000;
        break;
    }
}

I'm using Nginx Proxy Manager. When I put the above configuration (edited with my jellysearch IP:port) into Advanced > Custom Nginx Configuration, I get a "Welcome to OpenResty!" page.


RE: JellySearch - Topomov - 2024-08-23

(2024-08-22, 09:36 PM)domi Wrote: Try adding the following location block above your regular Jellyfin location block:

Quote:location ~* ^(?!/Genres)(.*) {
    if ($arg_searchTerm) {
        proxy_pass http://jellysearch:5000;
        break;
    }
}

Where http://jellysearch:5000 is your host where JellySearch is running.

(2024-08-21, 06:45 PM)Topomov Wrote: Do you know if it's normal that the following request: http://192.168.1.22:5500/Users/SOMEID/Items?searchTerm=Bond&Limit=100&Fields=PrimaryImageAspectRatio,CanDelete,MediaSourceCount&Recursive=true&EnableTotalRecordCount=false&ImageTypeLimit=1&IncludePeople=false&IncludeMedia=true&IncludeGenres=false&IncludeStudios=false&IncludeArtists=false&IncludeItemTypes=Movie

Returns the following? {"Items": [], "TotalRecordCount": 0, "StartIndex": 0}

Yes, all authentication is done by Jellyfin. Since I'm not sending any request when no results are found I just return an empty result no matter if the authentication failed or there are no results so I don't leak any data. You will have to set the Authorization header in order for Jellyfin to respond.

The Jellyfin Nginx part is handled by Synology; I have little control over it Slightly-frowning-face
I'll try and see what I can do!


RE: JellySearch - vodka - 2024-08-23

(2024-08-22, 09:36 PM)domi Wrote: Try adding the following location block above your regular Jellyfin location block:

Quote:location ~* ^(?!/Genres)(.*) {
    if ($arg_searchTerm) {
        proxy_pass http://jellysearch:5000;
        break;
    }
}

I tried this (with the correct proxy pass url ofc) and it seems to now redirect everything that goes to my jf domain straight to a default nginx page. Commenting it out restores service as normal.

Though what I did instead was change my default location block to include the if part from here, since I don't care about the Genres queries going though (according to the dev they get passed through anyway)

I changed it from this:

Code:
    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        proxy_pass http://10.0.69.69:8096;
        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
    }
To this:
Code:
    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        if ($arg_searchTerm) {
            proxy_pass http://10.0.69.69:5000;
            break;
        }
        proxy_pass http://10.0.69.69:8096;
        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
    }
And it works great.


RE: JellySearch - domi - 2024-08-24

(2024-08-23, 12:54 AM)Nerokor Wrote:
Quote:location ~* ^(?!/Genres)(.*) {
    if ($arg_searchTerm) {
        proxy_pass http://jellysearch:5000;
        break;
    }
}

I'm using Nginx Proxy Manager. When I put the above configuration (edited with my jellysearch IP:port) into Advanced > Custom Nginx Configuration, I get a "Welcome to OpenResty!" page.

I updated the documentation in the git repository for nginx and Nginx Proxy Manager: https://gitlab.com/DomiStyle/jellysearch#nginx
Should hopefully work that way in both instances.


(2024-08-23, 02:55 PM)Topomov Wrote: The Jellyfin Nginx part is handled by Synology; I have little control over it Slightly-frowning-face
I'll try and see what I can do!

I don't own any Synology device so you're on your own there but I updated the documentation for nginx and Nginx Proxy Manager, so if you can get access to your nginx configs you can go from there.


(2024-08-23, 03:50 PM)vodka Wrote: And it works great.

Thanks, added it to the documentation.


RE: JellySearch - keklol - 2024-08-27

I wish we can get something like this native one day!


RE: JellySearch - Topomov - 2024-08-27

It works so beautiful well! Thank you for everything!!

As for Synology users; I wrote the following script that should be put in the task scheduler (have it run at boot as root)

Code:
# Define the search term for grep and the words for modification
search_word_1="jellyfin.MYHOSTNAME.com"
search_word_2="location \/ {"
insert_text="\n if (\$arg_searchTerm) { \n        proxy_pass http:\/\/localhost:MYJELLYSEARCHPORT;\n        break;\n    }\n"

# Search for the first file containing the string in grep_term in the specified directory
file=$(grep -Rnw '/usr/local/etc/nginx/sites-available/' -e "$search_word_1" | awk -F: 'NR==1{print $1}')

# Check if a file was found
if [ -z "$file" ]; then
  echo "No file containing '$grep_term' found."
  exit 1
fi

# Verify that both search_word_1 and search_word_2 exist in the file
if grep -q "$search_word_1" "$file" && grep -q "$search_word_2" "$file"; then
  # Use sed with variables to find the first occurrence of search_word_2 after search_word_1 and insert insert_text after search_word_2
  sed -i "/$search_word_1/,/$search_word_2/{s/\($search_word_2\)/\1 $insert_text/;}" "$file"
  echo "Modification applied to $file"
  nginx -s reload
else
  echo "The file $file does not contain both '$search_word_1' and '$search_word_2'"
fi



RE: JellySearch - Nerokor - 2024-08-28

(2024-08-24, 10:39 AM)domi Wrote: [quote="Nerokor" pid='33888' dateline='1724374498']
Quote:location ~* ^(?!/Genres)(.*) {
    if ($arg_searchTerm) {
        proxy_pass http://jellysearch:5000;
        break;
    }
}

I'm using Nginx Proxy Manager. When I put the above configuration (edited with my jellysearch IP:port) into Advanced > Custom Nginx Configuration, I get a "Welcome to OpenResty!" page.

I updated the documentation in the git repository for nginx and Nginx Proxy Manager: https://gitlab.com/DomiStyle/jellysearch#nginx
Should hopefully work that way in both instances.


Thank you for making this. Your setup instructions worked great for me. One issue that came up is a friend was searching for something on Swiftfin and it would crash I assume it's related to the change to Jellysearch. Any plans to support Swiftfin?


RE: JellySearch - domi - 2024-08-28

(2024-08-28, 12:49 AM)Nerokor Wrote: Thank you for making this. Your setup instructions worked great for me. One issue that came up is a friend was searching for something on Swiftfin and it would crash I assume it's related to the change to Jellysearch. Any plans to support Swiftfin?

Swiftfin should work in the latest version.


RE: JellySearch - TheDMV - 2024-08-28

(2024-08-18, 06:50 PM)jennystreaming Wrote: This seem to be for Jellyfin? https://github.com/fredrikburmester/marlin-search

Marlin search is only for clients that support it, which at this time, is only the author's client, Streamyfin.


RE: JellySearch - hov - 2024-09-17

Configuration was quite complicated. Unsure how to get it to work with custom items to prevent crawlers and stuff in NPM. Documentation on dev's gitlab could improve