Update app.js
Browse files
app.js
CHANGED
|
@@ -233,7 +233,7 @@ app.get('/ytdl/search', async (req, res) => {
|
|
| 233 |
};
|
| 234 |
});
|
| 235 |
|
| 236 |
-
const sortedVideos = videosWithSimilarity.sort((a, b) => b.similarity - a.similarity);
|
| 237 |
|
| 238 |
const topVideos = sortedVideos.slice(0, parseInt(limit));
|
| 239 |
|
|
|
|
| 233 |
};
|
| 234 |
});
|
| 235 |
|
| 236 |
+
const sortedVideos = videosWithSimilarity.sort((a, b) => b.similarity - a.similarity).sort((a, b) => b.views - a.views);
|
| 237 |
|
| 238 |
const topVideos = sortedVideos.slice(0, parseInt(limit));
|
| 239 |
|