mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-03 09:35:05 +00:00
Things were getting a bit complicated and slow with the old parser so I decided to continue #44's work on the main codebase.
This commit is contained in:
@@ -94,7 +94,7 @@ function generateSidAuth(sid) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random string with a given length.
|
||||
* Generates a random string with the given length.
|
||||
*
|
||||
* @param {number} length
|
||||
* @returns {string}
|
||||
@@ -118,6 +118,7 @@ function generateRandomString(length) {
|
||||
*/
|
||||
function timeToSeconds(time) {
|
||||
let params = time.split(':');
|
||||
|
||||
return parseInt(({
|
||||
3: +params[0] * 3600 + +params[1] * 60 + +params[2],
|
||||
2: +params[0] * 60 + +params[1],
|
||||
|
||||
Reference in New Issue
Block a user