mirakurun 4.0.0-beta.0 → 4.0.0-beta.10

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.
Files changed (159) hide show
  1. package/CHANGELOG.md +140 -1
  2. package/README.md +1 -1
  3. package/api.d.ts +95 -37
  4. package/api.yml +50 -1
  5. package/bin/cli.sh +15 -0
  6. package/config/channels.yml +117 -74
  7. package/config/dvbconf-for-isdb/conf/dvbv5_channels_isdbs.conf +2 -2
  8. package/doc/Configuration.md +16 -10
  9. package/doc/Platforms.md +52 -4
  10. package/docker/README.md +13 -3
  11. package/docker/container-init.sh +5 -1
  12. package/docker/docker-compose.yml +21 -23
  13. package/lib/Mirakurun/Channel.d.ts +5 -4
  14. package/lib/Mirakurun/Channel.js +45 -7
  15. package/lib/Mirakurun/Channel.js.map +1 -1
  16. package/lib/Mirakurun/ChannelItem.d.ts +10 -19
  17. package/lib/Mirakurun/ChannelItem.js +66 -58
  18. package/lib/Mirakurun/ChannelItem.js.map +1 -1
  19. package/lib/Mirakurun/EPG.js +5 -4
  20. package/lib/Mirakurun/EPG.js.map +1 -1
  21. package/lib/Mirakurun/Event.d.ts +9 -15
  22. package/lib/Mirakurun/Event.js +11 -7
  23. package/lib/Mirakurun/Event.js.map +1 -1
  24. package/lib/Mirakurun/Program.d.ts +2 -1
  25. package/lib/Mirakurun/Program.js +56 -15
  26. package/lib/Mirakurun/Program.js.map +1 -1
  27. package/lib/Mirakurun/Server.d.ts +6 -1
  28. package/lib/Mirakurun/Server.js +144 -73
  29. package/lib/Mirakurun/Server.js.map +1 -1
  30. package/lib/Mirakurun/Service.d.ts +2 -1
  31. package/lib/Mirakurun/Service.js +55 -16
  32. package/lib/Mirakurun/Service.js.map +1 -1
  33. package/lib/Mirakurun/ServiceItem.d.ts +2 -2
  34. package/lib/Mirakurun/ServiceItem.js +15 -2
  35. package/lib/Mirakurun/ServiceItem.js.map +1 -1
  36. package/lib/Mirakurun/TSDecoder.js +50 -7
  37. package/lib/Mirakurun/TSDecoder.js.map +1 -1
  38. package/lib/Mirakurun/TSFilter.js +86 -43
  39. package/lib/Mirakurun/TSFilter.js.map +1 -1
  40. package/lib/Mirakurun/Tuner.d.ts +8 -7
  41. package/lib/Mirakurun/Tuner.js +49 -10
  42. package/lib/Mirakurun/Tuner.js.map +1 -1
  43. package/lib/Mirakurun/TunerDevice.d.ts +5 -6
  44. package/lib/Mirakurun/TunerDevice.js +55 -17
  45. package/lib/Mirakurun/TunerDevice.js.map +1 -1
  46. package/lib/Mirakurun/_.d.ts +5 -5
  47. package/lib/Mirakurun/_.js +3 -2
  48. package/lib/Mirakurun/_.js.map +1 -1
  49. package/lib/Mirakurun/api/channels/{type}/{channel}/services/{id}/stream.d.ts +3 -2
  50. package/lib/Mirakurun/api/channels/{type}/{channel}/services/{id}/stream.js +53 -41
  51. package/lib/Mirakurun/api/channels/{type}/{channel}/services/{id}/stream.js.map +1 -1
  52. package/lib/Mirakurun/api/channels/{type}/{channel}/services/{id}.d.ts +2 -1
  53. package/lib/Mirakurun/api/channels/{type}/{channel}/services/{id}.js +39 -3
  54. package/lib/Mirakurun/api/channels/{type}/{channel}/services/{id}.js.map +1 -1
  55. package/lib/Mirakurun/api/channels/{type}/{channel}/services.d.ts +2 -1
  56. package/lib/Mirakurun/api/channels/{type}/{channel}/services.js +39 -3
  57. package/lib/Mirakurun/api/channels/{type}/{channel}/services.js.map +1 -1
  58. package/lib/Mirakurun/api/channels/{type}/{channel}/stream.d.ts +3 -2
  59. package/lib/Mirakurun/api/channels/{type}/{channel}/stream.js +51 -39
  60. package/lib/Mirakurun/api/channels/{type}/{channel}/stream.js.map +1 -1
  61. package/lib/Mirakurun/api/channels/{type}/{channel}.d.ts +2 -1
  62. package/lib/Mirakurun/api/channels/{type}/{channel}.js +43 -6
  63. package/lib/Mirakurun/api/channels/{type}/{channel}.js.map +1 -1
  64. package/lib/Mirakurun/api/channels/{type}.d.ts +2 -1
  65. package/lib/Mirakurun/api/channels/{type}.js +43 -6
  66. package/lib/Mirakurun/api/channels/{type}.js.map +1 -1
  67. package/lib/Mirakurun/api/channels.js +43 -6
  68. package/lib/Mirakurun/api/channels.js.map +1 -1
  69. package/lib/Mirakurun/api/config/channels/scan.d.ts +10 -14
  70. package/lib/Mirakurun/api/config/channels/scan.js +491 -163
  71. package/lib/Mirakurun/api/config/channels/scan.js.map +1 -1
  72. package/lib/Mirakurun/api/config/channels.js +40 -6
  73. package/lib/Mirakurun/api/config/channels.js.map +1 -1
  74. package/lib/Mirakurun/api/config/server.js +40 -6
  75. package/lib/Mirakurun/api/config/server.js.map +1 -1
  76. package/lib/Mirakurun/api/config/tuners.js +40 -6
  77. package/lib/Mirakurun/api/config/tuners.js.map +1 -1
  78. package/lib/Mirakurun/api/events/stream.js +4 -1
  79. package/lib/Mirakurun/api/events/stream.js.map +1 -1
  80. package/lib/Mirakurun/api/events.js +38 -2
  81. package/lib/Mirakurun/api/events.js.map +1 -1
  82. package/lib/Mirakurun/api/iptv/discover.json.js +38 -2
  83. package/lib/Mirakurun/api/iptv/discover.json.js.map +1 -1
  84. package/lib/Mirakurun/api/iptv/lineup.json.js +38 -2
  85. package/lib/Mirakurun/api/iptv/lineup.json.js.map +1 -1
  86. package/lib/Mirakurun/api/iptv/lineup_status.json.js +34 -1
  87. package/lib/Mirakurun/api/iptv/lineup_status.json.js.map +1 -1
  88. package/lib/Mirakurun/api/iptv/playlist.js +5 -2
  89. package/lib/Mirakurun/api/iptv/playlist.js.map +1 -1
  90. package/lib/Mirakurun/api/iptv/xmltv.js +5 -2
  91. package/lib/Mirakurun/api/iptv/xmltv.js.map +1 -1
  92. package/lib/Mirakurun/api/log/stream.js.map +1 -1
  93. package/lib/Mirakurun/api/log.js.map +1 -1
  94. package/lib/Mirakurun/api/programs/{id}/stream.d.ts +1 -1
  95. package/lib/Mirakurun/api/programs/{id}/stream.js +50 -38
  96. package/lib/Mirakurun/api/programs/{id}/stream.js.map +1 -1
  97. package/lib/Mirakurun/api/programs/{id}.js +39 -3
  98. package/lib/Mirakurun/api/programs/{id}.js.map +1 -1
  99. package/lib/Mirakurun/api/programs.js +38 -2
  100. package/lib/Mirakurun/api/programs.js.map +1 -1
  101. package/lib/Mirakurun/api/restart.js +34 -1
  102. package/lib/Mirakurun/api/restart.js.map +1 -1
  103. package/lib/Mirakurun/api/services/{id}/logo.js +5 -2
  104. package/lib/Mirakurun/api/services/{id}/logo.js.map +1 -1
  105. package/lib/Mirakurun/api/services/{id}/stream.d.ts +1 -1
  106. package/lib/Mirakurun/api/services/{id}/stream.js +50 -38
  107. package/lib/Mirakurun/api/services/{id}/stream.js.map +1 -1
  108. package/lib/Mirakurun/api/services/{id}.js +40 -4
  109. package/lib/Mirakurun/api/services/{id}.js.map +1 -1
  110. package/lib/Mirakurun/api/services.js +41 -5
  111. package/lib/Mirakurun/api/services.js.map +1 -1
  112. package/lib/Mirakurun/api/status.d.ts +2 -2
  113. package/lib/Mirakurun/api/status.js +40 -3
  114. package/lib/Mirakurun/api/status.js.map +1 -1
  115. package/lib/Mirakurun/api/tuners/{index}/process.js +51 -17
  116. package/lib/Mirakurun/api/tuners/{index}/process.js.map +1 -1
  117. package/lib/Mirakurun/api/tuners/{index}.js +40 -4
  118. package/lib/Mirakurun/api/tuners/{index}.js.map +1 -1
  119. package/lib/Mirakurun/api/tuners.js +38 -2
  120. package/lib/Mirakurun/api/tuners.js.map +1 -1
  121. package/lib/Mirakurun/api/version.js +35 -2
  122. package/lib/Mirakurun/api/version.js.map +1 -1
  123. package/lib/Mirakurun/api.d.ts +1 -1
  124. package/lib/Mirakurun/api.js +38 -2
  125. package/lib/Mirakurun/api.js.map +1 -1
  126. package/lib/Mirakurun/common.d.ts +3 -7
  127. package/lib/Mirakurun/common.js +7 -8
  128. package/lib/Mirakurun/common.js.map +1 -1
  129. package/lib/Mirakurun/config.d.ts +8 -47
  130. package/lib/Mirakurun/config.js +102 -34
  131. package/lib/Mirakurun/config.js.map +1 -1
  132. package/lib/Mirakurun/db.d.ts +6 -82
  133. package/lib/Mirakurun/db.js +95 -50
  134. package/lib/Mirakurun/db.js.map +1 -1
  135. package/lib/Mirakurun/log.js +35 -5
  136. package/lib/Mirakurun/log.js.map +1 -1
  137. package/lib/Mirakurun/rpc.js +46 -7
  138. package/lib/Mirakurun/rpc.js.map +1 -1
  139. package/lib/Mirakurun/system.d.ts +1 -1
  140. package/lib/Mirakurun/system.js +44 -7
  141. package/lib/Mirakurun/system.js.map +1 -1
  142. package/lib/client.d.ts +12 -1
  143. package/lib/client.js +63 -15
  144. package/lib/client.js.map +1 -1
  145. package/lib/epgdump.js +45 -11
  146. package/lib/epgdump.js.map +1 -1
  147. package/lib/remote.js +4 -1
  148. package/lib/remote.js.map +1 -1
  149. package/lib/server.js +72 -34
  150. package/lib/server.js.map +1 -1
  151. package/lib/tsconfig.tsbuildinfo +1 -1
  152. package/lib/ui/index.bundle.js +1011 -1243
  153. package/lib/ui/index.bundle.js.map +1 -1
  154. package/lib/ui/redoc-ui.html +37 -0
  155. package/lib/ui/vendors.bundle.js +18733 -13127
  156. package/lib/ui/vendors.bundle.js.map +1 -1
  157. package/package.json +21 -20
  158. package/processes.json +1 -1
  159. package/lib/ui/swagger-ui.html +0 -40
package/CHANGELOG.md CHANGED
@@ -2,7 +2,146 @@
2
2
 
3
3
  see [Commit Logs](https://github.com/Chinachu/Mirakurun/commits/master) to check all.
4
4
 
5
- ## 3.9.0 (2023-xx-xx)
5
+ ## 4.0.0-beta.10 (2025-03-17)
6
+
7
+ **Important Notice**: Mirakurun 4.0.0 includes significant performance improvements, enhanced EPG processing, asynchronous file I/O operations, and new features. As announced in 3.9.0, the experimental Win32 support has been completely removed.
8
+
9
+ ### Server Changes
10
+
11
+ - **Server**:
12
+ - Added test mode support for unit/integration testing
13
+ - Added deinit method (not used yet)
14
+ - Improved server init with proper async handling
15
+ - **API**:
16
+ - **getTuner**: Fixed 500 error on not found (*bug*)
17
+
18
+ ### Client Changes
19
+
20
+ - **getDocs**: Added to get API spec docs
21
+
22
+ ## 4.0.0-beta.9 (2025-03-16)
23
+
24
+ ### Server Changes
25
+
26
+ - **UI**:
27
+ - **ChannelsConfigurator**: Fixed layout issue on initial view (*bug*)
28
+ - **TunersManager**: Added dropped packet counter
29
+
30
+ ## 4.0.0-beta.8 (2025-03-16)
31
+
32
+ ### Server Changes
33
+
34
+ - **API**:
35
+ - **getTuner**: Fixed broken response (*bug*)
36
+ - **killTunerProcess**: The normal status code was changed to `204`. Response is now empty. (*breaking change*)
37
+ - **getChannelStream**,<br>
38
+ **getServiceStreamByChannel**,<br>
39
+ **getProgramStream**,<br>
40
+ **getServiceStream**:
41
+ - Fixed processing of HEAD requests; removed operationId because duplicated. (*bug*)
42
+
43
+ ### Client Changes
44
+
45
+ - channelScan: (Note) Response spec may change. asynchronous support is under consideration.
46
+ - **getChannelScanStatus**: Added
47
+ - **stopChannelScan**: Added
48
+
49
+ ## 4.0.0-beta.7 (2025-03-14)
50
+
51
+ **Important Notice**: Mirakurun 4.0.0 includes significant performance improvements, enhanced EPG processing, asynchronous file I/O operations, and new features. As announced in 3.9.0, the experimental Win32 support has been completely removed.
52
+
53
+ ### Key Changes
54
+
55
+ - **Node.js**: Updated supported versions: `^18 || ^20 || ^22` (dropped support for Node.js 14 and 16)
56
+ - **Win32**: Completely removed support
57
+ - **UI**: Added UI for channel scanning
58
+ - **Performance**: Eliminated blocking file I/O operations to improve real-time processing
59
+ - **Configuration**: Reduced storage write frequency to minimize interruptions to real-time processing
60
+ - **Docker**: Updated configuration files, improved commands, and added Node.js 22 support
61
+
62
+ ### Breaking Changes
63
+
64
+ - **Win32**: Completely removed support
65
+ - **Project Structure**: Changed global installation to be discouraged and removed PM2 support
66
+
67
+ ### Server Changes
68
+
69
+ - **config/server**: Added new configuration options:
70
+ - `allowOrigins`: Specify CORS origins
71
+ - `allowPNA`: Allow Private Network Access (default: `true`)
72
+ - `tsplayEndpoint`: Endpoint for TSPlay feature
73
+ - **CORS**: Support for multiple origins, Cross-Origin Resource Policy set to "cross-origin"
74
+ - **Private Network Access**: Added PNA/LNA support, enabling secure access within private networks
75
+ - **Memory Usage**: Increased Node.js `max-semi-space-size` to 64MB to improve memory performance (this may slight increase memory usage)
76
+ - **config/channels/scan**: Added service type support, improved scanning capabilities
77
+ - Added `skipCh` parameter to skip specific channels
78
+ - Added asynchronous channel scanning with progress tracking
79
+ - Added DELETE endpoint for canceling scans
80
+ - **UI**:
81
+ - Changed API documentation from Swagger UI to ReDoc
82
+ - Added new UI components and service type filtering options
83
+ - Added channel, service ID, and User-Agent columns to tuner manager
84
+ - Added UI for channel scanning with visual progress tracking
85
+ - **TSPlay**: Added experimental TSPlay feature
86
+
87
+ ### Docker Changes
88
+
89
+ - **Base Image**: Updated from `node:18.15.0-buster-slim` to `node:22.14.0-bookworm-slim`
90
+ - **Build Process**: Changed from `npm install` to `npm ci` for more reliable builds
91
+ - **Configuration**:
92
+ - Made Dockerfile and image tag configurable via environment variables (`DOCKERFILE`, `MIRAKURUN_IMAGE_TAG`)
93
+ - Added `tmpfs` mount for `/tmp` to improve I/O performance
94
+ - **docker-compose.yml**:
95
+ - Simplified volume binding syntax
96
+ - Added configuration guidance for users not using card readers or DVB devices
97
+ - Added detailed comments for hostname settings
98
+ - **Commands**: Added new npm scripts for developers:
99
+ - `docker:run-setup`: Run container in setup mode
100
+ - `docker:down`: Stop and remove container
101
+ - `docker:logs`: Display container logs
102
+ - `docker:bash`: Run Bash shell in container
103
+
104
+ ### Other Changes
105
+
106
+ - **File I/O Processing**:
107
+ - Replaced synchronous file I/O operations with asynchronous ones to improve real-time processing performance
108
+ - Replaced synchronous methods from the `fs` module with asynchronous methods from `fs/promises`
109
+ - Introduced queues for config file I/O operations to prevent concurrent access issues
110
+ - Reduced storage write frequency (extended program info save interval from 10 seconds to 30 seconds)
111
+
112
+ - **Performance Optimization**:
113
+ - Implemented asynchronous JSON processing to prevent interruptions to real-time stream processing
114
+ - Introduced `yieldable-json` package for asynchronous JSON parsing
115
+ - Increased Node.js `max-semi-space-size` to 64MB to improve garbage collection efficiency
116
+
117
+ - **Packages and Frameworks**:
118
+ - Updated major dependencies:
119
+ - express: `4.17.3` → `4.21.2`
120
+ - glob: `7.2.3` → `11.0.1`
121
+ - semver: `7.3.5` → `7.7.1`
122
+ - rfdc: `1.3.0` → `1.4.1`
123
+ - React: `17.0.2` → `^18.3.1`
124
+ - React DOM: `17.0.2` → `^18.3.1`
125
+ - TypeScript: `4.7` → `5.7`
126
+ - Added new dependencies:
127
+ - redoc: `2.4.0` (as an alternative to Swagger UI)
128
+ - redoc-try: `1.4.10`
129
+ - yieldable-json: `^2.1.0`
130
+ - Removed dependencies:
131
+ - swagger-ui-dist (due to change in API documentation tool to ReDoc)
132
+
133
+ - **Project Structure**:
134
+ - Removed global installation (`preferGlobal`) flag
135
+ - Removed PM2 support, added dummy CLI script for migration guidance
136
+ - Completely removed Win32-specific scripts and support
137
+ - Improved TypeScript configuration and consistency
138
+ - Updated Azure Pipelines configuration (updated to Ubuntu 22.04 base)
139
+
140
+ - **Channels**:
141
+ - Updated default sample channel configuration
142
+ - Significantly improved and extended channel scanning functionality
143
+
144
+ ## 3.9.0-rc.4 (2023-04-09)
6
145
 
7
146
  Performance improvements, fixes for memory leaks and bugs related to EPG processing, etc.
8
147
 
package/README.md CHANGED
@@ -22,7 +22,7 @@ see: available [Tags](https://hub.docker.com/r/chinachu/mirakurun/tags) (Docker
22
22
  ```sh
23
23
  mkdir ~/mirakurun/
24
24
  cd ~/mirakurun/
25
- wget https://raw.githubusercontent.com/Chinachu/Mirakurun/master/docker/docker-compose.yml
25
+ wget https://raw.githubusercontent.com/Chinachu/Mirakurun/refs/heads/release/4.0.0/docker/docker-compose.yml
26
26
  docker compose pull
27
27
  docker compose run --rm -e SETUP=true mirakurun
28
28
  docker compose up -d
package/api.d.ts CHANGED
@@ -51,8 +51,6 @@ export interface Channel {
51
51
 
52
52
  export type ChannelType = "GR" | "BS" | "CS" | "SKY";
53
53
 
54
- export type ChannelScanMode = "Channel" | "Service";
55
-
56
54
  export interface Service {
57
55
  id: ServiceItemId;
58
56
  serviceId: ServiceId;
@@ -85,24 +83,7 @@ export interface Program {
85
83
  streamContent: number;
86
84
  componentType: number;
87
85
  }
88
- audios?: {
89
- /** component_type
90
- * - 0x01 - 1/0 mode (single-mono)
91
- * - 0x02 - 1/0 + 1/0 mode (dual-mono)
92
- * - 0x03 - 2/0 mode (stereo)
93
- * - 0x07 - 3/1 mode
94
- * - 0x08 - 3/2 mode
95
- * - 0x09 - 3/2 + LFE mode
96
- */
97
- componentType: number;
98
- componentTag: number;
99
- isMain: boolean;
100
- samplingRate: ProgramAudioSamplingRate;
101
- /** ISO_639_language_code, ISO_639_language_code_2
102
- * - this `#length` will `2` if dual-mono multi-lingual.
103
- */
104
- langs: ProgramAudioLanguageCode[];
105
- }[]
86
+ audios?: ProgramAudio[];
106
87
 
107
88
  series?: ProgramSeries;
108
89
 
@@ -122,17 +103,45 @@ export interface ProgramGenre {
122
103
 
123
104
  export type ProgramVideoType = "mpeg2" | "h.264" | "h.265";
124
105
 
125
- export type ProgramVideoResolution = "240p" | "480i" | "480p" | "720p" | "1080i" | "2160p" | "4320p";
106
+ export type ProgramVideoResolution = (
107
+ "240p" |
108
+ "480i" |
109
+ "480p" |
110
+ "720p" |
111
+ "1080i" |
112
+ "1080p" |
113
+ "2160p" |
114
+ "4320p"
115
+ );
126
116
 
127
- export enum ProgramAudioSamplingRate {
128
- "16kHz" = 16000,
129
- "22.05kHz" = 22050,
130
- "24kHz" = 24000,
131
- "32kHz" = 32000,
132
- "44.1kHz" = 44100,
133
- "48kHz" = 48000
117
+ export interface ProgramAudio {
118
+ /** component_type
119
+ * - 0x01 - 1/0 mode (single-mono)
120
+ * - 0x02 - 1/0 + 1/0 mode (dual-mono)
121
+ * - 0x03 - 2/0 mode (stereo)
122
+ * - 0x07 - 3/1 mode
123
+ * - 0x08 - 3/2 mode
124
+ * - 0x09 - 3/2 + LFE mode
125
+ */
126
+ componentType: number;
127
+ componentTag: number;
128
+ isMain: boolean;
129
+ samplingRate: ProgramAudioSamplingRate;
130
+ /** ISO_639_language_code, ISO_639_language_code_2
131
+ * - this `#length` will `2` if dual-mono multi-lingual.
132
+ */
133
+ langs: ProgramAudioLanguageCode[];
134
134
  }
135
135
 
136
+ export type ProgramAudioSamplingRate = (
137
+ 16000 |
138
+ 22050 |
139
+ 24000 |
140
+ 32000 |
141
+ 44100 |
142
+ 48000
143
+ );
144
+
136
145
  export type ProgramAudioLanguageCode = (
137
146
  "jpn" |
138
147
  "eng" |
@@ -211,10 +220,10 @@ export interface TunerProcess {
211
220
  pid: number;
212
221
  }
213
222
 
214
- export interface Event {
223
+ export interface Event<T = any> {
215
224
  resource: EventResource;
216
225
  type: EventType;
217
- data: any;
226
+ data: T;
218
227
  time: UnixtimeMS;
219
228
  }
220
229
 
@@ -239,15 +248,19 @@ export interface ConfigServer {
239
248
  disableWebUI?: boolean;
240
249
  allowIPv4CidrRanges?: string[];
241
250
  allowIPv6CidrRanges?: string[];
251
+ allowOrigins: string[];
252
+ allowPNA: boolean;
253
+ tsplayEndpoint: string;
242
254
  }
243
255
 
244
- export enum LogLevel {
245
- "FATAL" = -1,
246
- "ERROR" = 0,
247
- "WARN" = 1,
248
- "INFO" = 2,
249
- "DEBUG" = 3
250
- }
256
+ /**
257
+ * FATAL: -1
258
+ * ERROR: 0
259
+ * WARN: 1
260
+ * INFO: 2
261
+ * DEBUG: 3
262
+ */
263
+ export type LogLevel = -1 | 0 | 1 | 2 | 3;
251
264
 
252
265
  export type ConfigTuners = ConfigTunersItem[];
253
266
 
@@ -286,8 +299,53 @@ export interface ConfigChannelsItem {
286
299
  polarity?: "H" | "V";
287
300
  tsmfRelTs?: number;
288
301
  isDisabled?: boolean;
302
+ /** @deprecated */
303
+ readonly satelite?: string;
304
+ }
305
+
306
+ export interface ChannelScanStatus {
307
+ isScanning: boolean;
308
+ status: ChannelScanPhase;
309
+ type?: ChannelType;
310
+ dryRun?: boolean;
311
+ progress?: number;
312
+ currentChannel?: string;
313
+ scanLog?: string[];
314
+ newCount?: number;
315
+ takeoverCount?: number;
316
+ result?: ConfigChannelsItem[];
317
+ startTime?: number;
318
+ updateTime?: number;
289
319
  }
290
320
 
321
+ export type ChannelScanMode = "Channel" | "Service";
322
+
323
+ export type ChannelScanPhase = (
324
+ "not_started" |
325
+ "scanning" |
326
+ "completed" |
327
+ "cancelled" |
328
+ "error"
329
+ );
330
+
331
+ export type ChannelScanStep = (
332
+ "started" |
333
+ "scanning_channel" |
334
+ "takeover" |
335
+ "skipped" |
336
+ "services_found" |
337
+ "channels_found" |
338
+ "error"
339
+ );
340
+
341
+ export type ChannelScanResultType = (
342
+ "summary" |
343
+ "summary_new" |
344
+ "summary_takeover" |
345
+ "restart_required" |
346
+ "final_result"
347
+ );
348
+
291
349
  export interface Version {
292
350
  current: string;
293
351
  latest: string;
package/api.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  swagger: '2.0'
2
2
  info:
3
3
  title: Mirakurun
4
- version: ~
4
+ version: '0.0.0'
5
5
  description: DVR Tuner Server for Japanese TV.
6
6
  contact:
7
7
  name: Chinachu Project
@@ -572,6 +572,55 @@ definitions:
572
572
  latest:
573
573
  type: string
574
574
 
575
+ ChannelScanStatus:
576
+ type: object
577
+ description: "Current status of a channel scan operation"
578
+ properties:
579
+ status:
580
+ type: string
581
+ description: "Current scan status"
582
+ enum:
583
+ - not_started
584
+ - scanning
585
+ - completed
586
+ - cancelled
587
+ - error
588
+ isScanning:
589
+ type: boolean
590
+ description: "Whether a scan is currently in progress"
591
+ type:
592
+ $ref: '#/definitions/ChannelType'
593
+ description: "Channel type being scanned"
594
+ dryRun:
595
+ type: boolean
596
+ description: "Whether this is a dry run (no changes will be saved)"
597
+ progress:
598
+ type: integer
599
+ description: "Scan progress percentage (0-100)"
600
+ currentChannel:
601
+ type: string
602
+ description: "Channel currently being scanned"
603
+ scanLog:
604
+ type: array
605
+ description: "Log of scan events"
606
+ items:
607
+ type: string
608
+ newCount:
609
+ type: integer
610
+ description: "Number of new channels found"
611
+ takeoverCount:
612
+ type: integer
613
+ description: "Number of existing channels merged"
614
+ result:
615
+ type: array
616
+ description: "Complete channel configuration"
617
+ items:
618
+ $ref: "#/definitions/ConfigChannelsItem"
619
+ startTime:
620
+ $ref: '#/definitions/UnixtimeMS'
621
+ updateTime:
622
+ $ref: '#/definitions/UnixtimeMS'
623
+
575
624
  Status:
576
625
  type: object
577
626
  properties:
package/bin/cli.sh ADDED
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+
3
+ cat <<EOF
4
+
5
+ CLI / PM2 support has been removed on @4.0.0.
6
+
7
+ Solutions:
8
+ - use Docker (recommended)
9
+ - https://github.com/Chinachu/Mirakurun/blob/release/4.0.0/doc/Platforms.md#docker-on-linux
10
+ - use PM2 manually (legacy)
11
+ - https://github.com/Chinachu/Mirakurun/blob/release/4.0.0/doc/Platforms.md#linux-w-pm2-legacy
12
+ - downgrade to @3.9.0-rc.4
13
+ - sudo npm install mirakurun@3.9.0-rc.4 -g --unsafe-perm --foreground-scripts --production
14
+
15
+ EOF
@@ -1,140 +1,197 @@
1
1
  - name: TOKYO MX
2
2
  type: GR
3
3
  channel: '16'
4
+ isDisabled: true
4
5
 
5
6
  - name: フジテレビ
6
7
  type: GR
7
8
  channel: '21'
9
+ isDisabled: true
8
10
 
9
11
  - name: TBS
10
12
  type: GR
11
13
  channel: '22'
14
+ isDisabled: true
12
15
 
13
- - name: テレビ東京
16
+ - name: テレ東
14
17
  type: GR
15
18
  channel: '23'
19
+ isDisabled: true
16
20
 
17
21
  - name: テレビ朝日
18
22
  type: GR
19
23
  channel: '24'
24
+ isDisabled: true
20
25
 
21
26
  - name: 日テレ
22
27
  type: GR
23
28
  channel: '25'
29
+ isDisabled: true
24
30
 
25
- - name: NHKEテレ・東京
31
+ - name: NHKEテレ
26
32
  type: GR
27
33
  channel: '26'
34
+ isDisabled: true
28
35
 
29
- - name: NHK総合・東京
36
+ - name: NHK総合
30
37
  type: GR
31
38
  channel: '27'
39
+ isDisabled: true
32
40
 
33
- - name: NHK BS1
41
+ - name: BS朝日1
34
42
  type: BS
35
- channel: BS15_0
36
- serviceId: 101
43
+ channel: BS01_0
44
+ serviceId: 151
45
+ isDisabled: true
37
46
 
38
- - name: NHK BS1 (Sub)
47
+ - name: BS朝日2
39
48
  type: BS
40
- channel: BS15_0
41
- serviceId: 102
49
+ channel: BS01_0
50
+ serviceId: 152
51
+ isDisabled: true
52
+
53
+ - name: BS朝日3
54
+ type: BS
55
+ channel: BS01_0
56
+ serviceId: 153
57
+ isDisabled: true
58
+
59
+ - name: BS-TBS
60
+ type: BS
61
+ channel: BS01_1
62
+ serviceId: 161
63
+ isDisabled: true
64
+
65
+ - name: BS-TBS
66
+ type: BS
67
+ channel: BS01_1
68
+ serviceId: 162
69
+ isDisabled: true
70
+
71
+ - name: BS-TBS
72
+ type: BS
73
+ channel: BS01_1
74
+ serviceId: 163
75
+ isDisabled: true
76
+
77
+ - name: BSテレ東
78
+ type: BS
79
+ channel: BS01_2
80
+ serviceId: 171
81
+ isDisabled: true
82
+
83
+ - name: BSテレ東2
84
+ type: BS
85
+ channel: BS01_2
86
+ serviceId: 172
87
+ isDisabled: true
88
+
89
+ - name: BSテレ東3
90
+ type: BS
91
+ channel: BS01_2
92
+ serviceId: 173
93
+ isDisabled: true
42
94
 
43
- - name: NHKBSプレミアム
95
+ - name: BS11イレブン
44
96
  type: BS
45
- channel: BS03_1
46
- serviceId: 103
97
+ channel: BS09_0
98
+ serviceId: 211
99
+ isDisabled: true
47
100
 
48
- - name: NHKBSプレミアム
101
+ - name: BS12トゥエルビ
49
102
  type: BS
50
- channel: BS03_1
51
- serviceId: 104
103
+ channel: BS09_2
104
+ serviceId: 222
105
+ isDisabled: true
52
106
 
53
107
  - name: BS日テレ
54
108
  type: BS
55
109
  channel: BS13_0
56
110
  serviceId: 141
111
+ isDisabled: true
57
112
 
58
113
  - name: BS日テレ
59
114
  type: BS
60
115
  channel: BS13_0
61
116
  serviceId: 142
117
+ isDisabled: true
62
118
 
63
- - name: BS朝日1
64
- type: BS
65
- channel: BS01_0
66
- serviceId: 151
67
-
68
- - name: BS朝日2
119
+ - name: BS日テレ
69
120
  type: BS
70
- channel: BS01_0
71
- serviceId: 152
121
+ channel: BS13_0
122
+ serviceId: 143
123
+ isDisabled: true
72
124
 
73
- - name: BS-TBS
125
+ - name: BSフジ・181
74
126
  type: BS
75
- channel: BS01_1
76
- serviceId: 161
127
+ channel: BS13_1
128
+ serviceId: 181
129
+ isDisabled: true
77
130
 
78
- - name: BSテレ東
131
+ - name: BSフジ・182
79
132
  type: BS
80
- channel: BS01_2
81
- serviceId: 171
133
+ channel: BS13_1
134
+ serviceId: 182
135
+ isDisabled: true
82
136
 
83
- - name: BSフジ・181
137
+ - name: BSフジ・183
84
138
  type: BS
85
139
  channel: BS13_1
86
- serviceId: 181
140
+ serviceId: 183
141
+ isDisabled: true
87
142
 
88
- - name: WOWOWプライム
143
+ - name: 放送大学テレビ
89
144
  type: BS
90
- channel: BS03_0
91
- serviceId: 191
145
+ channel: BS13_2
146
+ serviceId: 231
92
147
  isDisabled: true
93
148
 
94
- - name: WOWOWライブ
149
+ - name: 放送大学テレビ
95
150
  type: BS
96
- channel: BS05_0
97
- serviceId: 192
151
+ channel: BS13_2
152
+ serviceId: 232
98
153
  isDisabled: true
99
154
 
100
- - name: WOWOWシネマ
155
+ - name: NHK BS
101
156
  type: BS
102
- channel: BS05_1
103
- serviceId: 193
157
+ channel: BS15_0
158
+ serviceId: 101
104
159
  isDisabled: true
105
160
 
106
- - name: BS11イレブン
161
+ - name: NHK BS
107
162
  type: BS
108
- channel: BS09_0
109
- serviceId: 211
163
+ channel: BS15_0
164
+ serviceId: 102
165
+ isDisabled: true
110
166
 
111
- - name: BSスカパー!
167
+ - name: BS10
112
168
  type: BS
113
- channel: BS11_1
114
- serviceId: 241
169
+ channel: BS15_2
170
+ serviceId: 200
171
+ isDisabled: true
115
172
 
116
- - name: テレ朝チャンネル1
117
- type: CS
118
- channel: CS2
119
- serviceId: 298
173
+ - name: BSよしもと
174
+ type: BS
175
+ channel: BS23_1
176
+ serviceId: 265
120
177
  isDisabled: true
121
178
 
122
- - name: テレ朝チャンネル2
123
- type: CS
124
- channel: CS2
125
- serviceId: 299
179
+ - name: BS松竹東急
180
+ type: BS
181
+ channel: BS23_3
182
+ serviceId: 260
126
183
  isDisabled: true
127
184
 
128
- - name: 日テレプラス
185
+ - name: ショップチャンネル
129
186
  type: CS
130
- channel: CS24
131
- serviceId: 300
187
+ channel: CS8
188
+ serviceId: 55
132
189
  isDisabled: true
133
190
 
134
- - name: AT-X
191
+ - name: QVC
135
192
  type: CS
136
- channel: CS16
137
- serviceId: 333
193
+ channel: CS22
194
+ serviceId: 161
138
195
  isDisabled: true
139
196
 
140
197
  - name: BS SPTV
@@ -143,17 +200,3 @@
143
200
  serviceId: 33353
144
201
  satellite: JCSAT3A
145
202
  isDisabled: true
146
-
147
- - name: AT-X HD
148
- type: SKY
149
- channel: ATXHD
150
- serviceId: 33435
151
- satellite: JCSAT3A
152
- isDisabled: true
153
-
154
- - name: AXN HD
155
- type: SKY
156
- channel: AXNHD
157
- serviceId: 33418
158
- satellite: JCSAT4A
159
- isDisabled: true