export fixes

This commit is contained in:
Evert Prants 2020-10-04 11:01:16 +03:00
parent 2abf4506b3
commit e143acf417
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
8 changed files with 15 additions and 17 deletions

View File

@ -171,7 +171,7 @@ async function setMetadata (file, meta, source, cleanup = false) {
return { file, dbq }
}
export default {
export {
getFiles,
promiseExec,
askAsync,

View File

@ -92,4 +92,4 @@ function fetchVideo (data) {
})
}
export default { parseTitle, getVideoInfo, fetchVideo }
export { parseTitle, getVideoInfo, fetchVideo }

View File

@ -1,8 +1,8 @@
import path from 'path'
import readline from 'readline'
import asn from './common/async'
import dl from './common/download'
import * as asn from './common/async'
import * as dl from './common/download'
import { dbPromise } from './database'
const values = require(path.join(process.cwd(), 'values.json'))

View File

@ -4,8 +4,8 @@ import readline from 'readline'
import path from 'path'
import sanitize from 'sanitize-filename'
import asn from './common/async'
import dl from './common/download'
import * as asn from './common/async'
import * as dl from './common/download'
import { dbPromise } from './database'
const values = require(path.join(process.cwd(), 'values.json'))

View File

@ -1,7 +1,7 @@
import path from 'path'
import sanitize from 'sanitize-filename'
import asn from './common/async'
import dl from './common/download'
import * as asn from './common/async'
import * as dl from './common/download'
import { dbPromise } from './database'
import { URL } from 'url'
@ -134,7 +134,7 @@ async function searchURL (url) {
return []
}
export default {
export {
downloadLocally,
invokeDownload,
addListExternal,

View File

@ -115,13 +115,11 @@ async function scrobbleTrack (userId, trackData) {
mbid: trackData.mbid,
timestamp: Math.floor(Date.now() / 1000)
})
// let res =
await rp.post('http://ws.audioscrobbler.com/2.0/', { form: scrobbleSig })
// let rep = await parseStringPromise(res)
return true
}
export default {
export {
search,
getAPISig,
getAuthURL,

View File

@ -98,4 +98,4 @@ async function moveTrack (userId, playlistId, trackId, position) {
return true
}
export default { getPlaylist, getPlaylists, createPlaylist, deletePlaylist, addTrack, removeTrack, moveTrack }
export { getPlaylist, getPlaylists, createPlaylist, deletePlaylist, addTrack, removeTrack, moveTrack }

View File

@ -9,11 +9,11 @@ import ffmpeg from 'fluent-ffmpeg'
import { user, userMiddleware } from './user'
import { dbPromise } from './database'
import asn from './common/async'
import * as asn from './common/async'
import playlist from './playlist'
import lastfm from './lastfm'
import external from './external.js'
import * as playlist from './playlist'
import * as lastfm from './lastfm'
import * as external from './external.js'
require('express-async-errors')