mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
[db] Instantly notify about rating changes
This commit is contained in:
parent
e00a4a1995
commit
5a57a564a4
10
src/db.c
10
src/db.c
@ -2508,7 +2508,10 @@ db_file_rating_update_byid(uint32_t id, uint32_t rating)
|
||||
|
||||
query = sqlite3_mprintf(Q_TMPL, rating, id);
|
||||
|
||||
ret = db_query_run(query, 1, LISTENER_RATING);
|
||||
ret = db_query_run(query, 1, 0);
|
||||
|
||||
if (ret == 0)
|
||||
listener_notify(LISTENER_RATING);
|
||||
|
||||
return ((ret < 0) ? -1 : sqlite3_changes(hdl));
|
||||
#undef Q_TMPL
|
||||
@ -2523,7 +2526,10 @@ db_file_rating_update_byvirtualpath(const char *virtual_path, uint32_t rating)
|
||||
|
||||
query = sqlite3_mprintf(Q_TMPL, rating, virtual_path);
|
||||
|
||||
ret = db_query_run(query, 1, LISTENER_RATING);
|
||||
ret = db_query_run(query, 1, 0);
|
||||
|
||||
if (ret == 0)
|
||||
listener_notify(LISTENER_RATING);
|
||||
|
||||
return ((ret < 0) ? -1 : sqlite3_changes(hdl));
|
||||
#undef Q_TMPL
|
||||
|
Loading…
Reference in New Issue
Block a user