Skip to content

Commit

Permalink
Prevent duplicated usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphka committed Apr 13, 2024
1 parent c9ce6be commit 1a3e16e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Kayo Souza",
"name": "insta-downloader",
"version": "3.1.0",
"version": "3.1.1",
"description": "An application to download content from Instagram",
"main": "src/index.js",
"scripts": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"@types/mime": "~3.0.4",
"@types/node": "20.x",
"@types/sharp": "~0.31.1",
"typescript": "^5.4.4"
"typescript": "^5.4.5"
},
"repository": {
"type": "git",
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class Downloader {
* @param {number} [limit]
*/
constructor(usernames, queue, limit){
this.usernames = Array.isArray(usernames) ? usernames : [usernames]
this.usernames = Array.isArray(usernames) ? Array.from(new Set(usernames)) : [usernames]
this.limit = limit
this.queue = new Queue(queue)
}
Expand Down

0 comments on commit 1a3e16e

Please sign in to comment.