style: auto-fix linting issues

This commit is contained in:
edideaur 2026-04-14 19:32:16 +00:00 committed by github-actions[bot]
parent 5267229be8
commit a4e714a214
3 changed files with 30 additions and 6 deletions

View file

@ -162,7 +162,12 @@ export async function onRequest(context) {
}
}
if (album && album.copyright && (album.copyright.toLowerCase().includes(atob('emVl')) || album.copyright.toLowerCase().includes(atob('em1j')))) {
if (
album &&
album.copyright &&
(album.copyright.toLowerCase().includes(atob('emVl')) ||
album.copyright.toLowerCase().includes(atob('em1j')))
) {
return new Response('This content was removed due to a DMCA notice.', { status: 200 });
}

View file

@ -188,7 +188,12 @@ export async function onRequest(context) {
}
}
if (track && track.copyright && (track.copyright.toLowerCase().includes(atob('emVl')) || track.copyright.toLowerCase().includes(atob('em1j')))) {
if (
track &&
track.copyright &&
(track.copyright.toLowerCase().includes(atob('emVl')) ||
track.copyright.toLowerCase().includes(atob('em1j')))
) {
return new Response('This content was removed due to a DMCA notice.', { status: 200 });
}

View file

@ -3710,7 +3710,10 @@ export class UIRenderer {
finalAlbums = Array.from(albumMap.values());
}
const isLicensed = (item) => !item.copyright || (!item.copyright.toLowerCase().includes(atob('emVl')) && !item.copyright.toLowerCase().includes(atob('em1j')));
const isLicensed = (item) =>
!item.copyright ||
(!item.copyright.toLowerCase().includes(atob('emVl')) &&
!item.copyright.toLowerCase().includes(atob('em1j')));
finalTracks = finalTracks.filter(isLicensed);
finalVideos = finalVideos.filter(isLicensed);
finalAlbums = finalAlbums.filter(isLicensed);
@ -3909,7 +3912,11 @@ export class UIRenderer {
const { album, tracks } = await this.api.getAlbum(albumId, provider);
this.currentAlbumId = albumId;
if (album.copyright && (album.copyright.toLowerCase().includes(atob('emVl')) || album.copyright.toLowerCase().includes(atob('em1j')))) {
if (
album.copyright &&
(album.copyright.toLowerCase().includes(atob('emVl')) ||
album.copyright.toLowerCase().includes(atob('em1j')))
) {
imageEl.src = '';
imageEl.style.backgroundColor = 'transparent';
titleEl.textContent = '';
@ -5220,7 +5227,10 @@ export class UIRenderer {
}
});
const isLicensed = (item) => !item.copyright || (!item.copyright.toLowerCase().includes(atob('emVl')) && !item.copyright.toLowerCase().includes(atob('em1j')));
const isLicensed = (item) =>
!item.copyright ||
(!item.copyright.toLowerCase().includes(atob('emVl')) &&
!item.copyright.toLowerCase().includes(atob('em1j')));
artist.tracks = artist.tracks.filter(isLicensed);
artist.albums = artist.albums.filter(isLicensed);
if (artist.eps) artist.eps = artist.eps.filter(isLicensed);
@ -6175,7 +6185,11 @@ export class UIRenderer {
track = await this.api.getTrackMetadata(trackId);
this.currentTrackPageId = track.id;
if (track.copyright && (track.copyright.toLowerCase().includes(atob('emVl')) || track.copyright.toLowerCase().includes(atob('em1j')))) {
if (
track.copyright &&
(track.copyright.toLowerCase().includes(atob('emVl')) ||
track.copyright.toLowerCase().includes(atob('em1j')))
) {
document.getElementById('page-track').innerHTML =
'<p style="padding: 2rem; color: var(--muted-foreground);">This content is unavailable due to a DMCA notice.</p>';
return;