From 9a5b67031e1707c0d7e56bab2c7384e518955f48 Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 6 Mar 2016 10:09:34 +0100 Subject: [PATCH] [player] Remove unnecessary check for plid != 0 and set plid always to 0 if queue changed --- src/player.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/player.c b/src/player.c index 4e6ca08b..0357fc06 100644 --- a/src/player.c +++ b/src/player.c @@ -3386,9 +3386,7 @@ playerqueue_add(struct player_command *cmd) queue_shuffle(queue, cur_id); } - //TODO [refactor] Unnecessary if, always set plid to 0 after adding items - if (cur_plid != 0) - cur_plid = 0; + cur_plid = 0; cur_plversion++; listener_notify(LISTENER_PLAYLIST); @@ -3411,9 +3409,7 @@ playerqueue_add_next(struct player_command *cmd) if (shuffle) queue_shuffle(queue, cur_id); - //TODO [refactor] Unnecessary if, always set plid to 0 after adding items - if (cur_plid != 0) - cur_plid = 0; + cur_plid = 0; cur_plversion++; listener_notify(LISTENER_PLAYLIST);