forked from mirrors/treebird
f1a407c79f
FossilOrigin-Name: 6ca19819ff1547744a39e4d248a7803bf6dfd8f20ae64e704f044200746acaf1
23 lines
5 KiB
Text
23 lines
5 KiB
Text
#ifndef __scrobble
|
|
#define __scrobble
|
|
static const char data_scrobble[] = {0X3C,0X64,0X69,0X76,0X20,0X69,0X64,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X25,0X73,0X22,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X20,0X75,0X69,0X2D,0X74,0X61,0X62,0X6C,0X65,0X22,0X3E,0XA,0X20,0X20,0X3C,0X74,0X61,0X62,0X6C,0X65,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X69,0X73,0X74,0X2D,0X69,0X6E,0X66,0X6F,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X70,0X66,0X70,0X2D,0X63,0X6F,0X6D,0X70,0X61,0X63,0X74,0X2D,0X74,0X64,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X69,0X6D,0X67,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X70,0X66,0X70,0X2D,0X69,0X6D,0X67,0X2D,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X22,0X20,0X73,0X72,0X63,0X3D,0X22,0X25,0X73,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X69,0X73,0X74,0X2D,0X69,0X6E,0X66,0X6F,0X2D,0X74,0X65,0X78,0X74,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X73,0X70,0X61,0X6E,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X75,0X73,0X65,0X72,0X6E,0X61,0X6D,0X65,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X73,0X70,0X61,0X6E,0X3E,0X20,0X3C,0X73,0X70,0X61,0X6E,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X69,0X73,0X74,0X2D,0X61,0X63,0X74,0X69,0X76,0X69,0X74,0X79,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X73,0X70,0X61,0X6E,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X2F,0X74,0X64,0X3E,0X20,0X20,0X20,0X20,0X20,0X20,0XA,0X20,0X20,0X3C,0X2F,0X74,0X61,0X62,0X6C,0X65,0X3E,0XA,0X20,0X20,0X3C,0X74,0X61,0X62,0X6C,0X65,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X73,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X74,0X72,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X74,0X69,0X74,0X6C,0X65,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X6B,0X65,0X79,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X76,0X61,0X6C,0X75,0X65,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X2F,0X74,0X72,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X74,0X72,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X61,0X72,0X74,0X69,0X73,0X74,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X6B,0X65,0X79,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X76,0X61,0X6C,0X75,0X65,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X2F,0X74,0X72,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X74,0X72,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X61,0X6C,0X62,0X75,0X6D,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X6B,0X65,0X79,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X76,0X61,0X6C,0X75,0X65,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X2F,0X74,0X72,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X74,0X72,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X6C,0X65,0X6E,0X67,0X74,0X68,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X6B,0X65,0X79,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X74,0X64,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X73,0X63,0X72,0X6F,0X62,0X62,0X6C,0X65,0X2D,0X76,0X61,0X6C,0X75,0X65,0X22,0X3E,0X25,0X64,0X3C,0X2F,0X74,0X64,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X2F,0X74,0X72,0X3E,0XA,0X20,0X20,0X3C,0X2F,0X74,0X61,0X62,0X6C,0X65,0X3E,0XA,0X3C,0X2F,0X64,0X69,0X76,0X3E,0};
|
|
struct scrobble_template {const char* scrobble_id;
|
|
const char* avatar;
|
|
const char* username;
|
|
const char* activity;
|
|
const char* title_key;
|
|
const char* title;
|
|
const char* artist_key;
|
|
const char* artist;
|
|
const char* album_key;
|
|
const char* album;
|
|
const char* length_key;
|
|
int length;
|
|
};
|
|
char* tmpl_gen_scrobble(struct scrobble_template* data, unsigned* size){
|
|
char* ret;
|
|
unsigned s = easprintf(&ret, data_scrobble, data->scrobble_id?data->scrobble_id:"", data->avatar?data->avatar:"", data->username?data->username:"", data->activity?data->activity:"", data->title_key?data->title_key:"", data->title?data->title:"", data->artist_key?data->artist_key:"", data->artist?data->artist:"", data->album_key?data->album_key:"", data->album?data->album:"", data->length_key?data->length_key:"", data->length);
|
|
if (size) *size = s;
|
|
return ret;
|
|
}
|
|
#endif
|