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 {
|
import type {
|
||||||
AppleMusicAlbum,
|
AppleMusicAlbum,
|
||||||
AppleMusicTrack,
|
AppleMusicTrack,
|
||||||
AppleMusicSearchResponse,
|
AppleMusicSearchResponse
|
||||||
AppleMusicErrorResponse
|
|
||||||
} from '$lib/types/apple-music'
|
} from '$lib/types/apple-music'
|
||||||
import { isAppleMusicError } from '$lib/types/apple-music'
|
import { isAppleMusicError } from '$lib/types/apple-music'
|
||||||
import { ApiRateLimiter } from './rate-limiter'
|
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'}`
|
`Apple Music API Error: ${errorData.errors[0]?.detail || 'Unknown error'}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (_e) {
|
||||||
// If not JSON, throw the text error
|
// If not JSON, throw the text error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export class CacheManager {
|
||||||
let totalDeleted = 0
|
let totalDeleted = 0
|
||||||
|
|
||||||
// Clear all cache types that might contain this album
|
// 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')) {
|
if (type.includes('album') || type.includes('notfound')) {
|
||||||
const deleted = await this.clearPattern(type, albumKey)
|
const deleted = await this.clearPattern(type, albumKey)
|
||||||
totalDeleted += deleted
|
totalDeleted += deleted
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { v2 as cloudinary } from 'cloudinary'
|
import { v2 as cloudinary } from 'cloudinary'
|
||||||
import type { UploadApiResponse, UploadApiErrorResponse } from 'cloudinary'
|
import type { UploadApiResponse } from 'cloudinary'
|
||||||
import { logger } from './logger'
|
import { logger } from './logger'
|
||||||
import { uploadFileLocally } from './local-storage'
|
import { uploadFileLocally } from './local-storage'
|
||||||
import { dev } from '$app/environment'
|
import { dev } from '$app/environment'
|
||||||
|
|
@ -130,7 +130,6 @@ export async function uploadFile(
|
||||||
|
|
||||||
// Extract filename without extension
|
// Extract filename without extension
|
||||||
const fileNameWithoutExt = file.name.replace(/\.[^/.]+$/, '')
|
const fileNameWithoutExt = file.name.replace(/\.[^/.]+$/, '')
|
||||||
const fileExtension = file.name.split('.').pop()?.toLowerCase()
|
|
||||||
|
|
||||||
// Prepare upload options
|
// Prepare upload options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ export function selectBestDominantColor(
|
||||||
): string {
|
): string {
|
||||||
const {
|
const {
|
||||||
minPercentage = 2, // Ignore colors below this percentage
|
minPercentage = 2, // Ignore colors below this percentage
|
||||||
preferVibrant = true,
|
|
||||||
excludeGreys = false,
|
excludeGreys = false,
|
||||||
preferBrighter = true // Avoid very dark colors
|
preferBrighter = true // Avoid very dark colors
|
||||||
} = options
|
} = options
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue