lint: remove unused imports and variables in server files (6 fixes)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
parent
29f2da61dd
commit
6caf2651ac
4 changed files with 5 additions and 8 deletions
|
|
@ -2,8 +2,7 @@ import { getAppleMusicHeaders } from './apple-music-auth'
|
|||
import type {
|
||||
AppleMusicAlbum,
|
||||
AppleMusicTrack,
|
||||
AppleMusicSearchResponse,
|
||||
AppleMusicErrorResponse
|
||||
AppleMusicSearchResponse
|
||||
} from '$lib/types/apple-music'
|
||||
import { isAppleMusicError } from '$lib/types/apple-music'
|
||||
import { ApiRateLimiter } from './rate-limiter'
|
||||
|
|
@ -74,7 +73,7 @@ async function makeAppleMusicRequest<T>(endpoint: string, identifier?: string):
|
|||
`Apple Music API Error: ${errorData.errors[0]?.detail || 'Unknown error'}`
|
||||
)
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
// If not JSON, throw the text error
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ export class CacheManager {
|
|||
let totalDeleted = 0
|
||||
|
||||
// Clear all cache types that might contain this album
|
||||
for (const [type, config] of this.cacheTypes) {
|
||||
for (const [type] of this.cacheTypes) {
|
||||
if (type.includes('album') || type.includes('notfound')) {
|
||||
const deleted = await this.clearPattern(type, albumKey)
|
||||
totalDeleted += deleted
|
||||
|
|
@ -162,4 +162,4 @@ export const cache = {
|
|||
isNotFound: (artist: string, album: string) => CacheManager.get('apple-notfound', `${artist}:${album}`),
|
||||
markNotFound: (artist: string, album: string, ttl?: number) => CacheManager.set('apple-notfound', `${artist}:${album}`, '1', ttl)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { v2 as cloudinary } from 'cloudinary'
|
||||
import type { UploadApiResponse, UploadApiErrorResponse } from 'cloudinary'
|
||||
import type { UploadApiResponse } from 'cloudinary'
|
||||
import { logger } from './logger'
|
||||
import { uploadFileLocally } from './local-storage'
|
||||
import { dev } from '$app/environment'
|
||||
|
|
@ -130,7 +130,6 @@ export async function uploadFile(
|
|||
|
||||
// Extract filename without extension
|
||||
const fileNameWithoutExt = file.name.replace(/\.[^/.]+$/, '')
|
||||
const fileExtension = file.name.split('.').pop()?.toLowerCase()
|
||||
|
||||
// Prepare upload options
|
||||
const uploadOptions = {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ export function selectBestDominantColor(
|
|||
): string {
|
||||
const {
|
||||
minPercentage = 2, // Ignore colors below this percentage
|
||||
preferVibrant = true,
|
||||
excludeGreys = false,
|
||||
preferBrighter = true // Avoid very dark colors
|
||||
} = options
|
||||
|
|
|
|||
Loading…
Reference in a new issue