Skip to content

Commit

Permalink
add PS5 error response handling for install requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gkiokan committed Feb 24, 2024
1 parent c88187d commit d2d0f57
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "2.10.1",
"version": "2.10.2",
"name": "PS4RemotePKGSenderV2",
"productName": "PS4 Remote PKG Sender V2",
"author": "Gkiokan <[email protected]>",
Expand Down
29 changes: 20 additions & 9 deletions src/renderer/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,34 @@ export default {
// validate install response
if( data && data.res ){
// set the state here
this.setStatus(file, "Sent to PS5")
this.setStatus(file, "Sent to PS5")
let code = parseInt(data.res)
// success
if( parseInt(data.res) == 0 )
this.$message({
if( code == 0 ){
this.log(file.name + ' install request successfull', file.url)
return this.$message({
dangerouslyUseHTMLString: true,
message: `Install Request Success for <br>${file.name}`,
type: "success"
})
}
if( code == -2135809020 ){
this.log(file.name + ' file at URL not found', file.url)
return this.$message({
dangerouslyUseHTMLString: true,
message: `Error ${code} | PKG file response 404. Check Server heartbeat. <br>${file.name}`,
type: "error"
})
}
// something else, maybe in queue, maybe full storage, maybe whatever
else
this.$message({
dangerouslyUseHTMLString: true,
message: `Response Code ${data.res} for <br>${file.name}`,
type: "info"
})
this.$message({
dangerouslyUseHTMLString: true,
message: `Response Code ${data.res} for <br>${file.name}`,
type: "info"
})
}
else {
this.$message({ message: `Unknown Response. Please check Logs.`, type: "warning" })
Expand Down
1 change: 1 addition & 0 deletions src/test/net-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var server = net.createServer( function(socket){
// dynamic response
let response = {
res: "0",
// res: "-2135809020",
// res: (new Date).getTime()
// nope: true,
}
Expand Down

0 comments on commit d2d0f57

Please sign in to comment.