mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-02 13:07:28 +00:00
refactor: Import version, bugs URL and repo URL directly from package.json (#1004)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import type { StoryboardData } from '../parser/classes/PlayerStoryboardSpec.js';
|
||||
import PlayerStoryboardSpec from '../parser/classes/PlayerStoryboardSpec.js';
|
||||
import { getStringBetweenStrings, InnertubeError, Platform } from './Utils.js';
|
||||
import { getStringBetweenStrings, InnertubeError } from './Utils.js';
|
||||
import * as Constants from './Constants.js';
|
||||
import * as Log from './Log.js';
|
||||
import packageInfo from '../../package.json' with { type: 'json' };
|
||||
|
||||
import type Actions from '../core/Actions.js';
|
||||
import type Player from '../core/Player.js';
|
||||
@@ -543,7 +544,7 @@ function getColorInfo(format: Format) {
|
||||
anonymisedFormat.cipher = 'REDACTED';
|
||||
|
||||
Log.warn(TAG_, `Unknown matrix coefficients "${color_info.matrix_coefficients}". The DASH manifest is still usable without this.\n`
|
||||
+ `Please report it at ${Platform.shim.info.bugs_url} so we can add support for it.\n`
|
||||
+ `Please report it at ${packageInfo.bugs.url} so we can add support for it.\n`
|
||||
+ `InnerTube client: ${url.searchParams.get('c')}\nformat:`, anonymisedFormat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Memo } from '../parser/helpers.js';
|
||||
import { Text } from '../parser/misc.js';
|
||||
import * as Log from './Log.js';
|
||||
import userAgents from './user-agents.js';
|
||||
import packageInfo from '../../package.json' with { type: 'json' };
|
||||
|
||||
const TAG_ = 'Utils';
|
||||
|
||||
@@ -40,7 +41,7 @@ export class InnertubeError extends Error {
|
||||
}
|
||||
|
||||
this.date = new Date();
|
||||
this.version = Platform.shim.info.version;
|
||||
this.version = packageInfo.version;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user