mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-31 04:58:09 +00:00
release: v1.9.0 — command sequencing, episode-aware sync, echo suppression
- Add per-peer monotonically increasing seq numbers (localSeq + lastSeqBySender) - Server relays seq for stale command detection (backward compatible) - Replace expectedEvents (1500ms timeout) with _suppressTimers (per-type, 300ms) - Fix FORCE_SYNC_ACK missing seq (stale-ACK guard) - Fix episode lobby readyPeers asymmetry (initiator now included) - Add extractEpisodeId() parsing S01E01, Season 1 Ep 1, Folge 5, Ep. 3, #42 - Add isDifferentEpisode() guard blocking cross-episode sync commands - Add sameEpisode() for format-tolerant lobby title matching - Guard controlled via autoSyncNextEpisode setting - Reduce reactive lock 1000ms → 300ms - Fix routeToContent unbounded retry (max 3 attempts) - Fix server bcrypt.hash failure crashing join flow - Fix sameEpisode(null, title) returning true - Fix forceSyncTimeout leak on rapid force sync clicks - Persist lastSeqBySender across service worker restarts - Bump version: 1.8.10 → 1.9.0
This commit is contained in:
+11
-1
@@ -976,6 +976,10 @@ async function routeToContent(action, payload) {
|
|||||||
const actionTimestamp = payload?.actionTimestamp || Date.now();
|
const actionTimestamp = payload?.actionTimestamp || Date.now();
|
||||||
const commandSenderId = payload?.senderId || null;
|
const commandSenderId = payload?.senderId || null;
|
||||||
|
|
||||||
|
_routeToContentInternal(tabId, action, payload, actionTimestamp, commandSenderId, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _routeToContentInternal(tabId, action, payload, actionTimestamp, commandSenderId, retries) {
|
||||||
chrome.tabs.sendMessage(tabId, {
|
chrome.tabs.sendMessage(tabId, {
|
||||||
type: 'SERVER_COMMAND',
|
type: 'SERVER_COMMAND',
|
||||||
action,
|
action,
|
||||||
@@ -983,12 +987,18 @@ async function routeToContent(action, payload) {
|
|||||||
actionTimestamp,
|
actionTimestamp,
|
||||||
commandSenderId
|
commandSenderId
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
if (retries >= 3) {
|
||||||
|
addLog(`Content Script not responding in tab ${tabId} after ${retries} retries`, 'warn');
|
||||||
|
currentTabId = null;
|
||||||
|
updateBadgeStatus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (err.message.includes('Receiving end does not exist') || err.message.includes('Extension context invalidated')) {
|
if (err.message.includes('Receiving end does not exist') || err.message.includes('Extension context invalidated')) {
|
||||||
chrome.scripting.executeScript({
|
chrome.scripting.executeScript({
|
||||||
target: { tabId },
|
target: { tabId },
|
||||||
files: ['content.js']
|
files: ['content.js']
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
setTimeout(() => routeToContent(action, payload), 500);
|
setTimeout(() => _routeToContentInternal(tabId, action, payload, actionTimestamp, commandSenderId, retries + 1), 500);
|
||||||
}).catch(_err => {
|
}).catch(_err => {
|
||||||
addLog(`Auto-reinject failed for tab ${tabId}`, 'warn');
|
addLog(`Auto-reinject failed for tab ${tabId}`, 'warn');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "KoalaSync",
|
"name": "KoalaSync",
|
||||||
"version": "1.8.10",
|
"version": "1.9.0",
|
||||||
"description": "Synchronize video playback on YouTube, Netflix, Emby, Jellyfin, and any HTML5 site in real-time with friends.",
|
"description": "Synchronize video playback on YouTube, Netflix, Emby, Jellyfin, and any HTML5 site in real-time with friends.",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"storage",
|
"storage",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "koalasync",
|
"name": "koalasync",
|
||||||
"version": "1.8.10",
|
"version": "1.9.0",
|
||||||
"description": "KoalaSync Build Scripts",
|
"description": "KoalaSync Build Scripts",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -342,6 +342,11 @@ io.on('connection', (socket) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!room) {
|
||||||
|
socket.emit(EVENTS.ERROR, { message: "Join error" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!createdByMe) {
|
if (!createdByMe) {
|
||||||
if (room.passwordHash) {
|
if (room.passwordHash) {
|
||||||
if (!password || !(await bcrypt.compare(password, room.passwordHash))) {
|
if (!password || !(await bcrypt.compare(password, room.passwordHash))) {
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const PROTOCOL_VERSION = "1.0.0";
|
export const PROTOCOL_VERSION = "1.0.0";
|
||||||
export const APP_VERSION = "1.8.6";
|
export const APP_VERSION = "1.9.0";
|
||||||
|
|
||||||
export const OFFICIAL_SERVER_URL = 'wss://syncserver.koalastuff.net';
|
export const OFFICIAL_SERVER_URL = 'wss://syncserver.koalastuff.net';
|
||||||
export const OFFICIAL_LANDING_PAGE_URL = 'https://sync.koalastuff.net';
|
export const OFFICIAL_LANDING_PAGE_URL = 'https://sync.koalastuff.net';
|
||||||
|
|||||||
Reference in New Issue
Block a user