mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Fix video url parsing
This commit is contained in:
+7
-4
@@ -7588,6 +7588,7 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
this.updateVRLastLocation();
|
this.updateVRLastLocation();
|
||||||
this.getCurrentInstanceUserList();
|
this.getCurrentInstanceUserList();
|
||||||
|
this.lastVideoUrl = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.data.lastLocation$ = {
|
$app.data.lastLocation$ = {
|
||||||
@@ -7808,6 +7809,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.data.lastLocationDestination = '';
|
$app.data.lastLocationDestination = '';
|
||||||
$app.data.lastLocationDestinationTime = 0;
|
$app.data.lastLocationDestinationTime = 0;
|
||||||
|
$app.data.lastVideoUrl = '';
|
||||||
|
|
||||||
$app.methods.addGameLogEntry = function (gameLog, location) {
|
$app.methods.addGameLogEntry = function (gameLog, location) {
|
||||||
var userId = '';
|
var userId = '';
|
||||||
@@ -7951,6 +7953,10 @@ speechSynthesis.getVoices();
|
|||||||
database.addGamelogPortalSpawnToDatabase(entry);
|
database.addGamelogPortalSpawnToDatabase(entry);
|
||||||
break;
|
break;
|
||||||
case 'video-play':
|
case 'video-play':
|
||||||
|
if (this.lastVideoUrl === gameLog.videoUrl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.lastVideoUrl = gameLog.videoUrl;
|
||||||
this.addGameLogVideo(gameLog, location, userId);
|
this.addGameLogVideo(gameLog, location, userId);
|
||||||
return;
|
return;
|
||||||
case 'api-request':
|
case 'api-request':
|
||||||
@@ -9040,9 +9046,6 @@ speechSynthesis.getVoices();
|
|||||||
if (typeof gameLog.videoPos !== 'undefined') {
|
if (typeof gameLog.videoPos !== 'undefined') {
|
||||||
videoPos = gameLog.videoPos;
|
videoPos = gameLog.videoPos;
|
||||||
}
|
}
|
||||||
if (!this.isDanceWorld(location) && videoUrl === this.nowPlaying.url) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this.isDanceWorld(location) || gameLog.videoId === 'YouTube') {
|
if (!this.isDanceWorld(location) || gameLog.videoId === 'YouTube') {
|
||||||
// skip PyPyDance and VRDancing videos
|
// skip PyPyDance and VRDancing videos
|
||||||
try {
|
try {
|
||||||
@@ -9090,7 +9093,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.addGameLogPyPyDance = function (gameLog, location) {
|
$app.methods.addGameLogPyPyDance = function (gameLog, location) {
|
||||||
var data =
|
var data =
|
||||||
/VideoPlay\(PyPyDance\) "(.+?)",([\d.]+),([\d.]+),"(.+?)\s*(?:)?"/g.exec(
|
/VideoPlay\(PyPyDance\) "(.+?)",([\d.]+),([\d.]+),"(.*)"/g.exec(
|
||||||
gameLog.data
|
gameLog.data
|
||||||
);
|
);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user