wudysoft commited on
Commit
5bea728
·
verified ·
1 Parent(s): 38934ab

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +1 -1
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