mirror of
https://gitlab.com/RemixDev/deemix-js.git
synced 2025-02-16 10:20:06 +00:00
106 lines
2.7 KiB
JavaScript
106 lines
2.7 KiB
JavaScript
|
const { TrackFormats } = require('deezer-js')
|
||
|
|
||
|
// Should the lib overwrite files?
|
||
|
const OverwriteOption = {
|
||
|
OVERWRITE: 'y', // Yes, overwrite the file
|
||
|
DONT_OVERWRITE: 'n', // No, don't overwrite the file
|
||
|
DONT_CHECK_EXT: 'e', // No, and don't check for extensions
|
||
|
KEEP_BOTH: 'b', // No, and keep both files
|
||
|
ONLY_TAGS: 't' // Overwrite only the tags
|
||
|
}
|
||
|
|
||
|
// What should I do with featured artists?
|
||
|
const FeaturesOption = {
|
||
|
NO_CHANGE: "0", // Do nothing
|
||
|
REMOVE_TITLE: "1", // Remove from track title
|
||
|
REMOVE_TITLE_ALBUM: "3", // Remove from track title and album title
|
||
|
MOVE_TITLE: "2" // Move to track title
|
||
|
}
|
||
|
|
||
|
const DEFAULTS = {
|
||
|
downloadLocation: "",
|
||
|
tracknameTemplate: "%artist% - %title%",
|
||
|
albumTracknameTemplate: "%tracknumber% - %title%",
|
||
|
playlistTracknameTemplate: "%position% - %artist% - %title%",
|
||
|
createPlaylistFolder: true,
|
||
|
playlistNameTemplate: "%playlist%",
|
||
|
createArtistFolder: false,
|
||
|
artistNameTemplate: "%artist%",
|
||
|
createAlbumFolder: true,
|
||
|
albumNameTemplate: "%artist% - %album%",
|
||
|
createCDFolder: true,
|
||
|
createStructurePlaylist: false,
|
||
|
createSingleFolder: false,
|
||
|
padTracks: true,
|
||
|
paddingSize: "0",
|
||
|
illegalCharacterReplacer: "_",
|
||
|
queueConcurrency: 3,
|
||
|
maxBitrate: String(TrackFormats.MP3_320),
|
||
|
fallbackBitrate: true,
|
||
|
fallbackSearch: false,
|
||
|
logErrors: true,
|
||
|
logSearched: false,
|
||
|
saveDownloadQueue: false,
|
||
|
overwriteFile: OverwriteOption.DONT_OVERWRITE,
|
||
|
createM3U8File: false,
|
||
|
playlistFilenameTemplate: "playlist",
|
||
|
syncedLyrics: false,
|
||
|
embeddedArtworkSize: 800,
|
||
|
embeddedArtworkPNG: false,
|
||
|
localArtworkSize: 1400,
|
||
|
localArtworkFormat: "jpg",
|
||
|
saveArtwork: true,
|
||
|
coverImageTemplate: "cover",
|
||
|
saveArtworkArtist: false,
|
||
|
artistImageTemplate: "folder",
|
||
|
jpegImageQuality: 80,
|
||
|
dateFormat: "Y-M-D",
|
||
|
albumVariousArtists: true,
|
||
|
removeAlbumVersion: false,
|
||
|
removeDuplicateArtists: false,
|
||
|
tagsLanguage: "",
|
||
|
featuredToTitle: FeaturesOption.NO_CHANGE,
|
||
|
titleCasing: "nothing",
|
||
|
artistCasing: "nothing",
|
||
|
executeCommand: "",
|
||
|
tags: {
|
||
|
title: true,
|
||
|
artist: true,
|
||
|
album: true,
|
||
|
cover: true,
|
||
|
trackNumber: true,
|
||
|
trackTotal: false,
|
||
|
discNumber: true,
|
||
|
discTotal: false,
|
||
|
albumArtist: true,
|
||
|
genre: true,
|
||
|
year: true,
|
||
|
date: true,
|
||
|
explicit: false,
|
||
|
isrc: true,
|
||
|
length: true,
|
||
|
barcode: true,
|
||
|
bpm: true,
|
||
|
replayGain: false,
|
||
|
label: true,
|
||
|
lyrics: false,
|
||
|
syncedLyrics: false,
|
||
|
copyright: false,
|
||
|
composer: false,
|
||
|
involvedPeople: false,
|
||
|
source: false,
|
||
|
savePlaylistAsCompilation: false,
|
||
|
useNullSeparator: false,
|
||
|
saveID3v1: true,
|
||
|
multiArtistSeparator: "default",
|
||
|
singleAlbumArtist: false,
|
||
|
coverDescriptionUTF8: false
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
OverwriteOption,
|
||
|
FeaturesOption,
|
||
|
DEFAULTS
|
||
|
}
|