Compare commits

...

69 Commits

Author SHA1 Message Date
Nemo 4d1bea0d0f run local prettier instead of global one 2023-12-14 15:40:23 +05:30
Nemo a94395ea9d drop node 16 2023-12-14 15:15:41 +05:30
Nemo 8019310674 fix prettier warnings 2023-12-14 15:15:31 +05:30
Nemo 1a2d485d10 dependency updates 2023-12-14 11:34:36 +05:30
dependabot[bot] 7cce1333f1 Bump prettier from 3.0.0 to 3.0.1
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-05 09:30:21 +05:30
Nemo 1b9a02fa20 prettier fixes 2023-07-31 15:02:08 +05:30
dependabot[bot] cbc90f7110 Bump prettier from 2.8.8 to 3.0.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 15:02:08 +05:30
dependabot[bot] b785434c45 Bump ytdl-core from 4.11.4 to 4.11.5
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.4 to 4.11.5.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.4...v4.11.5)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-15 09:35:06 +05:30
dependabot[bot] 7c43700c11 Bump cacheable-request and got
Bumps [cacheable-request](https://github.com/jaredwray/cacheable-request) and [got](https://github.com/sindresorhus/got). These dependencies needed to be updated together.

Updates `cacheable-request` from 7.0.2 to 10.2.7
- [Release notes](https://github.com/jaredwray/cacheable-request/releases)
- [Commits](https://github.com/jaredwray/cacheable-request/commits)

Updates `got` from 12.3.1 to 12.5.3
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v12.3.1...v12.5.3)

---
updated-dependencies:
- dependency-name: cacheable-request
  dependency-type: indirect
- dependency-name: got
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 13:31:07 +05:30
dependabot[bot] 33741a50e7 Bump prettier from 2.8.7 to 2.8.8
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.7 to 2.8.8.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.7...2.8.8)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 13:30:42 +05:30
dependabot[bot] 3bd269e517 Bump semver from 7.3.7 to 7.5.3
Bumps [semver](https://github.com/npm/node-semver) from 7.3.7 to 7.5.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.7...v7.5.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 13:30:29 +05:30
dependabot[bot] 2a67cc7c0b Bump ytdl-core from 4.11.3 to 4.11.4
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.3 to 4.11.4.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.3...v4.11.4)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 11:17:29 +05:30
dependabot[bot] 51a50b8a11 Bump minimist from 1.2.7 to 1.2.8
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.7 to 1.2.8.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:02:24 +05:30
dependabot[bot] 7c97cc9bc3 Bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:02:17 +05:30
dependabot[bot] ce3c11a820 Bump prettier from 2.8.2 to 2.8.7
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.2 to 2.8.7.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.2...2.8.7)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:02:11 +05:30
dependabot[bot] d376b3ad3d Bump ytdl-core from 4.11.2 to 4.11.3
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.2 to 4.11.3.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.2...v4.11.3)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 01:01:46 +05:30
dependabot[bot] 6af3c1da60 Bump prettier from 2.8.1 to 2.8.2
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.1...2.8.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 06:34:07 +00:00
dependabot[bot] 68bf09689a Bump prettier from 2.8.0 to 2.8.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.0...2.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 11:41:46 +05:30
dependabot[bot] 84c23243d3 Bump mocha from 10.1.0 to 10.2.0
Bumps [mocha](https://github.com/mochajs/mocha) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.1.0...v10.2.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 11:39:33 +05:30
dependabot[bot] 1e9bace48d Bump prettier from 2.7.1 to 2.8.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.7.1 to 2.8.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.7.1...2.8.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-24 11:02:23 +05:30
dependabot[bot] 00af711bf6 Bump minimist from 1.2.6 to 1.2.7
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 17:37:05 +05:30
dependabot[bot] 278aebf32f Bump mocha from 10.0.0 to 10.1.0
Bumps [mocha](https://github.com/mochajs/mocha) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.0.0...v10.1.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-18 15:02:27 +05:30
dependabot[bot] 1743561886 Bump ytdl-core from 4.11.1 to 4.11.2
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.11.1 to 4.11.2.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.11.1...v4.11.2)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-07 15:08:21 +05:30
Nemo f4f0e4db76 1.0.10 2022-08-26 18:36:36 +05:30
Nemo 8a570f74ad Prettier fixes 2022-08-26 18:36:33 +05:30
Nemo 5ba24e95db Fixes #75
Drops any tracks that start after the track length (as per YouTube).
We can add a flag for making this optional in case it is needed
2022-08-26 18:33:06 +05:30
Nemo 91242ce61f [ci] Dropped support for Node v16 2022-08-26 17:58:15 +05:30
Nemo 34acfe769e [style] Fix lint issues 2022-08-26 17:55:45 +05:30
Nemo 0012c3b083 [fix] Fixes #74
Leading zeroes are nice
2022-08-26 17:51:19 +05:30
Nemo 93321c6fb9 [docs] Update CHANGELOG 2022-08-26 17:22:07 +05:30
Nemo 25e0081c6d 1.0.9 2022-08-26 17:22:07 +05:30
Nemo 9245d84332 [dep] dependency updates 2022-08-26 17:22:05 +05:30
Nemo bb11d6e9a8
Create FUNDING.yml 2022-05-27 07:18:57 +00:00
Nemo ce4074f829 [ci] Use supported Node versions 2022-05-03 13:02:33 +05:30
dependabot[bot] 25ff38e93e Bump mocha from 9.2.2 to 10.0.0
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.2 to 10.0.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.2...v10.0.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 13:02:33 +05:30
dependabot[bot] 343fbda261 Bump prettier from 2.6.1 to 2.6.2
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.1...2.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 12:15:15 +05:30
dependabot[bot] f53aed7dec Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 12:14:45 +05:30
dependabot[bot] 531ad3de3f Bump prettier from 2.6.0 to 2.6.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.0...2.6.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-26 09:43:40 +05:30
dependabot[bot] c185212b14 Bump prettier from 2.5.1 to 2.6.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.5.1...2.6.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 11:09:14 +05:30
dependabot[bot] 869487e153 Bump mocha from 9.2.1 to 9.2.2
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.1 to 9.2.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.1...v9.2.2)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-12 10:52:58 +05:30
Nemo 98f17e55d3 [docs] CHANGELOG update 2022-03-11 11:27:52 +05:30
Nemo f281a42a2e 1.0.8 2022-03-11 11:26:30 +05:30
Nemo 242e08bc1b [deps] Update 2022-03-11 11:26:27 +05:30
dependabot[bot] e83debe2bf Bump ytdl-core from 4.10.1 to 4.11.0
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.10.1 to 4.11.0.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.10.1...v4.11.0)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-08 12:15:11 +05:30
dependabot[bot] 9925d6e578 Bump ytdl-core from 4.10.0 to 4.10.1
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.10.0 to 4.10.1.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.10.0...v4.10.1)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 17:10:09 +05:30
Nemo 0986305a50 1.0.7 2022-01-24 16:31:29 +05:30
Nemo a08e1cd3b3 deps update 2022-01-24 16:31:26 +05:30
dependabot[bot] 4744bb604f Bump mocha from 9.1.3 to 9.1.4
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.3 to 9.1.4.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.3...v9.1.4)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-15 18:23:25 +05:30
dependabot[bot] 42a3dfb872 Bump ytdl-core from 4.9.2 to 4.10.0
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.9.2 to 4.10.0.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.9.2...v4.10.0)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 06:33:04 +05:30
Nemo 8c3a3a7ec6 [dep] Dependency updates 2021-12-16 12:11:27 +05:30
dependabot[bot] 3acd787d0d Bump prettier from 2.5.0 to 2.5.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.5.0...2.5.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-09 11:02:23 +05:30
dependabot[bot] 4f136dcf42 Bump prettier from 2.4.1 to 2.5.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.4.1...2.5.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-26 09:47:10 +00:00
dependabot[bot] 5b65a76e6c Bump mocha from 9.1.2 to 9.1.3
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.2 to 9.1.3.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.2...v9.1.3)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-16 10:59:01 +05:30
dependabot[bot] f6acc1bdd8 Bump mocha from 9.1.1 to 9.1.2
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.1 to 9.1.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.1...v9.1.2)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-28 12:22:16 +05:30
dependabot[bot] 1cb210d64c Bump prettier from 2.4.0 to 2.4.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.4.0...2.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-17 12:31:33 +05:30
dependabot[bot] 666e802cfe Bump prettier from 2.3.2 to 2.4.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.4.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-10 09:58:23 +05:30
dependabot[bot] 5046823854 Bump mocha from 9.1.0 to 9.1.1
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.0...v9.1.1)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 11:29:51 +05:30
dependabot[bot] 741d74ddf1 Bump mocha from 9.0.3 to 9.1.0
Bumps [mocha](https://github.com/mochajs/mocha) from 9.0.3 to 9.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.0.3...v9.1.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-21 12:28:28 +05:30
dependabot[bot] 67012ca4ac Bump ytdl-core from 4.9.0 to 4.9.1
Bumps [ytdl-core](https://github.com/fent/node-ytdl-core) from 4.9.0 to 4.9.1.
- [Release notes](https://github.com/fent/node-ytdl-core/releases)
- [Commits](https://github.com/fent/node-ytdl-core/compare/v4.9.0...v4.9.1)

---
updated-dependencies:
- dependency-name: ytdl-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 16:18:11 +05:30
Nemo 8724ba85aa
Merge pull request #77 from captn3m0/update-notice
Add package-upgrade notice and --version
2021-07-29 11:48:49 +05:30
Nemo 68e53896b9 [docs] Update CHANGELOG 2021-07-29 11:47:46 +05:30
Nemo 30effce43b Add package-upgrade notice and --version 2021-07-29 11:44:23 +05:30
Nemo 2eadb53b8f
Add prettier as linter 2021-07-29 11:28:30 +05:30
Nemo 44e68fc140 [ci] Add prettier to CI 2021-07-29 11:25:55 +05:30
Nemo 9cc3cd4228 [style] Run everything through prettier 2021-07-29 11:21:39 +05:30
Nemo bcae4ebeb1 [dep] Add Prettier 2021-07-29 11:21:29 +05:30
Nemo e0f05fe646 Version Bump (1.0.6) 2021-07-29 11:12:37 +05:30
Nemo 610c13fcef
Parse Duration 2021-07-29 11:11:58 +05:30
dependabot[bot] a710658b49 Bump mocha from 9.0.2 to 9.0.3
Bumps [mocha](https://github.com/mochajs/mocha) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.0.2...v9.0.3)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 11:22:38 +05:30
12 changed files with 1257 additions and 1150 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
github: captn3m0
ko_fi: captn3m0
liberapay: captn3m0

View File

@ -4,13 +4,14 @@ jobs:
tests:
strategy:
matrix:
node: ['16', '14', '12']
node: ["18", "20", "21"]
name: Run NPM Stuff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- run: npm install
- run: npm test
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- run: npm install
- run: npm run lint
- run: npm run test

View File

@ -1,32 +1,63 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
## 1.0.9
### Changed
- Dependency Updates
- Minimum NodeJS version is now v14
## 1.0.8
### Added
- Dependency Updates
## 1.0.7
### Added
- `--version` is now supported
- An update notification is shown if the package isn't latest.
## 1.0.6 - 2021-07-29
### Added
- Tracklists using duration instead of timestamps are now supported.
## 1.0.5 - 2021-07-21
### Changed
- Dependency Updates
## 1.0.4 - 2021-06-28
### Added
- Support for timestamps in square brackets (#64)
- Improved formatting for helptext
### Changed
- output filename has a default value, and is now optional
## 1.0.3 - 2021-06-28
### Changed
- Dependency Updates
## 1.0.2 - 2021-06-10
### Changed
- Switches from `mocha` to `minimist` to parse arguments. Now down to 9 total (recursive) dependencies.
## 1.01 - 2021-06-10
### Changed
- Dependency Updates

View File

@ -52,14 +52,12 @@ You need to pass 2 parameters, a Youtube URL and a output CUE filename. YouTube
very specific edge cases, they should not be required for most files.
Examples
$ youtube-cue --audio-file audio.m4a "https://www.youtube.com/watch?v=THzUassmQwE"
"T A Y L O R S W I F T Folklore [Full album].cue" saved
$ youtube-cue "https://youtu.be/THzUassmQwE" folklore.cue
folklore.cue saved
$ youtube-cue --audio-file audio.m4a "https://www.youtube.com/watch?v=WzpmVxvoBoc" "The Groovy Nobody - Solarium.cue"
"The Groovy Nobody - Solarium.cue" saved
## Personal Usage
I have this in my `.bashrc` to download, split, tag, and import albums:
I have this in my `.bashrc` to download, split, tag, and import albums using beet:
```shell
function ytdl.album() {

View File

@ -1,16 +1,22 @@
#!/usr/bin/env node
import ytdl from 'ytdl-core';
import getArtistTitle from 'get-artist-title'
import {parse} from './src/parser.js'
import {generate} from './src/cue.js'
import minimist from 'minimist'
import exit from 'process'
import ytdl from "ytdl-core";
import getArtistTitle from "get-artist-title";
import { parse } from "./src/parser.js";
import { generate } from "./src/cue.js";
import minimist from "minimist";
import exit from "process";
import updateNotifier from "update-notifier";
import pkg from "./src/package.js";
updateNotifier({ pkg }).notify();
let argv = minimist(process.argv.slice(2), {
string: 'audio-file'
string: "audio-file",
});
if (argv._.length <1 || argv.help ){
if (argv.version) {
console.log(pkg.version);
} else if (argv._.length < 1 || argv.help) {
console.log(`Usage
$ youtube-cue [--audio-file audio.m4a] <youtube_url> [output_file]
@ -32,36 +38,45 @@ if (argv._.length <1 || argv.help ){
The above 2 are only needed to force behaviour in very specific edge cases, they should
not be required for most files.
--version Print version
Examples
$ youtube-cue --audio-file audio.m4a "https://www.youtube.com/watch?v=THzUassmQwE"
"T A Y L O R S W I F T Folklore [Full album].cue" saved
$ youtube-cue "https://youtu.be/THzUassmQwE" folklore.cue
folklore.cue saved`)
folklore.cue saved`);
} else {
let url = argv._[0]
let url = argv._[0];
ytdl.getInfo(url).then(info=>{
let audioFile = argv['audio-file']? argv['audio-file'] : `${info.videoDetails.title}.m4a`
ytdl.getInfo(url).then((info) => {
let audioFile = argv["audio-file"]
? argv["audio-file"]
: `${info.videoDetails.title}.m4a`;
let output_file = argv._[1]? argv._[1] : `${info.videoDetails.title}.cue`
let output_file = argv._[1] ? argv._[1] : `${info.videoDetails.title}.cue`;
let forceTimestamps = argv['timestamps']? argv['timestamps'] : false;
let forceTimestamps = argv["timestamps"] ? argv["timestamps"] : false;
let forceDurations = argv['durations']? argv['durations'] : false;
let forceDurations = argv["durations"] ? argv["durations"] : false;
if (forceTimestamps && forceDurations) {
console.error("You can't pass both --timestamps and durations");
exit(1)
exit(1);
}
let res = getArtistTitle(info.videoDetails.title,{
let res = getArtistTitle(info.videoDetails.title, {
defaultArtist: "Unknown Artist",
defaultTitle: info.videoDetails.title
defaultTitle: info.videoDetails.title,
});
let [artist, album] = res
artist = (info.videoDetails.media ? info.videoDetails.media.artist : artist)
let tracks = parse(info.videoDetails.description, {artist, forceTimestamps, forceDurations})
generate({tracks, artist, audioFile, album}, output_file)
console.log(`"${output_file}" saved`)
})
let [artist, album] = res;
artist = info.videoDetails.media ? info.videoDetails.media.artist : artist;
let tracks = parse(info.videoDetails.description, {
artist,
forceTimestamps,
forceDurations,
length: Number(info.videoDetails.lengthSeconds),
});
generate({ tracks, artist, audioFile, album }, output_file);
console.log(`"${output_file}" saved`);
});
}

2127
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,25 @@
{
"name": "youtube-cue",
"version": "1.0.6-beta.0",
"version": "1.0.10",
"description": "Generates Cue sheet from Youtube URL",
"main": "index.js",
"scripts": {
"test": "mocha"
"test": "mocha",
"lint": "prettier --check *.js src/*.js test/*.js"
},
"bin": "index.js",
"author": "Nemo <npm@captnemo.in>",
"license": "MIT",
"devDependencies": {
"mocha": "^9.0.0"
"mocha": "^10.0.0",
"prettier": "^3.1.0"
},
"dependencies": {
"console-log-level": "^1.4.1",
"get-artist-title": "^1.3.1",
"minimist": "^1.2.5",
"ytdl-core": "^4.8.2"
"minimist": "^1.2.8",
"update-notifier": "^7.0.0",
"ytdl-core": "^4.11.5"
},
"repository": {
"type": "git",

View File

@ -1,21 +1,27 @@
import fs from 'fs';
import fs from "fs";
/** code to create a new CUE file, as per the standard
* with a REM PERFORMER, TITLE, FILE attribute
* and a list of tracks provided as input
*/
// https://en.wikipedia.org/wiki/Cue_sheet_(computing)
export function generate(data, outputFile) {
try {
fs.truncateSync(outputFile)
fs.truncateSync(outputFile);
} catch {}
fs.appendFileSync(outputFile, `REM Generated using youtube-cue\n`);
fs.appendFileSync(outputFile, `PERFORMER "${data.artist}"\n`);
fs.appendFileSync(outputFile, `TITLE "${data.album}"\n`);
fs.appendFileSync(outputFile, `FILE "${data.audioFile}" M4A\n`);
for(var i in data.tracks) {
for (var i in data.tracks) {
let song = data.tracks[i];
let minutes = (song.start.hh * 60) + (song.start.mm)
let minutes = String(song.start.hh * 60 + song.start.mm).padStart(2, "0");
let seconds = String(song.start.ss).padStart(2, "0");
fs.appendFileSync(outputFile, ` TRACK ${song.track} AUDIO\n`);
fs.appendFileSync(outputFile, ` TITLE "${song.title}"\n`);
fs.appendFileSync(outputFile, ` PERFORMER "${song.artist}"\n`);
// Cue File is always MINUTES:SECONDS:FRAME, where FRAME is 00
fs.appendFileSync(outputFile, ` INDEX 01 ${minutes}:${song.start.ss}:00\n`);
fs.appendFileSync(outputFile, ` INDEX 01 ${minutes}:${seconds}:00\n`);
}
}

5
src/package.js Normal file
View File

@ -0,0 +1,5 @@
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const data = require("../package.json");
export default data;

View File

@ -20,7 +20,8 @@
*
* It is suggested to check their lengths and pick one to parse as the Track Title
*/
const TS_REGEX = /^((?<trackl>\d{1,3})\.)? *(?<text_1>.*?) *[\(\[]?(?<start_ts>((?<start_hh>\d{1,2}):)?(?<start_mm>\d{1,2}):(?<start_ss>\d{1,2})) *-? *[\)\]]?(?<end_ts>(?<end_hh>\d{1,2}:)?(?<end_mm>\d{1,2}):(?<end_ss>\d{1,2}))? *((?<trackr>\d{1,3})\.)? *(?<text_2>.*?)$/;
const TS_REGEX =
/^((?<trackl>\d{1,3})\.)? *(?<text_1>.*?) *[\(\[]?(?<start_ts>((?<start_hh>\d{1,2}):)?(?<start_mm>\d{1,2}):(?<start_ss>\d{1,2})) *-? *[\)\]]?(?<end_ts>(?<end_hh>\d{1,2}:)?(?<end_mm>\d{1,2}):(?<end_ss>\d{1,2}))? *((?<trackr>\d{1,3})\.)? *(?<text_2>.*?)$/;
import getArtistTitle from "get-artist-title";
var _options = {};
@ -30,18 +31,18 @@ function convertTime(h, m, s) {
}
// Only picks out lines which have a timestamp in them
var filterTimestamp = function(line) {
var filterTimestamp = function (line) {
return TS_REGEX.test(line);
};
// Parse each line as per the regex
var firstPass = function(line) {
var firstPass = function (line) {
let matches = line.match(TS_REGEX);
let track = matches.groups["trackl"]
? +matches.groups["trackl"]
: matches.groups["trackr"]
? +matches.groups["trackr"]
: null;
? +matches.groups["trackr"]
: null;
return {
track: track,
start: {
@ -71,7 +72,7 @@ var firstPass = function(line) {
};
// Add a calc attribute with total seconds
var calcTimestamp = function(obj) {
var calcTimestamp = function (obj) {
if (obj.end) {
obj.end.calc = convertTime(obj.end.hh, obj.end.mm, obj.end.ss);
}
@ -80,7 +81,7 @@ var calcTimestamp = function(obj) {
};
// Pick the longer "text" from left or right side.
var parseTitle = function(obj) {
var parseTitle = function (obj) {
obj.title =
obj._.left_text.length > obj._.right_text.length
? obj._.left_text
@ -89,7 +90,7 @@ var parseTitle = function(obj) {
};
// Parse the text as the title/artist
var parseArtist = function(obj) {
var parseArtist = function (obj) {
let [artist, title] = getArtistTitle(obj.title, {
defaultArtist: _options.artist,
defaultTitle: obj.title,
@ -100,7 +101,7 @@ var parseArtist = function(obj) {
};
// If track numbers are not present, add them accordingly
var addTrack = function(obj, index) {
var addTrack = function (obj, index) {
if (obj.track == null) {
obj.track = index + 1;
}
@ -108,7 +109,7 @@ var addTrack = function(obj, index) {
};
// Add "end" timestamps as next start timestamps
var addEnd = function(obj, index, arr) {
var addEnd = function (obj, index, arr) {
if (!obj.end) {
if (arr.length != index + 1) {
let next = arr[index + 1];
@ -119,7 +120,7 @@ var addEnd = function(obj, index, arr) {
return obj;
};
var timeToObject = function(obj) {
var timeToObject = function (obj) {
let d = new Date(obj.calc * 1000).toISOString();
obj.hh = +d.substr(11, 2);
obj.mm = +d.substr(14, 2);
@ -131,7 +132,7 @@ var timeToObject = function(obj) {
// Instead of timestamps, some tracklists use durations
// If durations are provided, use them to re-calculate
// the starting and ending timestamps
var fixDurations = function(list) {
var fixDurations = function (list) {
for (let i in list) {
if (i == 0) {
// Set the first one to start of track.
@ -152,9 +153,19 @@ var fixDurations = function(list) {
}
};
var dropInvalid = function (e) {
// All tracks should start before the closing time
if (_options.length) return e.start.calc < _options.length;
return true;
};
export function parse(
text,
options = { artist: "Unknown", forceTimestamps: false, forceDurations: false }
options = {
artist: "Unknown",
forceTimestamps: false,
forceDurations: false,
},
) {
_options = options;
let durations = false;
@ -167,7 +178,7 @@ export function parse(
if (!options.forceTimestamps) {
// If our timestamps are not in increasing order
// Assume that we've been given a duration list instead
if (result[0].start.calc!=0) {
if (result[0].start.calc != 0) {
result.forEach((current, index, list) => {
if (index > 0) {
let previous = list[index - 1];
@ -187,5 +198,6 @@ export function parse(
.map(parseTitle)
.map(parseArtist)
.map(addTrack)
.map(addEnd);
.map(addEnd)
.filter(dropInvalid);
}

48
test/cue_test.js Normal file
View File

@ -0,0 +1,48 @@
/*jshint esversion: 6 */
import { strict as assert } from "assert";
import { generate } from "../src/cue.js";
import fs from "fs";
const DATA = {
artist: "Dumbledore",
album: "Curse of the Elder Wand",
audioFile: "audio.m4a",
tracks: [
{
artist: "Unknown",
title: "the 1",
track: 1,
start: { ts: "00:00:00", hh: 0, mm: 0, ss: 0, calc: 0 },
end: { ts: "00:3:9", hh: 0, mm: 3, ss: 9, calc: 189 },
_: { left_text: "", right_text: "the 1" },
},
{
artist: "Unknown",
title: "cardigan",
track: 2,
start: { ts: "00:3:09", hh: 0, mm: 3, ss: 9, calc: 189 },
end: { ts: "00:9:30", hh: 0, mm: 9, ss: 30, calc: 570 },
_: { left_text: "", right_text: "cardigan" },
},
],
};
describe("CUE", function () {
it("should generate with leading zeroes", function () {
generate(DATA, "/tmp/test.cue");
const CUE_EXPECTED = `REM Generated using youtube-cue
PERFORMER "Dumbledore"
TITLE "Curse of the Elder Wand"
FILE "audio.m4a" M4A
TRACK 1 AUDIO
TITLE "the 1"
PERFORMER "Unknown"
INDEX 01 00:00:00
TRACK 2 AUDIO
TITLE "cardigan"
PERFORMER "Unknown"
INDEX 01 03:09:00
`;
assert.equal(CUE_EXPECTED, fs.readFileSync("/tmp/test.cue", "utf-8"));
});
});

View File

@ -24,21 +24,21 @@ Hello World 48:20
const TEXT_WITH_ARTIST = "12:23 Rolling Stones - Hello World";
describe("Parser", function() {
describe("Parser", function () {
var big_result;
before(function() {
before(function () {
big_result = parse(TEXT);
});
it("should find all timestamps", function() {
it("should find all timestamps", function () {
assert.equal(big_result.length, 15);
});
it("should find artist names", function() {
it("should find artist names", function () {
let result = parse(TEXT_WITH_ARTIST);
assert.equal(result[0].artist, "Rolling Stones");
});
it("should find track numbers", function() {
it("should find track numbers", function () {
assert.equal(big_result[3].track, 1);
assert.equal(big_result[4].track, 2);
assert.equal(big_result[5].track, 3);
@ -51,7 +51,7 @@ describe("Parser", function() {
assert.equal(big_result[12].track, 10);
});
it("should ensure ending timestamps for all", function() {
it("should ensure ending timestamps for all", function () {
assert.deepEqual(big_result[13].end, {
calc: 3023,
hh: 0,
@ -63,8 +63,9 @@ describe("Parser", function() {
assert.deepEqual(big_result[14].end, null);
});
it("should parse timestamps with square brackets", function() {
let result = parse(`[00:00:00] 1. Steve Kroeger x Skye Holland - Through The Dark
it("should parse timestamps with square brackets", function () {
let result =
parse(`[00:00:00] 1. Steve Kroeger x Skye Holland - Through The Dark
[00:02:53] 2. Gabri Ponte x Jerome - Lonely `);
assert.deepEqual(result[0], {
artist: "Steve Kroeger x Skye Holland",
@ -79,7 +80,7 @@ describe("Parser", function() {
});
});
it("should parse durations when given", function() {
it("should parse durations when given", function () {
let result = parse(`1. Artist - Title 6:19
2. Another Artist - Another Title 6:59
3. Yet Another Artist - Yet another title 5:12`);
@ -113,7 +114,7 @@ describe("Parser", function() {
});
});
it("should parse as timestamps if first timestamp is 00:00", function() {
it("should parse as timestamps if first timestamp is 00:00", function () {
let result = parse(`1. Artist - Title 00:00
2. Another Artist - Another Title 01:00
3. Yet Another Artist - Yet another title 02:00`);
@ -140,15 +141,18 @@ describe("Parser", function() {
track: 3,
end: null,
start: { ts: "00:02:00", hh: 0, mm: 2, ss: 0, calc: 120 },
_: { left_text: "Yet Another Artist - Yet another title", right_text: "" },
_: {
left_text: "Yet Another Artist - Yet another title",
right_text: "",
},
});
});
it("should parse durations as timestamps when forced", function() {
it("should parse durations as timestamps when forced", function () {
let result = parse(
`1. Artist - Title 5:00
2. Another Artist - Another Title 4:20`,
{ forceTimestamps: true }
{ forceTimestamps: true },
);
assert.deepEqual(result[0].end, {
ts: "00:4:20",
@ -166,11 +170,11 @@ describe("Parser", function() {
});
});
it("should parse timestamps as durations when forced", function() {
it("should parse timestamps as durations when forced", function () {
let result = parse(
`1. Artist - Title 1:00
2. Another Artist - Another Title 1:15`,
{ forceDurations: true }
{ forceDurations: true },
);
assert.deepEqual(result[0], {
track: 1,
@ -214,7 +218,7 @@ describe("Parser", function() {
});
});
it("should parse taylor swift", function() {
it("should parse taylor swift", function () {
let result = parse(`0:00 the 1
3:29 cardigan
9:30 the last great american dynasty