fix evil edge case (and fix typo)
is it really my fault. they say it's required right here: https://developer.apple.com/documentation/applemusicapi/songs/attributes-data.dictionary
This commit is contained in:
parent
6670b57674
commit
a8571f28c6
3 changed files with 5 additions and 3 deletions
|
|
@ -53,7 +53,9 @@ export type SongAttributes<
|
||||||
composerName?: string;
|
composerName?: string;
|
||||||
contentRating?: string;
|
contentRating?: string;
|
||||||
discNumber?: number;
|
discNumber?: number;
|
||||||
durationInMillis: number;
|
// >claims to be required
|
||||||
|
// >not present sometimes ??
|
||||||
|
durationInMillis?: number;
|
||||||
editorialNotes?: EditorialNotes;
|
editorialNotes?: EditorialNotes;
|
||||||
genreNames: string[];
|
genreNames: string[];
|
||||||
hasLyrics: boolean;
|
hasLyrics: boolean;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ setGlobalDispatcher(new Agent().compose([
|
||||||
// TODO: configurable cache sizes?
|
// TODO: configurable cache sizes?
|
||||||
// these values are pretty nice for non-binary (lol) data
|
// these values are pretty nice for non-binary (lol) data
|
||||||
interceptors.cache({ store: new cacheStores.MemoryCacheStore({
|
interceptors.cache({ store: new cacheStores.MemoryCacheStore({
|
||||||
maxSize: 50 * 1024 * 1024, // 5mb
|
maxSize: 50 * 1024 * 1024, // 50mb
|
||||||
maxCount: 1000,
|
maxCount: 1000,
|
||||||
maxEntrySize: 5 * 1024 // 5kb
|
maxEntrySize: 5 * 1024 // 5kb
|
||||||
})})
|
})})
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const hbs = create({
|
||||||
helpers: {
|
helpers: {
|
||||||
add(a: number, b: number) { return a + b; },
|
add(a: number, b: number) { return a + b; },
|
||||||
arrayJoin(array: string[], separator: string) { return array.join(separator); },
|
arrayJoin(array: string[], separator: string) { return array.join(separator); },
|
||||||
formatDuration(duration: number) { return formatDuration(duration); },
|
formatDuration(duration?: number) { return duration === undefined ? "n/a" : formatDuration(duration); },
|
||||||
greaterThan(a: number, b: number) { return a > b; },
|
greaterThan(a: number, b: number) { return a > b; },
|
||||||
mapNumberToLetter(num: number) { return String.fromCharCode(num + 64); } // A = 1, B = 2
|
mapNumberToLetter(num: number) { return String.fromCharCode(num + 64); } // A = 1, B = 2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue