Added radio play limit for non-supporters

This commit is contained in:
Eduard Urbach 2018-06-28 17:07:14 +09:00
parent 050355d8ae
commit e5e40750c0
3 changed files with 7 additions and 13 deletions

10
.vscode/tasks.json vendored
View File

@ -1,10 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-p", "."],
"showOutput": "silent",
"problemMatcher": "$tsc"
}

View File

@ -63,6 +63,12 @@ export default class AudioPlayer {
// Stop current track // Stop current track
this.stop() this.stop()
// Check if we have PRO status after 5 plays
if(this.playId >= 6 && this.arn.user.dataset.pro !== "true") {
this.arn.statusMessage.showInfo("Please buy a PRO account to get unlimited access the Anime Radio.", -1)
return
}
this.arn.currentSoundTrackId = trackId this.arn.currentSoundTrackId = trackId
this.arn.markPlayingSoundTrack() this.arn.markPlayingSoundTrack()
this.arn.loading(true) this.arn.loading(true)

View File

@ -6,7 +6,5 @@
"baseUrl": ".", "baseUrl": ".",
"strict": false, "strict": false,
"strictFunctionTypes": false "strictFunctionTypes": false
}, }
"compileOnSave": true,
"buildOnSave": false
} }