Fix first element of queue list (#88)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
Follow up of #85 Co-authored-by: Mylloon <kennel.anri@tutanota.com> Reviewed-on: #88
This commit is contained in:
parent
21d9c7e8e7
commit
b0fda1d167
1 changed files with 3 additions and 2 deletions
|
@ -25,8 +25,9 @@ export const embedListQueue = (
|
|||
embed.setFooter({ text: `${printRepeatMode(queue.repeatMode, loc)}` });
|
||||
|
||||
tracks.slice((page - 1) * limit_fields, page * limit_fields).forEach((t, idx) => {
|
||||
const name = idx == 0 ? loc.get("c_queue10") : idx == 1 ? loc.get("c_queue11") : "\u200b";
|
||||
const idx_track = idx == 0 ? "" : `${idx + limit_fields * (page - 1)}. `;
|
||||
const now_playing = idx == 0 && page == 1;
|
||||
const name = now_playing ? loc.get("c_queue10") : idx == 1 ? loc.get("c_queue11") : "\u200b";
|
||||
const idx_track = now_playing ? "" : `${idx + limit_fields * (page - 1)}. `;
|
||||
embed.addFields({
|
||||
name,
|
||||
value: `${idx_track}[${t.title} • ${t.author}](${t.url}) (${t.duration})`,
|
||||
|
|
Loading…
Reference in a new issue