Skip to content

Commit 781ebdd

Browse files
author
lijiahao
committed
v1.9.4
1 parent 447be0a commit 781ebdd

8 files changed

Lines changed: 126 additions & 70 deletions

File tree

app/background.js

Lines changed: 80 additions & 29 deletions
Large diffs are not rendered by default.

flatpak/io.github.Geocld.XStreamingDesktop.metainfo.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
</screenshot>
3535
</screenshots>
3636
<releases>
37+
<release version="1.9.4" date="2026-01-27">
38+
<description>
39+
<ul>
40+
<li>Adjust xCloud self games show.</li>
41+
<li>Improve stablity of connection.</li>
42+
</ul>
43+
</description>
44+
</release>
3745
<release version="1.9.3" date="2025-12-05">
3846
<description>
3947
<ul>

main/helpers/xcloudapi.ts

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default class xCloudApi {
3030
_exchangeCounter = 0;
3131
_exchangeUrl = "";
3232
_currentGame = "";
33+
isStoped = false;
3334

3435
constructor(
3536
application: Application,
@@ -201,10 +202,12 @@ export default class xCloudApi {
201202
}
202203

203204
stopStream(sessionId) {
205+
this.isStoped = true;
204206
return this.get("/v5/sessions/" + this._type + "/" + sessionId, "DELETE");
205207
}
206208

207209
startStream(target: string) {
210+
this.isStoped = false;
208211
const settings: any = this._application._store.get(
209212
"settings",
210213
defaultSettings
@@ -325,10 +328,30 @@ export default class xCloudApi {
325328
)
326329
.then(() => {
327330
this.get("/v5/sessions/" + this._type + "/" + sessionId + "/sdp")
328-
.then((sdpResult: exchangeResult) => {
329-
const exchangeSdp = JSON.parse(sdpResult.exchangeResponse);
330-
331-
resolve(exchangeSdp);
331+
.then((sdpResult: any) => {
332+
if (sdpResult && sdpResult.exchangeResponse) {
333+
const exchangeSdp = JSON.parse(sdpResult.exchangeResponse);
334+
resolve(exchangeSdp);
335+
} else {
336+
const checkInterval = setInterval(() => {
337+
if (this.isStoped) {
338+
clearInterval(checkInterval);
339+
return;
340+
}
341+
this.get("/v5/sessions/" + this._type + "/" + sessionId + "/sdp")
342+
.then((sdpResult2: any) => {
343+
if (sdpResult2 && sdpResult2.exchangeResponse) {
344+
const exchangeSdp = JSON.parse(sdpResult2.exchangeResponse);
345+
clearInterval(checkInterval);
346+
resolve(exchangeSdp);
347+
}
348+
}).catch(e => {
349+
clearInterval(checkInterval);
350+
reject(e);
351+
})
352+
}, 1000);
353+
}
354+
332355
})
333356
.catch((error) => {
334357
reject(error);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"name": "xstreaming",
44
"description": "xstreaming",
5-
"version": "1.9.3",
5+
"version": "1.9.4",
66
"author": "Geocld <lijiahao5372@gmail.com>",
77
"main": "app/background.js",
88
"scripts": {

renderer/components/Audio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function Audio(props) {
2828
label={t("Volume")}
2929
step={1}
3030
maxValue={10}
31-
minValue={1}
31+
minValue={0}
3232
value={props.volume}
3333
className="max-w-md"
3434
onChange={value => {

renderer/components/TitleModal.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,10 @@ function TitleModal(props) {
3636
let isByorg = false;
3737
if (
3838
titleItem &&
39-
!titleItem.XCloudTitleId &&
4039
titleItem.details &&
41-
titleItem.details.programs
40+
!titleItem.details.hasEntitlement
4241
) {
43-
if (titleItem.details.programs.indexOf('BYOG') > -1) {
44-
isByorg = true;
45-
}
42+
isByorg = true;
4643
}
4744

4845
return (

renderer/pages/[locale]/stream.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,11 @@ function Stream() {
383383
}, 1000);
384384
}
385385

386-
const xboxTitleId = window._xboxTitleId || ''
387-
// inputConfigs
388-
Ipc.send("streaming", "inputConfigs", {
389-
xboxTitleId,
390-
})
386+
// const xboxTitleId = window._xboxTitleId || ''
387+
// // inputConfigs
388+
// Ipc.send("streaming", "inputConfigs", {
389+
// xboxTitleId,
390+
// })
391391
}, 500);
392392
} else if (event.state === "closed") {
393393
console.log(":: We are disconnected!");

renderer/pages/[locale]/xcloud.tsx

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ function Xcloud() {
2323
const [titles, setTitles] = useState([]);
2424
const [newTitles, setNewTitles] = useState([]);
2525
const [recentTitles, setRecentNewTitles] = useState([]);
26-
const [orgTitles, setOrgTitles] = useState([]);
2726
const currentTitles = useRef([]);
2827
const [keyword, setKeyword] = useState("");
2928

@@ -32,7 +31,6 @@ function Xcloud() {
3231

3332
const LOCAL_TITLES = 'local-titles';
3433
const LOCAL_NEW_TITLES = 'local-new-titles';
35-
const LOCAL_ORG_TITLES = 'local-org-titles';
3634
const LOCAL_RECENT_TITLES = 'local-recent-titles';
3735

3836
useEffect(() => {
@@ -135,24 +133,10 @@ function Xcloud() {
135133
localStorage.setItem(LOCAL_TITLES, JSON.stringify(_titles));
136134

137135
const _titleMap = {};
138-
const _orgTitles = [];
139-
_titles.forEach((item) => {
136+
_titles.forEach(item => {
140137
_titleMap[item.productId] = item;
141-
142-
// Get org games
143-
if (
144-
!item.XCloudTitleId &&
145-
item.details &&
146-
item.details.programs &&
147-
item.details.programs.indexOf('BYOG') > -1
148-
) {
149-
_orgTitles.push(item);
150-
}
151138
});
152139

153-
setOrgTitles(_orgTitles);
154-
localStorage.setItem(LOCAL_ORG_TITLES, JSON.stringify(_orgTitles));
155-
156140
// console.log("_titleMap:", _titleMap);
157141

158142
// Get new games
@@ -220,18 +204,15 @@ function Xcloud() {
220204
// Get xcloud data from cache
221205
let cacheTitles: any = localStorage.getItem(LOCAL_TITLES) || '[]';
222206
let cacheNewTitles: any = localStorage.getItem(LOCAL_NEW_TITLES) || '[]';
223-
let cacheOrgTitles: any = localStorage.getItem(LOCAL_ORG_TITLES) || '[]';
224207
let cacheRecentTitles: any = localStorage.getItem(LOCAL_RECENT_TITLES) || '[]';
225208

226209
try {
227210
cacheTitles = JSON.parse(cacheTitles);
228211
cacheNewTitles = JSON.parse(cacheNewTitles);
229-
cacheOrgTitles = JSON.parse(cacheOrgTitles);
230212
cacheRecentTitles = JSON.parse(cacheRecentTitles);
231213

232-
if (cacheTitles.length || cacheNewTitles.length || cacheOrgTitles.length || cacheRecentTitles.length) {
214+
if (cacheTitles.length || cacheNewTitles.length || cacheRecentTitles.length) {
233215
setTitles(cacheTitles);
234-
setOrgTitles(cacheOrgTitles);
235216
setNewTitles(cacheNewTitles);
236217
setRecentNewTitles(cacheRecentTitles);
237218
setLoading(false);
@@ -290,9 +271,6 @@ function Xcloud() {
290271
case "Newest":
291272
currentTitles.current = newTitles;
292273
break;
293-
case "Own":
294-
currentTitles.current = orgTitles;
295-
break;
296274
case "All":
297275
currentTitles.current = titles;
298276
break;
@@ -330,7 +308,6 @@ function Xcloud() {
330308
<Tabs aria-label="Options" onSelectionChange={handleTabChange}>
331309
<Tab key="Recently" title={t("Recently")}></Tab>
332310
<Tab key="Newest" title={t("Newest")}></Tab>
333-
<Tab key="Own" title={t("Own")}></Tab>
334311
<Tab key="All" title={t("All")}></Tab>
335312
</Tabs>
336313
</div>

0 commit comments

Comments
 (0)