`
- document.querySelector(".info__cont .title").insertAdjacentHTML("beforeend", html)
+ if (item.ImageBlurHashes.length != undefined) {
+ html = `
`;
+ document.querySelector(".latestMediaSlider").insertAdjacentHTML("beforeend", html);
+ if (item.ImageTags.Logo) {
+ html = `
`;
+ document.querySelector(".info__cont .title").insertAdjacentHTML("beforeend", html);
+ } else {
+ document.querySelector(".info__cont .title").insertAdjacentHTML("beforeend", item.Name);
+ }
+ backdrop = item.BackdropImageTags[0];
+ blurhashval = decode(item.ImageBlurHashes.Backdrop[backdrop], 1080, 720);
+ console.log(blurhashval);
+ blurhasdpix = document.querySelector(".placeholder").getContext("2d").createImageData(1080, 720);
+ blurhasdpix.data.set(blurhashval);
+ document.querySelector(".placeholder").getContext("2d").putImageData(blurhasdpix, 0, 0);
+ $(".slide__background img").on("load", function () {
+ document.querySelector(".placeholder").setAttribute("style", "opacity: 0;");
+ }).attr('src', `https://${window.server}/Items/${item.Id}/Images/Backdrop?imgTag=${item.BackdropImageTags[0]}`);
} else {
- document.querySelector(".info__cont .title").innerHTML = item.Name
+ if (item.Type == "AudioBook") {
+ html = `
+
+
+
+
+
${item.ProductionYear}
+
${item.CommunityRating}
+
${ticksToMin(item.RunTimeTicks)}min
+
+
+
+
+
+
+
`;
+ document.querySelector(".latestMediaSlider").insertAdjacentHTML("beforeend", html);
+ if (item.ImageTags.Logo) {
+ html = `
`;
+ document.querySelector(`[data-index="${latestMedia.data.indexOf(item)}"] .title`).insertAdjacentHTML("beforeend", html);
+ } else {
+ document.querySelector(`[data-index="${latestMedia.data.indexOf(item)}"] .title`).insertAdjacentHTML("beforeend", `
${item.Name}
`);
+ }
+ }
+ // } else if (!item) { }
}
+ window.itm = item;
+
if (latestMedia.data.indexOf(item) == 0) {
document.querySelector(".slide").classList.add("active");
}
- console.log(item.ImageBlurHashes.Backdrop[0]);
- backdrop = item.BackdropImageTags[0];
- blurhashval = decode(item.ImageBlurHashes.Backdrop[backdrop], 1080, 720);
- console.log(blurhashval);
- blurhasdpix = document.querySelector(".placeholder").getContext("2d").createImageData(1080, 720);
- blurhasdpix.data.set(blurhashval);
- document.querySelector(".placeholder").getContext("2d").putImageData(blurhasdpix, 0, 0);
- $(".slide__background img").on("load", function () {
- document.querySelector(".placeholder").setAttribute("style", "opacity: 0;");
- }).attr('src', `https://jellyfin.prayagnet.tk/Items/${item.Id}/Images/Backdrop?imgTag=${item.BackdropImageTags[0]}`);
});
console.log(latestMedia.data);
if (latestMedia.data.length > 1) {
diff --git a/renderer/svg/avatar.svg b/renderer/svg/avatar.svg
index f532d90..ba842d7 100644
--- a/renderer/svg/avatar.svg
+++ b/renderer/svg/avatar.svg
@@ -1,14 +1,14 @@
-
+