Jump to content

Recommended Posts

Posted

Hey,

is it possible to query an item by searching for the file path or file name?

 

Thank you and best regards,

Jonas

Posted

Hi, no, but it's a good idea to add this. We can add Path for the next release, since that's something we currently keep in the database. Thanks.

  • Like 1
  • 11 months later...
henriquefer
Posted

Hi, no, but it's a good idea to add this. We can add Path for the next release, since that's something we currently keep in the database. Thanks.

 

 

Any developments regarding this?

Posted

Hi, looks like a Path param is already present. Granted I think this might difficult on the query string, but give it a shot. Thanks.

  • 1 month later...
TheShanMan
Posted

I've been trying to get this Path parameter to work either with a partial path or a full path including the filename but can't get it to work (returns 0 items). Here's a sample of what I'm trying:

 

http://myserver:8096/Items?Recursive=true&Fields=Path&Path=%5C%5Cmyserver%5Cmyshare%5CVideo%5Cmyshow.avi

 

Is this parameter functional? Do I need to specify another parameter to get it to work? Ultimately I'd like to specify a partial path in order to get all items inside a directory (recursively).

Posted

It needs to be the full path and it needs to match the path that emby server has for it, so partials will not work.

PenkethBoy
Posted (edited)

You can do this as a two stage process

 

add your path to the path search

 

i used "e:\serverfolders\multimedia\movies"  dont add a trailing slash as it will then fail or something longer like "e:\serverfolders\multimedia\movies\Alien"

 

 

the above path is the root of my movies library - just an example

 

the returned json has the ID of my Movies directory

 

take this ID and clear out the path you put in earlier

 

then put the id number in parentID , make recursive to true, put includeitemtype to movie(or whatever you need) and add "path" to the fields box

 

you will get a list of all movies with the parent ID and the full path to each file etc

 

not elegant - but works 

 

from swagger

"http://192.168.1.80:8096/emby/Items?Recursive=true&ParentId=6&IncludeItemTypes=movie&api_key=0c66fd28d42d4e6a82aa885500e29348"

Edited by PenkethBoy
TheShanMan
Posted

It needs to be the full path and it needs to match the path that emby server has for it, so partials will not work.

 

My example is a full path, which I tried both URI encoded and as plain text. Didn't work either way.

 

You can do this as a two stage process

 

add your path to the path search

 

i used "e:\serverfolders\multimedia\movies"  dont add a trailing slash as it will then fail or something longer like "e:\serverfolders\multimedia\movies\Alien"

 

What is the "path search"?

 

take this ID and clear out the path you put in earlier

 

then put the id number in parentID , make recursive to true, put includeitemtype to movie(or whatever you need) and add "path" to the fields box

 

Yeah, if I grab an ID from a folder URL when I browse to it in my browser, I can use it as you suggest. Thanks for that tip.

PenkethBoy
Posted

path search is the option to search by "path" in swagger

 

if used alone it returns very basic info on the last folder in the path provided - which includes the ID

TheShanMan
Posted

I have been looking at swagger but you and I must be doing it differently, which is why I asked. I'm doing "/Items?Path=" and it doesn't matter whether I use the local path, UNC path, or either of those paths URI encoded. No matter what I try I get "Unable to find the specified file."

PenkethBoy
Posted

yes same endpoint and it does work

 

5e8a19c092af2_Annotation20200405184600.j

 

gives

 

5e8a19d15892f_Annotation20200405184555.j

 

Dont understand why you are going via a path

 

get the library id, then get the media , compare path you are looking for with individual item path or part of it

TheShanMan
Posted

Hmm... looks the same to me. Wonder why it fails for me.  :huh:

PenkethBoy
Posted

without any detail impossible to say

  • 2 years later...
Phone Guy
Posted (edited)

Sorry to bring this back, but I have a question.... When I load my emby web interface and search a title and its found, it does not show its path, so I have no idea which folder its in, which "menu" its in... can I show this somehow? the path of where the video was found?

 

I have several "menus" in my emby server (movies / old movies / tv / full res / atmos / anime) just as examples. So I search for "First Contact" which I know I have, but not sure which folder its in, on the web interface I can find it and play it, but still dont know where it is to navigate to it in my mce interface. Is what I want possible?

Edited by Phone Guy
Posted

Hi, you'd have to click on it in search results and then you can see the path, since it's not displayed on the search results screen.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...