wyzie-lib 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/main.amd.js +109 -0
- package/lib/main.cjs +107 -0
- package/lib/main.d.ts +18 -0
- package/lib/main.iife.js +110 -0
- package/lib/main.js +21 -2
- package/lib/main.umd.cjs +21 -2
- package/package.json +2 -2
package/lib/main.amd.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
define(["exports"], function(exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
const config = {
|
|
4
|
+
baseUrl: "https://sub.wyzie.ru"
|
|
5
|
+
};
|
|
6
|
+
function configure(options) {
|
|
7
|
+
if (options.baseUrl) {
|
|
8
|
+
config.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
async function constructUrl({
|
|
12
|
+
tmdb_id,
|
|
13
|
+
imdb_id,
|
|
14
|
+
season,
|
|
15
|
+
episode,
|
|
16
|
+
encoding,
|
|
17
|
+
language,
|
|
18
|
+
format,
|
|
19
|
+
source,
|
|
20
|
+
hi,
|
|
21
|
+
...extraParams
|
|
22
|
+
}) {
|
|
23
|
+
const url = new URL(`${config.baseUrl}/search`);
|
|
24
|
+
const queryParams = {
|
|
25
|
+
id: String(tmdb_id || imdb_id),
|
|
26
|
+
season,
|
|
27
|
+
episode,
|
|
28
|
+
encoding: Array.isArray(encoding) ? encoding.join(",") : encoding,
|
|
29
|
+
language: Array.isArray(language) ? language.join(",") : language,
|
|
30
|
+
format: Array.isArray(format) ? format.join(",") : format,
|
|
31
|
+
source: Array.isArray(source) ? source.join(",") : source,
|
|
32
|
+
hi
|
|
33
|
+
};
|
|
34
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
35
|
+
if (value !== void 0) {
|
|
36
|
+
url.searchParams.append(key, String(value));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.entries(extraParams).forEach(([key, value]) => {
|
|
40
|
+
if (value !== void 0) {
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
url.searchParams.append(key, value.join(","));
|
|
43
|
+
} else {
|
|
44
|
+
url.searchParams.append(key, String(value));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return url;
|
|
49
|
+
}
|
|
50
|
+
async function fetchSubtitles(url) {
|
|
51
|
+
const response = await fetch(url.toString());
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
54
|
+
}
|
|
55
|
+
return response.json();
|
|
56
|
+
}
|
|
57
|
+
async function searchSubtitles(params) {
|
|
58
|
+
try {
|
|
59
|
+
const url = await constructUrl(params);
|
|
60
|
+
return await fetchSubtitles(url);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
throw new Error(`Error fetching subtitles: ${error}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async function parseToVTT(subtitleUrl) {
|
|
66
|
+
try {
|
|
67
|
+
const response = await fetch(subtitleUrl);
|
|
68
|
+
if (!response.ok) {
|
|
69
|
+
throw new Error(`Failed to fetch subtitle content: ${response.status}`);
|
|
70
|
+
}
|
|
71
|
+
const content = await response.text();
|
|
72
|
+
const normalizedContent = content.replace(/\r\n|\r/g, "\n").trim();
|
|
73
|
+
const blocks = normalizedContent.split(/\n\n+/);
|
|
74
|
+
const timestampRegex = /^\d{1,2}:\d{2}:\d{2}[,.]\d{3}\s*-->\s*\d{1,2}:\d{2}:\d{2}[,.]\d{3}$/;
|
|
75
|
+
const hasValidSRTFormat = blocks.some((block) => {
|
|
76
|
+
const lines = block.split("\n").map((line) => line.trim());
|
|
77
|
+
return lines.some((line) => timestampRegex.test(line));
|
|
78
|
+
});
|
|
79
|
+
if (!hasValidSRTFormat) {
|
|
80
|
+
throw new Error("Invalid subtitle format: not SRT");
|
|
81
|
+
}
|
|
82
|
+
const vttLines = ["WEBVTT", ""];
|
|
83
|
+
for (const block of blocks) {
|
|
84
|
+
const lines = block.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
85
|
+
if (lines.length < 2)
|
|
86
|
+
continue;
|
|
87
|
+
const timestampIndex = lines.findIndex((line) => timestampRegex.test(line));
|
|
88
|
+
if (timestampIndex === -1)
|
|
89
|
+
continue;
|
|
90
|
+
const textLines = lines.slice(timestampIndex + 1).filter((line) => !/^\d+$/.test(line));
|
|
91
|
+
if (textLines.length === 0)
|
|
92
|
+
continue;
|
|
93
|
+
let timestampLine = lines[timestampIndex];
|
|
94
|
+
timestampLine = timestampLine.replace(/[,.](?=\s*-->)/, "").replace(/[,.]$/, "").replace(/,(\d{3})/g, ".$1");
|
|
95
|
+
vttLines.push(`${timestampLine}
|
|
96
|
+
${textLines.join("\n")}
|
|
97
|
+
`);
|
|
98
|
+
}
|
|
99
|
+
return vttLines.join("\n").replace(/\n{3,}/g, "\n\n").trim() + "\n\n";
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error("Error in parseToVTT:", error);
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.configure = configure;
|
|
106
|
+
exports.parseToVTT = parseToVTT;
|
|
107
|
+
exports.searchSubtitles = searchSubtitles;
|
|
108
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
109
|
+
});
|
package/lib/main.cjs
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const config = {
|
|
4
|
+
baseUrl: "https://sub.wyzie.ru"
|
|
5
|
+
};
|
|
6
|
+
function configure(options) {
|
|
7
|
+
if (options.baseUrl) {
|
|
8
|
+
config.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
async function constructUrl({
|
|
12
|
+
tmdb_id,
|
|
13
|
+
imdb_id,
|
|
14
|
+
season,
|
|
15
|
+
episode,
|
|
16
|
+
encoding,
|
|
17
|
+
language,
|
|
18
|
+
format,
|
|
19
|
+
source,
|
|
20
|
+
hi,
|
|
21
|
+
...extraParams
|
|
22
|
+
}) {
|
|
23
|
+
const url = new URL(`${config.baseUrl}/search`);
|
|
24
|
+
const queryParams = {
|
|
25
|
+
id: String(tmdb_id || imdb_id),
|
|
26
|
+
season,
|
|
27
|
+
episode,
|
|
28
|
+
encoding: Array.isArray(encoding) ? encoding.join(",") : encoding,
|
|
29
|
+
language: Array.isArray(language) ? language.join(",") : language,
|
|
30
|
+
format: Array.isArray(format) ? format.join(",") : format,
|
|
31
|
+
source: Array.isArray(source) ? source.join(",") : source,
|
|
32
|
+
hi
|
|
33
|
+
};
|
|
34
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
35
|
+
if (value !== void 0) {
|
|
36
|
+
url.searchParams.append(key, String(value));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.entries(extraParams).forEach(([key, value]) => {
|
|
40
|
+
if (value !== void 0) {
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
url.searchParams.append(key, value.join(","));
|
|
43
|
+
} else {
|
|
44
|
+
url.searchParams.append(key, String(value));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return url;
|
|
49
|
+
}
|
|
50
|
+
async function fetchSubtitles(url) {
|
|
51
|
+
const response = await fetch(url.toString());
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
54
|
+
}
|
|
55
|
+
return response.json();
|
|
56
|
+
}
|
|
57
|
+
async function searchSubtitles(params) {
|
|
58
|
+
try {
|
|
59
|
+
const url = await constructUrl(params);
|
|
60
|
+
return await fetchSubtitles(url);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
throw new Error(`Error fetching subtitles: ${error}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async function parseToVTT(subtitleUrl) {
|
|
66
|
+
try {
|
|
67
|
+
const response = await fetch(subtitleUrl);
|
|
68
|
+
if (!response.ok) {
|
|
69
|
+
throw new Error(`Failed to fetch subtitle content: ${response.status}`);
|
|
70
|
+
}
|
|
71
|
+
const content = await response.text();
|
|
72
|
+
const normalizedContent = content.replace(/\r\n|\r/g, "\n").trim();
|
|
73
|
+
const blocks = normalizedContent.split(/\n\n+/);
|
|
74
|
+
const timestampRegex = /^\d{1,2}:\d{2}:\d{2}[,.]\d{3}\s*-->\s*\d{1,2}:\d{2}:\d{2}[,.]\d{3}$/;
|
|
75
|
+
const hasValidSRTFormat = blocks.some((block) => {
|
|
76
|
+
const lines = block.split("\n").map((line) => line.trim());
|
|
77
|
+
return lines.some((line) => timestampRegex.test(line));
|
|
78
|
+
});
|
|
79
|
+
if (!hasValidSRTFormat) {
|
|
80
|
+
throw new Error("Invalid subtitle format: not SRT");
|
|
81
|
+
}
|
|
82
|
+
const vttLines = ["WEBVTT", ""];
|
|
83
|
+
for (const block of blocks) {
|
|
84
|
+
const lines = block.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
85
|
+
if (lines.length < 2)
|
|
86
|
+
continue;
|
|
87
|
+
const timestampIndex = lines.findIndex((line) => timestampRegex.test(line));
|
|
88
|
+
if (timestampIndex === -1)
|
|
89
|
+
continue;
|
|
90
|
+
const textLines = lines.slice(timestampIndex + 1).filter((line) => !/^\d+$/.test(line));
|
|
91
|
+
if (textLines.length === 0)
|
|
92
|
+
continue;
|
|
93
|
+
let timestampLine = lines[timestampIndex];
|
|
94
|
+
timestampLine = timestampLine.replace(/[,.](?=\s*-->)/, "").replace(/[,.]$/, "").replace(/,(\d{3})/g, ".$1");
|
|
95
|
+
vttLines.push(`${timestampLine}
|
|
96
|
+
${textLines.join("\n")}
|
|
97
|
+
`);
|
|
98
|
+
}
|
|
99
|
+
return vttLines.join("\n").replace(/\n{3,}/g, "\n\n").trim() + "\n\n";
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error("Error in parseToVTT:", error);
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.configure = configure;
|
|
106
|
+
exports.parseToVTT = parseToVTT;
|
|
107
|
+
exports.searchSubtitles = searchSubtitles;
|
package/lib/main.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type for the configuration options for the library.
|
|
3
|
+
*/
|
|
4
|
+
export declare type ConfigurationOptions = {
|
|
5
|
+
/** The API's hostname (default: sub.wyzie.ru) */
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Configure the library settings.
|
|
11
|
+
*
|
|
12
|
+
* @param {ConfigurationOptions} options - Config options for the library.
|
|
13
|
+
* @throws {Error} Throws an error if the baseUrl is not provided.
|
|
14
|
+
*/
|
|
15
|
+
export declare function configure(options: ConfigurationOptions): void;
|
|
16
|
+
|
|
1
17
|
/**
|
|
2
18
|
* Parses subtitle content from a URL to VTT format.
|
|
3
19
|
*
|
|
@@ -63,6 +79,8 @@ export declare type SearchSubtitlesParams = (
|
|
|
63
79
|
hi?: boolean;
|
|
64
80
|
/** The source where the subtitle where be scraped. */
|
|
65
81
|
source?: string;
|
|
82
|
+
/** Additional parameters that can be used for filtering or other purposes. */
|
|
83
|
+
[key: string]: any;
|
|
66
84
|
} & (
|
|
67
85
|
/** The number of the desired season you want subtitles for. */
|
|
68
86
|
{
|
package/lib/main.iife.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var main = function(exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
const config = {
|
|
4
|
+
baseUrl: "https://sub.wyzie.ru"
|
|
5
|
+
};
|
|
6
|
+
function configure(options) {
|
|
7
|
+
if (options.baseUrl) {
|
|
8
|
+
config.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
async function constructUrl({
|
|
12
|
+
tmdb_id,
|
|
13
|
+
imdb_id,
|
|
14
|
+
season,
|
|
15
|
+
episode,
|
|
16
|
+
encoding,
|
|
17
|
+
language,
|
|
18
|
+
format,
|
|
19
|
+
source,
|
|
20
|
+
hi,
|
|
21
|
+
...extraParams
|
|
22
|
+
}) {
|
|
23
|
+
const url = new URL(`${config.baseUrl}/search`);
|
|
24
|
+
const queryParams = {
|
|
25
|
+
id: String(tmdb_id || imdb_id),
|
|
26
|
+
season,
|
|
27
|
+
episode,
|
|
28
|
+
encoding: Array.isArray(encoding) ? encoding.join(",") : encoding,
|
|
29
|
+
language: Array.isArray(language) ? language.join(",") : language,
|
|
30
|
+
format: Array.isArray(format) ? format.join(",") : format,
|
|
31
|
+
source: Array.isArray(source) ? source.join(",") : source,
|
|
32
|
+
hi
|
|
33
|
+
};
|
|
34
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
35
|
+
if (value !== void 0) {
|
|
36
|
+
url.searchParams.append(key, String(value));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.entries(extraParams).forEach(([key, value]) => {
|
|
40
|
+
if (value !== void 0) {
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
url.searchParams.append(key, value.join(","));
|
|
43
|
+
} else {
|
|
44
|
+
url.searchParams.append(key, String(value));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return url;
|
|
49
|
+
}
|
|
50
|
+
async function fetchSubtitles(url) {
|
|
51
|
+
const response = await fetch(url.toString());
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
54
|
+
}
|
|
55
|
+
return response.json();
|
|
56
|
+
}
|
|
57
|
+
async function searchSubtitles(params) {
|
|
58
|
+
try {
|
|
59
|
+
const url = await constructUrl(params);
|
|
60
|
+
return await fetchSubtitles(url);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
throw new Error(`Error fetching subtitles: ${error}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async function parseToVTT(subtitleUrl) {
|
|
66
|
+
try {
|
|
67
|
+
const response = await fetch(subtitleUrl);
|
|
68
|
+
if (!response.ok) {
|
|
69
|
+
throw new Error(`Failed to fetch subtitle content: ${response.status}`);
|
|
70
|
+
}
|
|
71
|
+
const content = await response.text();
|
|
72
|
+
const normalizedContent = content.replace(/\r\n|\r/g, "\n").trim();
|
|
73
|
+
const blocks = normalizedContent.split(/\n\n+/);
|
|
74
|
+
const timestampRegex = /^\d{1,2}:\d{2}:\d{2}[,.]\d{3}\s*-->\s*\d{1,2}:\d{2}:\d{2}[,.]\d{3}$/;
|
|
75
|
+
const hasValidSRTFormat = blocks.some((block) => {
|
|
76
|
+
const lines = block.split("\n").map((line) => line.trim());
|
|
77
|
+
return lines.some((line) => timestampRegex.test(line));
|
|
78
|
+
});
|
|
79
|
+
if (!hasValidSRTFormat) {
|
|
80
|
+
throw new Error("Invalid subtitle format: not SRT");
|
|
81
|
+
}
|
|
82
|
+
const vttLines = ["WEBVTT", ""];
|
|
83
|
+
for (const block of blocks) {
|
|
84
|
+
const lines = block.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
85
|
+
if (lines.length < 2)
|
|
86
|
+
continue;
|
|
87
|
+
const timestampIndex = lines.findIndex((line) => timestampRegex.test(line));
|
|
88
|
+
if (timestampIndex === -1)
|
|
89
|
+
continue;
|
|
90
|
+
const textLines = lines.slice(timestampIndex + 1).filter((line) => !/^\d+$/.test(line));
|
|
91
|
+
if (textLines.length === 0)
|
|
92
|
+
continue;
|
|
93
|
+
let timestampLine = lines[timestampIndex];
|
|
94
|
+
timestampLine = timestampLine.replace(/[,.](?=\s*-->)/, "").replace(/[,.]$/, "").replace(/,(\d{3})/g, ".$1");
|
|
95
|
+
vttLines.push(`${timestampLine}
|
|
96
|
+
${textLines.join("\n")}
|
|
97
|
+
`);
|
|
98
|
+
}
|
|
99
|
+
return vttLines.join("\n").replace(/\n{3,}/g, "\n\n").trim() + "\n\n";
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error("Error in parseToVTT:", error);
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.configure = configure;
|
|
106
|
+
exports.parseToVTT = parseToVTT;
|
|
107
|
+
exports.searchSubtitles = searchSubtitles;
|
|
108
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
109
|
+
return exports;
|
|
110
|
+
}({});
|
package/lib/main.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
baseUrl: "https://sub.wyzie.ru"
|
|
3
|
+
};
|
|
4
|
+
function configure(options) {
|
|
5
|
+
if (options.baseUrl) {
|
|
6
|
+
config.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
7
|
+
}
|
|
8
|
+
}
|
|
1
9
|
async function constructUrl({
|
|
2
10
|
tmdb_id,
|
|
3
11
|
imdb_id,
|
|
@@ -7,9 +15,10 @@ async function constructUrl({
|
|
|
7
15
|
language,
|
|
8
16
|
format,
|
|
9
17
|
source,
|
|
10
|
-
hi
|
|
18
|
+
hi,
|
|
19
|
+
...extraParams
|
|
11
20
|
}) {
|
|
12
|
-
const url = new URL(
|
|
21
|
+
const url = new URL(`${config.baseUrl}/search`);
|
|
13
22
|
const queryParams = {
|
|
14
23
|
id: String(tmdb_id || imdb_id),
|
|
15
24
|
season,
|
|
@@ -25,6 +34,15 @@ async function constructUrl({
|
|
|
25
34
|
url.searchParams.append(key, String(value));
|
|
26
35
|
}
|
|
27
36
|
});
|
|
37
|
+
Object.entries(extraParams).forEach(([key, value]) => {
|
|
38
|
+
if (value !== void 0) {
|
|
39
|
+
if (Array.isArray(value)) {
|
|
40
|
+
url.searchParams.append(key, value.join(","));
|
|
41
|
+
} else {
|
|
42
|
+
url.searchParams.append(key, String(value));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
28
46
|
return url;
|
|
29
47
|
}
|
|
30
48
|
async function fetchSubtitles(url) {
|
|
@@ -83,6 +101,7 @@ ${textLines.join("\n")}
|
|
|
83
101
|
}
|
|
84
102
|
}
|
|
85
103
|
export {
|
|
104
|
+
configure,
|
|
86
105
|
parseToVTT,
|
|
87
106
|
searchSubtitles
|
|
88
107
|
};
|
package/lib/main.umd.cjs
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.main = {}));
|
|
3
3
|
})(this, function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
|
+
const config = {
|
|
6
|
+
baseUrl: "https://sub.wyzie.ru"
|
|
7
|
+
};
|
|
8
|
+
function configure(options) {
|
|
9
|
+
if (options.baseUrl) {
|
|
10
|
+
config.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
11
|
+
}
|
|
12
|
+
}
|
|
5
13
|
async function constructUrl({
|
|
6
14
|
tmdb_id,
|
|
7
15
|
imdb_id,
|
|
@@ -11,9 +19,10 @@
|
|
|
11
19
|
language,
|
|
12
20
|
format,
|
|
13
21
|
source,
|
|
14
|
-
hi
|
|
22
|
+
hi,
|
|
23
|
+
...extraParams
|
|
15
24
|
}) {
|
|
16
|
-
const url = new URL(
|
|
25
|
+
const url = new URL(`${config.baseUrl}/search`);
|
|
17
26
|
const queryParams = {
|
|
18
27
|
id: String(tmdb_id || imdb_id),
|
|
19
28
|
season,
|
|
@@ -29,6 +38,15 @@
|
|
|
29
38
|
url.searchParams.append(key, String(value));
|
|
30
39
|
}
|
|
31
40
|
});
|
|
41
|
+
Object.entries(extraParams).forEach(([key, value]) => {
|
|
42
|
+
if (value !== void 0) {
|
|
43
|
+
if (Array.isArray(value)) {
|
|
44
|
+
url.searchParams.append(key, value.join(","));
|
|
45
|
+
} else {
|
|
46
|
+
url.searchParams.append(key, String(value));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
32
50
|
return url;
|
|
33
51
|
}
|
|
34
52
|
async function fetchSubtitles(url) {
|
|
@@ -86,6 +104,7 @@ ${textLines.join("\n")}
|
|
|
86
104
|
throw error;
|
|
87
105
|
}
|
|
88
106
|
}
|
|
107
|
+
exports2.configure = configure;
|
|
89
108
|
exports2.parseToVTT = parseToVTT;
|
|
90
109
|
exports2.searchSubtitles = searchSubtitles;
|
|
91
110
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wyzie-lib",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"icon": "https://i.postimg.cc/L5ppKYC5/cclogo.png",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"url": "git+https://github.com/itzcozi/wyzie-lib.git"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"prettier": "^3.
|
|
63
|
+
"prettier": "^3.6.0",
|
|
64
64
|
"typescript": "^5.8.3",
|
|
65
65
|
"vite": "^4.5.14",
|
|
66
66
|
"vite-plugin-dts": "^4.5.4",
|