fix: video embeds
add: listening state api
This commit is contained in:
parent
498884291e
commit
a114d862ae
4 changed files with 39 additions and 11 deletions
|
@ -671,22 +671,22 @@
|
|||
]);
|
||||
}
|
||||
|
||||
if (
|
||||
window.localStorage.getItem("atto:connections.last_fm/name") ===
|
||||
playing.name
|
||||
) {
|
||||
// item already pushed to connection, no need right now
|
||||
return;
|
||||
}
|
||||
|
||||
const mb_info = await $.pull_track_info(
|
||||
playing.artist.name,
|
||||
playing.name,
|
||||
);
|
||||
|
||||
if (
|
||||
window.localStorage.getItem("atto:connections.last_fm/name") ===
|
||||
playing.name + mb_info.id
|
||||
) {
|
||||
// item already pushed to connection, no need right now
|
||||
return;
|
||||
}
|
||||
|
||||
window.localStorage.setItem(
|
||||
"atto:connections.last_fm/name",
|
||||
playing.name,
|
||||
playing.name + mb_info.id,
|
||||
);
|
||||
|
||||
return await trigger("connections::push_con_state", [
|
||||
|
@ -698,7 +698,7 @@
|
|||
track_img: playing.image[2]["#text"],
|
||||
},
|
||||
data: {
|
||||
id: playing.mbid,
|
||||
id: mb_info.id,
|
||||
// track
|
||||
track: playing.name,
|
||||
artist: playing.artist.name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue