mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-28 15:40:56 +03:00
Fixed bug where playlistd could not be made
This commit is contained in:
@@ -1954,7 +1954,7 @@ app.get('/api/getMp3s', optionalJwt, async function(req, res) {
|
|||||||
// get user audio files/playlists
|
// get user audio files/playlists
|
||||||
auth_api.passport.authenticate('jwt')
|
auth_api.passport.authenticate('jwt')
|
||||||
mp3s = auth_api.getUserVideos(req.user.uid, 'audio');
|
mp3s = auth_api.getUserVideos(req.user.uid, 'audio');
|
||||||
playlists = auth_api.getUserPlaylists(req.user.uid, 'audio');
|
playlists = auth_api.getUserPlaylists(req.user.uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
mp3s = JSON.parse(JSON.stringify(mp3s));
|
mp3s = JSON.parse(JSON.stringify(mp3s));
|
||||||
@@ -1975,7 +1975,7 @@ app.get('/api/getMp4s', optionalJwt, async function(req, res) {
|
|||||||
// get user videos/playlists
|
// get user videos/playlists
|
||||||
auth_api.passport.authenticate('jwt')
|
auth_api.passport.authenticate('jwt')
|
||||||
mp4s = auth_api.getUserVideos(req.user.uid, 'video');
|
mp4s = auth_api.getUserVideos(req.user.uid, 'video');
|
||||||
playlists = auth_api.getUserPlaylists(req.user.uid, 'video');
|
playlists = auth_api.getUserPlaylists(req.user.uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
mp4s = JSON.parse(JSON.stringify(mp4s));
|
mp4s = JSON.parse(JSON.stringify(mp4s));
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ exports.adminExists = function() {
|
|||||||
|
|
||||||
exports.getUserVideos = function(user_uid, type) {
|
exports.getUserVideos = function(user_uid, type) {
|
||||||
const user = users_db.get('users').find({uid: user_uid}).value();
|
const user = users_db.get('users').find({uid: user_uid}).value();
|
||||||
return type ? user['files'].filter(file => file.isAudio = (type === 'audio')) : user['files'];
|
return type ? user['files'].filter(file => file.isAudio === (type === 'audio')) : user['files'];
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getUserVideo = function(user_uid, file_uid, requireSharing = false) {
|
exports.getUserVideo = function(user_uid, file_uid, requireSharing = false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user