mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
[player] Only increment playcount and scrobble persistent items
Ommits useless update query for playcount for items that are not in the library. Also avoids trying to scrobble these items (fixes error log message "lastfm: Scrobble failed, track id 9999999 is unknown")
This commit is contained in:
parent
ce1bf8f40d
commit
9a47335a05
@ -811,10 +811,15 @@ source_check(void)
|
||||
i++;
|
||||
|
||||
id = (int)cur_playing->id;
|
||||
worker_execute(playcount_inc_cb, &id, sizeof(int), 5);
|
||||
|
||||
if (id != DB_MEDIA_FILE_NON_PERSISTENT_ID)
|
||||
{
|
||||
worker_execute(playcount_inc_cb, &id, sizeof(int), 5);
|
||||
#ifdef LASTFM
|
||||
worker_execute(scrobble_cb, &id, sizeof(int), 8);
|
||||
worker_execute(scrobble_cb, &id, sizeof(int), 8);
|
||||
#endif
|
||||
}
|
||||
|
||||
history_add(cur_playing->id, cur_playing->item_id);
|
||||
|
||||
if (consume)
|
||||
|
Loading…
Reference in New Issue
Block a user