style: auto-fix linting issues
This commit is contained in:
parent
49592e38a3
commit
ce79d6d4c6
2 changed files with 10 additions and 3 deletions
|
|
@ -785,7 +785,14 @@ export async function handleTrackAction(
|
|||
if (!item) return;
|
||||
|
||||
// Actions not allowed for unavailable tracks
|
||||
const forbiddenForUnavailable = ['add-to-queue', 'play-next', 'track-mix', 'download', 'start-radio', 'start-infinite-radio'];
|
||||
const forbiddenForUnavailable = [
|
||||
'add-to-queue',
|
||||
'play-next',
|
||||
'track-mix',
|
||||
'download',
|
||||
'start-radio',
|
||||
'start-infinite-radio',
|
||||
];
|
||||
if (item.isUnavailable && forbiddenForUnavailable.includes(action)) {
|
||||
showNotification('This track is unavailable.');
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -954,7 +954,7 @@ export class Player {
|
|||
const recommendations = await this.api.getRecommendedTracksForPlaylist(seeds, 10);
|
||||
if (recommendations && recommendations.length > 0) {
|
||||
const currentQueueIds = new Set(this.getCurrentQueue().map((t) => t.id));
|
||||
|
||||
|
||||
const [favorites, userPlaylists, history] = await Promise.all([
|
||||
db.getFavorites('track'),
|
||||
db.getAll('user_playlists'),
|
||||
|
|
@ -969,7 +969,7 @@ export class Player {
|
|||
|
||||
const newTracks = recommendations.filter((t) => {
|
||||
if (currentQueueIds.has(t.id)) return false;
|
||||
|
||||
|
||||
if (knownTrackIds.has(t.id)) {
|
||||
return Math.random() < 0.05;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue