Skip to content

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
SLOBS-Release committed Jan 8, 2025
2 parents 7dce190 + 0211d5b commit 4647bb9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/services/highlighter/ai-highlighter/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ export class AiHighlighterUpdater {
*/
private getManifestUrl(): string {
if (Utils.getHighlighterEnvironment() === 'staging') {
return 'https://cdn-highlighter-builds.streamlabs.com/staging/manifest_win_x86_64.json';
const cacheBuster = Math.floor(Date.now() / 1000);
return `https://cdn-highlighter-builds.streamlabs.com/staging/manifest_win_x86_64.json?t=${cacheBuster}`;
} else {
return 'https://cdn-highlighter-builds.streamlabs.com/manifest_win_x86_64.json';
return 'https://cdn-highlighter-builds.streamlabs.com/production/manifest_win_x86_64.json';
}
}
/**
Expand Down Expand Up @@ -141,7 +142,10 @@ export class AiHighlighterUpdater {
await fs.readFile(this.manifestPath, 'utf-8'),
) as IAIHighlighterManifest;

if (newManifest.version !== currentManifest.version) {
if (
newManifest.version !== currentManifest.version ||
newManifest.timestamp > currentManifest.timestamp
) {
console.log(
`new highlighter version available. ${currentManifest.version} -> ${newManifest.version}`,
);
Expand Down
4 changes: 4 additions & 0 deletions app/services/highlighter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,10 @@ export class HighlighterService extends PersistentStatefulService<IHighlighterSt

// console.log('recording Alreadyt running?:', this.streamingService.views.isRecording);

this.usageStatisticsService.recordAnalyticsEvent('AIHighlighter', {
type: 'AiRecordingStarted',
});

if (this.streamingService.views.isRecording) {
// console.log('Recording is already running');
} else {
Expand Down
5 changes: 5 additions & 0 deletions app/services/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ export default class Utils {
static isDevMode() {
return Utils.env.NODE_ENV !== 'production';
}

static getHighlighterEnvironment(): 'production' | 'staging' | 'local' {
if (process.argv.includes('--bundle-qa')) {
return 'staging';
}

if (process.env.HIGHLIGHTER_ENV !== 'staging' && process.env.HIGHLIGHTER_ENV !== 'local') {
return 'production';
}
Expand Down

0 comments on commit 4647bb9

Please sign in to comment.