A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add support for non-standard x-flac mimetype

+9 -8
+9 -8
src/Javascript/common.js
··· 21 21 22 22 export const debounce = 23 23 (callback, time = 250, timeoutId) => 24 - (...args) => 25 - clearTimeout(timeoutId, timeoutId = setTimeout(callback, time, ...args)) 24 + (...args) => 25 + clearTimeout(timeoutId, timeoutId = setTimeout(callback, time, ...args)) 26 26 27 27 28 28 export const throttle = 29 29 (callback, time = 250, wasCalledBefore, lastestArgs) => 30 - (...args) => { 31 - lastestArgs = args 32 - if (wasCalledBefore) { return } else { wasCalledBefore = true } 33 - setTimeout(() => { callback(...lastestArgs); wasCalledBefore = false }, time) 34 - } 30 + (...args) => { 31 + lastestArgs = args 32 + if (wasCalledBefore) { return } else { wasCalledBefore = true } 33 + setTimeout(() => { callback(...lastestArgs); wasCalledBefore = false }, time) 34 + } 35 35 36 36 37 37 export function identity(a) { ··· 40 40 41 41 42 42 export function fileExtension(mimeType) { 43 - const audioId = mimeType.toLowerCase().split("/")[1] 43 + const audioId = mimeType.toLowerCase().split("/")[ 1 ] 44 44 45 45 switch (audioId) { 46 46 case "mp3": return "mp3"; ··· 51 51 case "x-m4a": return "m4a"; 52 52 53 53 case "flac": return "flac"; 54 + case "x-flac": return "flac"; 54 55 case "ogg": return "ogg"; 55 56 56 57 case "wav": return "wav";