mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-24 04:28:03 +01:00
add Region settings :3
This commit is contained in:
parent
87bdb45f0e
commit
c7a2c08bbb
1 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ class PokeTubeCore {
|
|||
* @param {string} v - Video ID.
|
||||
* @returns {Promise<object>} Promise resolving to the video information.
|
||||
*/
|
||||
async video(v) {
|
||||
async video(v, contentlang, contentregion) {
|
||||
|
||||
const { fetch } = await import("undici");
|
||||
|
||||
|
@ -79,8 +79,8 @@ class PokeTubeCore {
|
|||
|
||||
try {
|
||||
const [invComments, videoInfo, videoData] = await Promise.all([
|
||||
fetch(`${this.config.invapi}/comments/${v}?${this.language}`).then((res) => res.text()),
|
||||
fetch(`${this.config.invapi}/videos/${v}`).then((res) => res.text()),
|
||||
fetch(`${this.config.invapi}/comments/${v}?hl=${contentlang}®ion=${contentregion}`).then((res) => res.text()),
|
||||
fetch(`${this.config.invapi}/videos/${v}?hl=${contentlang}®ion=${contentregion}`).then((res) => res.text()),
|
||||
curly
|
||||
.get(`${this.config.tubeApi}video?v=${v}`, {
|
||||
httpHeader: Object.entries(headers).map(([k, v]) => `${k}: ${v}`),
|
||||
|
|
Loading…
Reference in a new issue