kitowall 6.2.0 → 6.9.0
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/dist/core/live.js +33 -1
- package/package.json +1 -1
package/dist/core/live.js
CHANGED
|
@@ -1864,6 +1864,7 @@ async function liveApply(opts) {
|
|
|
1864
1864
|
'--video', item.file_path
|
|
1865
1865
|
];
|
|
1866
1866
|
let coexistEntered = false;
|
|
1867
|
+
let snapshotId;
|
|
1867
1868
|
try {
|
|
1868
1869
|
await (0, exec_1.run)(bin, setVideoArgs, { timeoutMs: 120000 });
|
|
1869
1870
|
// Keep live authority persistent across session restarts.
|
|
@@ -1886,8 +1887,21 @@ async function liveApply(opts) {
|
|
|
1886
1887
|
await waitForRendercoreServiceActive();
|
|
1887
1888
|
}
|
|
1888
1889
|
// Switch wallpaper authority only after rendercore is confirmed active.
|
|
1889
|
-
await (0, workshop_1.workshopCoexistenceEnter)();
|
|
1890
|
+
const coexist = await (0, workshop_1.workshopCoexistenceEnter)();
|
|
1890
1891
|
coexistEntered = true;
|
|
1892
|
+
snapshotId = coexist.snapshot_id;
|
|
1893
|
+
(0, workshop_1.workshopSetActive)({
|
|
1894
|
+
mode: 'livewallpaper',
|
|
1895
|
+
started_at: Date.now(),
|
|
1896
|
+
snapshot_id: snapshotId,
|
|
1897
|
+
instances: {
|
|
1898
|
+
[monitor]: {
|
|
1899
|
+
id: item.id,
|
|
1900
|
+
backend: 'rendercore',
|
|
1901
|
+
type: 'video'
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
});
|
|
1891
1905
|
withLiveLock(() => {
|
|
1892
1906
|
const current = readIndex();
|
|
1893
1907
|
const updatedItems = current.items.map(v => (v.id === item.id ? { ...v, last_applied_at: nowUnix() } : v));
|
|
@@ -2104,7 +2118,13 @@ async function liveServiceAutostart(action) {
|
|
|
2104
2118
|
out = integratedRendercoreStart(bin);
|
|
2105
2119
|
}
|
|
2106
2120
|
else if (action === 'stop' || action === 'disable') {
|
|
2121
|
+
const stopped = await (0, workshop_1.workshopStop)({ all: true });
|
|
2107
2122
|
out = integratedRendercoreStop(bin);
|
|
2123
|
+
out.stdout = [
|
|
2124
|
+
out.stdout.trim(),
|
|
2125
|
+
`restored_units=${stopped.restored_units.join(',') || '-'}`,
|
|
2126
|
+
`stopped_instances=${stopped.stopped_instances.join(',') || '-'}`
|
|
2127
|
+
].filter(Boolean).join('\n');
|
|
2108
2128
|
}
|
|
2109
2129
|
else {
|
|
2110
2130
|
integratedRendercoreStop(bin);
|
|
@@ -2148,7 +2168,13 @@ async function liveServiceAutostart(action) {
|
|
|
2148
2168
|
out = await runSystemctlUser(['enable', 'kitsune-rendercore.service']);
|
|
2149
2169
|
}
|
|
2150
2170
|
else if (action === 'disable') {
|
|
2171
|
+
const stopped = await (0, workshop_1.workshopStop)({ all: true });
|
|
2151
2172
|
out = await runSystemctlUser(['disable', '--now', 'kitsune-rendercore.service'], true);
|
|
2173
|
+
out.stdout = [
|
|
2174
|
+
out.stdout.trim(),
|
|
2175
|
+
`restored_units=${stopped.restored_units.join(',') || '-'}`,
|
|
2176
|
+
`stopped_instances=${stopped.stopped_instances.join(',') || '-'}`
|
|
2177
|
+
].filter(Boolean).join('\n');
|
|
2152
2178
|
}
|
|
2153
2179
|
else if (action === 'start') {
|
|
2154
2180
|
const binPath = await resolveHostExecutablePath(bin);
|
|
@@ -2157,7 +2183,13 @@ async function liveServiceAutostart(action) {
|
|
|
2157
2183
|
out = await runSystemctlUser(['start', 'kitsune-rendercore.service']);
|
|
2158
2184
|
}
|
|
2159
2185
|
else if (action === 'stop') {
|
|
2186
|
+
const stopped = await (0, workshop_1.workshopStop)({ all: true });
|
|
2160
2187
|
out = await runSystemctlUser(['stop', 'kitsune-rendercore.service'], true);
|
|
2188
|
+
out.stdout = [
|
|
2189
|
+
out.stdout.trim(),
|
|
2190
|
+
`restored_units=${stopped.restored_units.join(',') || '-'}`,
|
|
2191
|
+
`stopped_instances=${stopped.stopped_instances.join(',') || '-'}`
|
|
2192
|
+
].filter(Boolean).join('\n');
|
|
2161
2193
|
}
|
|
2162
2194
|
else {
|
|
2163
2195
|
const binPath = await resolveHostExecutablePath(bin);
|