Skip to content

Commit

Permalink
[Issue #10] Repair setting a sticker for the first time.
Browse files Browse the repository at this point in the history
In MPD commit 432675d4c23450c527333ed4a29d13f843e001da the error
message for "sticker get" when the sticker is not found was changed.
mpdpopm (foolishly) relied on the error message. This patch changes
the salient logic to examine only the error code, instead.
  • Loading branch information
sp1ff committed Dec 24, 2023
1 parent 4c6a74e commit 9d9e3a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpdpopm/src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ impl Client {
}
})?))
} else {
(text.starts_with("ACK ") && text.ends_with("no such sticker\n"))
.context(Operation::GetSticker, &msg)?;
// ACK_ERROR_NO_EXIST = 50 (Ack.hxx:17)
(text.starts_with("ACK [50@0]")).context(Operation::GetSticker, &msg)?;
Ok(None)
}
}
Expand Down

0 comments on commit 9d9e3a8

Please sign in to comment.