Skip to content

Commit

Permalink
fixes #427
Browse files Browse the repository at this point in the history
  • Loading branch information
aza547 committed Jun 27, 2023
1 parent 06a0469 commit 4a7d702
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Improve home page aesthetics.
- [Issue 427](https://github.com/aza547/wow-recorder/issues/427) - Include the player name in the video file name.

### Fixed
- Fix category selection chip which would do nothing when used on the settings/scene editor pages.
Expand Down
8 changes: 7 additions & 1 deletion src/activitys/ArenaMatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export default class ArenaMatch extends Activity {
}

getFileName() {
return `${this.category} ${this.zoneName} (${this.resultInfo})`;
let fileName = `${this.category} ${this.zoneName} (${this.resultInfo})`;

if (this.player.name !== undefined) {
fileName = `${this.player.name} - ${fileName}`;
}

return fileName;
}
}
8 changes: 7 additions & 1 deletion src/activitys/Battleground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ export default class Battleground extends Activity {

getFileName(): string {
const resultText = this.estimateResult() ? 'Win' : 'Loss';
return `${this.battlegroundName} (${resultText})`;
let fileName = `${this.battlegroundName} (${resultText})`;

if (this.player.name !== undefined) {
fileName = `${this.player.name} - ${fileName}`;
}

return fileName;
}
}
8 changes: 7 additions & 1 deletion src/activitys/ChallengeModeDungeon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ export default class ChallengeModeDungeon extends Activity {
}

getFileName(): string {
return `${this.dungeonName} +${this.level} (${this.resultInfo})`;
let fileName = `${this.dungeonName} +${this.level} (${this.resultInfo})`;

if (this.player.name !== undefined) {
fileName = `${this.player.name} - ${fileName}`;
}

return fileName;
}
}
8 changes: 7 additions & 1 deletion src/activitys/RaidEncounter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ export default class RaidEncounter extends Activity {
}

getFileName(): string {
return `${this.raid.name}, ${this.encounterName} [${this.difficulty.difficulty}] (${this.resultInfo})`;
let fileName = `${this.raid.name}, ${this.encounterName} [${this.difficulty.difficulty}] (${this.resultInfo})`;

if (this.player.name !== undefined) {
fileName = `${this.player.name} - ${fileName}`;
}

return fileName;
}
}
8 changes: 7 additions & 1 deletion src/activitys/SoloShuffle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ export default class SoloShuffle extends Activity {
}

getFileName() {
return `${this.category} ${this.zoneName} (${this.resultInfo})`;
let fileName = `${this.category} ${this.zoneName} (${this.resultInfo})`;

if (this.player.name !== undefined) {
fileName = `${this.player.name} - ${fileName}`;
}

return fileName;
}
}

0 comments on commit 4a7d702

Please sign in to comment.