Database


Modules

 Database Advanced Search
 Database Search Statistics
 Database Playlist

Functions

MpdDatampd_database_get_albums (MpdObj *mi, const char *artist)
MpdDatampd_database_get_artists (MpdObj *mi)
MpdDatampd_database_get_complete (MpdObj *mi)
int mpd_database_update_dir (MpdObj *mi, const char *path)
MpdDatampd_database_find (MpdObj *mi, int table, const char *string, int exact)
MpdDatampd_database_get_directory (MpdObj *mi, const char *path)
MpdDatampd_database_get_directory_recursive (MpdObj *mi, const char *path)
mpd_Songmpd_database_get_fileinfo (MpdObj *mi, const char *path)

Function Documentation

MpdData* mpd_database_find ( MpdObj mi,
int  table,
const char *  string,
int  exact 
)

Parameters:
mi a MpdObj
table table
string string to search for
exact if TRUE only return exact matches WARNING: This function is deprecated, use mpd_database_search_start
Returns:
a MpdData list

MpdData* mpd_database_get_albums ( MpdObj mi,
const char *  artist 
)

Parameters:
mi A MpdObj
artist an artist name
Grabs a list of albums of a certain artist from mpd. if artist is NULL it grabs all albums

Returns:
A MpdData list.

MpdData* mpd_database_get_artists ( MpdObj mi  ) 

Parameters:
mi a MpdObj
returns a list of all available artists.

Returns:
a MpdData list

MpdData* mpd_database_get_complete ( MpdObj mi  ) 

Parameters:
mi a MpdObj
Gets the complete database, only returns songs

Returns:
a MpdData list with songs

MpdData* mpd_database_get_directory ( MpdObj mi,
const char *  path 
)

Parameters:
mi a MpdObj
path a NULL terminated path string
Gets the contents of a directory, it can return songs, directories and playlists

Returns:
a MpdData list with songs, directories and playlists

MpdData* mpd_database_get_directory_recursive ( MpdObj mi,
const char *  path 
)

Parameters:
mi a MpdObj
path a string containing the path
Recursively list all the songs directory path

Returns:
a MpdData

mpd_Song* mpd_database_get_fileinfo ( MpdObj mi,
const char *  path 
)

Parameters:
mi A MpdObj
path an Path to a file
Grabs the song info for a single file. Make sure you pass a url to a song and not a directory, that might result in strange behaviour.

Returns:
a mpd_Song

int mpd_database_update_dir ( MpdObj mi,
const char *  path 
)

Parameters:
mi A MpdObj
path The path mpd should update.
Force mpd to update (parts of) the database.

Returns:
a MpdError


Copyright 2006 Qball Cow