add modapi function to check playlist for song file
This commit is contained in:
parent
6577f465fd
commit
fb2e6f6d74
|
@ -1,7 +1,6 @@
|
|||
#include "empc_private.h"
|
||||
#include "eldbus_empd_empdd.h"
|
||||
#include "eldbus_empd_empc.h"
|
||||
#include "Empd_Common_Azy.h"
|
||||
|
||||
#define EMPC_METHOD_BASE "org.empd.empc"
|
||||
|
||||
|
@ -3598,3 +3597,24 @@ main(int argc, char *argv[])
|
|||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
EAPI Eina_Bool
|
||||
empc_modapi_queue_list_find_song(const Empd_Empdd_File *f)
|
||||
{
|
||||
char buf[4096];
|
||||
const Eina_List *l, *ll, *lll;
|
||||
Elm_Object_Item *it, *sit;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s:::%s", f->artist, f->album);
|
||||
l = eina_hash_find(empd_current_queue_headers, buf);
|
||||
if (!l) return EINA_FALSE;
|
||||
EINA_LIST_FOREACH(l, ll, it)
|
||||
EINA_LIST_FOREACH(elm_genlist_item_subitems_get(it), lll, sit)
|
||||
{
|
||||
Empd_Empdd_Song *so = elm_object_item_data_get(sit);
|
||||
|
||||
if (so->uri == f->uri) return EINA_TRUE;
|
||||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# define EMPC_H
|
||||
|
||||
#include <Eina.h>
|
||||
#include "Empd_Common_Azy.h"
|
||||
typedef enum
|
||||
{
|
||||
EMPC_MODULE_TYPE_METADATA_FETCH,
|
||||
|
@ -74,5 +75,6 @@ extern Eina_Bool master;
|
|||
|
||||
EAPI extern void *empd_proxy;
|
||||
EAPI extern void *empc_proxy;
|
||||
EAPI Eina_Bool empc_modapi_queue_list_find_song(const Empd_Empdd_File *f);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "empc.h"
|
||||
#include <Ecore.h>
|
||||
#include "eldbus_empd_empdd.h"
|
||||
#include "Empd_Common_Azy.h"
|
||||
|
||||
static long long last_dbtime = 0;
|
||||
static long long dbtime = 0;
|
||||
|
|
Loading…
Reference in New Issue