mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-02 06:31:28 +03:00
Fixed bugs that prevented subscription videos from being downloaded and non-users from accessing shared videos
This commit is contained in:
@@ -297,7 +297,7 @@ exports.getUserVideo = function(user_uid, file_uid, type, requireSharing = false
|
||||
if (!file && type) file = users_db.get('users').find({uid: user_uid}).get(`files.${type}`).find({uid: file_uid}).value();
|
||||
|
||||
// prevent unauthorized users from accessing the file info
|
||||
if (requireSharing && !file['sharingEnabled']) file = null;
|
||||
if (file && !file['sharingEnabled'] && requireSharing) file = null;
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user