|
myMPD
Internal API documentation
|
myMPD lyrics API More...
#include "compile_time.h"#include "src/mympd_api/lyrics.h"#include "src/lib/cache/cache_disk_lyrics.h"#include "src/lib/filehandler.h"#include "src/lib/json/json_print.h"#include "src/lib/json/json_rpc.h"#include "src/lib/log.h"#include "src/lib/mimetype.h"#include "src/lib/sds_extras.h"#include "src/lib/utility.h"#include "src/lib/validate.h"#include "src/mympd_api/trigger.h"#include <string.h>
Functions | |
| static void | lyrics_get (struct t_lyrics *lyrics, struct t_list *extracted, sds mediafile, const char *mime_type_mediafile) |
| static void | lyrics_fromfile (struct t_list *extracted, sds mediafile, const char *ext, bool synced) |
| sds | mympd_api_lyrics_get (struct t_mympd_state *mympd_state, sds buffer, sds uri, sds partition, unsigned long conn_id, unsigned request_id) |
myMPD lyrics API
|
static |
Reads lyrics from a textfiles
| extracted | t_list struct to append found lyrics |
| mediafile | absolute filepath of song uri |
| ext | file extension |
| synced | true for synced lyrics else false |
|
static |
Privat definitions
Private functions Retrieves lyrics and appends it to extracted list
| lyrics | pointer to lyrics configuration |
| extracted | t_list struct to append found lyrics |
| mediafile | absolute filepath of song uri |
| mime_type_mediafile | mime type of the song uri |
| sds mympd_api_lyrics_get | ( | struct t_mympd_state * | mympd_state, |
| sds | buffer, | ||
| sds | uri, | ||
| sds | partition, | ||
| unsigned long | conn_id, | ||
| unsigned | request_id | ||
| ) |
Public functions Gets synced and unsynced lyrics from filesystem and embedded
| mympd_state | pointer to mympd_state |
| buffer | buffer to write the response |
| uri | song uri |
| partition | mpd partition |
| conn_id | mongoose connection id |
| request_id | jsonrpc id |