Child pages
  • API03 Search Syntax

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

General Search Syntax

http://127.0.0.1:9000/nmc/rpc/search?server=[BOOKMARK]search=[hex-encoded query]start=[value]count=[value]

...

http://127.0.0.1:9000/nmc/rpc/search?server=uuid%3A4f1bf61c-599b-443d-b41d-36408362ec75,0&search=747970653d6d757369634974656d266172746973743d46696e645468697326616c62756d3d46696e6454686174&start=0&count=10

Simplified Search Syntax

The simpler search syntax is presented below and uses URL-encoded parameters to set up the search. Caveat: These search tokens are combined into an AND search, e.g. a searched-for item must have all of the token values in its metadata before it matches. There is currently no provision for OR searches.

...

type - the type
The predefined "type" values are:
musicItem, musicAlbum, musicArtist, musicGenre,
photoItem, photoAlbum,
videoItem,
playlist,
folder,
container,
item

Examples

Find all music tracks that contain FindThis in the title.

...

URL encoded string: title=a%22%26%3db&type=musicItem

UPnP Search Syntax

The UPnP Search Syntax grammar is as follows:

	searchCrit ::= searchExp | asterisk
	searchExp ::= relExp | searchExp wChar+ logOp wChar+ searchExp | '(' wChar* searchExp wChar* ')'
	logOp ::= 'and' | 'or'
	relExp ::= property wChar+ binOp wChar+ quotedVal | property wChar+ existsOp wChar+ boolVal
	binOp ::= relOp | stringOp
	relOp ::= '=' | '!=' | '<' | '<=' | '>' | '>='
	stringOp ::= 'contains' | 'doesNotContain' | 'derivedfrom'
	existsOp ::= 'exists'
	boolVal ::= 'true' | 'false'
	quotedVal ::= dQuote escapedQuote dQuote
	wChar ::= space | hTab 

Examples

Find all music tracks that contain FindThis in the title.

...

upnp:class derivedfrom "object.item.audioItem.musicTrack" and (upnp:genre contains "FindThis")

Exact Searches

Find a music track with "FindThis" as the title.

upnp:class derivedfrom "object.item.audioItem.musicTrack" and (dc:title = "FindThis")

Searchable Fields

Items can be searched for by specifying some combination of the following UPnP fields.

res@resolution
res@duration
dc:title
dc:creator
upnp:actor
upnp:artist
upnp:genre
upnp:album
dc:date
upnp:class
@id
@refID
@protocolInfo
upnp:author
dc:description
pv:avKeywords
pv:rating
upnp:seriesTitle
upnp:episodeNumber
upnp:director
upnp:rating
upnp:channelNr
upnp:channelName
upnp:longDescription
pv:capturedate
pv:custom

derivedfrom

derivedfrom can also be one of the following:

...