@vacantthinker/firefox-addon-framework-easy 2026.610.749 β†’ 2026.610.1322

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/README.md CHANGED
@@ -92,9 +92,9 @@ export class DomainORM extends BaseORM { }
92
92
 
93
93
  ### πŸ“„ File: `src/generate.js`
94
94
  ```javascript
95
- export function generateMkvScriptForSystemWindows({ }
95
+ export function generateMkvScriptForSystemWindows(videoInfo) { }
96
96
 
97
- export function generateMkvScriptForSystemFedora({ }
97
+ export function generateMkvScriptForSystemFedora(videoInfo) { }
98
98
 
99
99
  ```
100
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0610.0749",
3
+ "version": "2026.0610.1322",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/src/generate.js CHANGED
@@ -1,6 +1,13 @@
1
- export function generateMkvScriptForSystemWindows({vid, title}) {
2
- let args = {vid, title};
3
-
1
+ // ζ–°δΈ»ι’˜γ€‚
2
+
3
+ /**
4
+ *
5
+ * @param videoInfo
6
+ * @param videoInfo.vid{string}
7
+ * @param videoInfo.videoTitle{string}
8
+ * @return {string}
9
+ */
10
+ export function generateMkvScriptForSystemWindows(videoInfo) {
4
11
  return `if (true) {
5
12
  const path = require('path');
6
13
  const fs = require('fs');
@@ -9,11 +16,11 @@ export function generateMkvScriptForSystemWindows({vid, title}) {
9
16
  let dot = '.';
10
17
  let extMKV = 'mkv';
11
18
 
12
- let {vid, title} = ${JSON.stringify(args)};
19
+ let {vid, videoTitle} = ${JSON.stringify(videoInfo)};
13
20
  let playVideoAfterMerged = true;
14
21
  let pathToMkvmerge = 'C:\\\\Program Files\\\\MKVToolNix\\\\mkvmerge.exe';
15
22
 
16
- let pathMKVOutput = path.join(pathDownload, title.concat(dot, extMKV));
23
+ let pathMKVOutput = path.join(pathDownload, videoTitle.concat(dot, extMKV));
17
24
  let pathOutput = path.join(pathDownload, vid.concat(dot, extMKV));
18
25
  let pathInputAudio = path.join(pathDownload, vid.concat(dot, "mp3"));
19
26
  let pathInputVideo = path.join(pathDownload, vid.concat(dot, "mp4"));
@@ -24,7 +31,7 @@ export function generateMkvScriptForSystemWindows({vid, title}) {
24
31
  ) {
25
32
 
26
33
  console.log('');
27
- console.log(['file check ok!', title].join(' '));
34
+ console.log(['file check ok!', videoTitle].join(' '));
28
35
 
29
36
  let cmd_merge = [
30
37
  [pathToMkvmerge].map(v => '"' + v + '"').join(''),
@@ -56,7 +63,7 @@ export function generateMkvScriptForSystemWindows({vid, title}) {
56
63
  console.log('error', data);
57
64
  });
58
65
  exec_merge.stdout.on('close', (data) => {
59
- console.log(['merge finish!', title].join(' '));
66
+ console.log(['merge finish!', videoTitle].join(' '));
60
67
 
61
68
  if (true) {
62
69
  console.log('remove inputFile');
@@ -86,9 +93,14 @@ export function generateMkvScriptForSystemWindows({vid, title}) {
86
93
  `;
87
94
  }
88
95
 
89
- export function generateMkvScriptForSystemFedora({vid, title}) {
90
- let args = {vid, title};
91
-
96
+ /**
97
+ *
98
+ * @param videoInfo
99
+ * @param videoInfo.vid{string}
100
+ * @param videoInfo.videoTitle{string}
101
+ * @return {string}
102
+ */
103
+ export function generateMkvScriptForSystemFedora(videoInfo) {
92
104
  // We wrap the Node.js script inside a Linux Shell script block
93
105
  return `#!/usr/bin/env bash
94
106
  # This header tells Fedora to treat this file as a runnable bash script
@@ -110,17 +122,17 @@ let pathDownload = path.join(__dirname);
110
122
  let dot = '.';
111
123
  let extMKV = 'mkv';
112
124
 
113
- let {vid, title} = ${JSON.stringify(args)};
125
+ let {vid, videoTitle} = ${JSON.stringify(videoInfo)};
114
126
  let playVideoAfterMerged = true;
115
127
  let pathToMkvmerge = '/usr/bin/mkvmerge';
116
128
 
117
- let pathMKVOutput = path.join(pathDownload, title.concat(dot, extMKV));
129
+ let pathMKVOutput = path.join(pathDownload, videoTitle.concat(dot, extMKV));
118
130
  let pathOutput = path.join(pathDownload, vid.concat(dot, extMKV));
119
131
  let pathInputAudio = path.join(pathDownload, vid.concat(dot, "mp3"));
120
132
  let pathInputVideo = path.join(pathDownload, vid.concat(dot, "mp4"));
121
133
 
122
134
  if (fs.existsSync(pathToMkvmerge)) {
123
- console.log('\\nfile check ok! ' + title);
135
+ console.log('\\nfile check ok! ' + videoTitle);
124
136
 
125
137
  let cmd_merge = [
126
138
  '"' + pathToMkvmerge + '"',
@@ -134,7 +146,7 @@ if (fs.existsSync(pathToMkvmerge)) {
134
146
  try {
135
147
  // Run merge synchronously so stdout pipes directly to the terminal
136
148
  execSync(cmd_merge, { stdio: 'inherit' });
137
- console.log('merge finish! ' + title);
149
+ console.log('merge finish! ' + videoTitle);
138
150
 
139
151
  console.log('remove inputFile');
140
152
  if (fs.existsSync(pathInputVideo)) fs.unlinkSync(pathInputVideo);
@@ -164,4 +176,4 @@ read unused_input
164
176
  # Deletes the shell script file itself after completion
165
177
  rm -- "$0"
166
178
  `;
167
- }
179
+ }