Made usage of wrong account license more apparent

This commit is contained in:
RemixDev 2022-08-19 22:47:50 +02:00
parent a63826a369
commit cef3e3d8d4
3 changed files with 36 additions and 3 deletions

View File

@ -245,9 +245,22 @@ socket.on('alreadyInQueue', function (data) {
toast(i18n.t('toasts.alreadyInQueue', { item: data.title }), 'playlist_add_check')
})
socket.on('loginNeededToDownload', function () {
socket.on('queueErrorNotLoggedIn', function () {
toast(i18n.t('toasts.loginNeededToDownload'), 'report')
})
const bitrateLabels = {
15: '360 HQ',
14: '360 MQ',
13: '360 LQ',
9: 'FLAC',
3: '320kbps',
1: '128kbps',
8: '128kbps',
0: 'MP3'
}
socket.on('queueErrorCantStream', function (bitrate) {
toast(i18n.t('toasts.queueErrorCantStream', {bitrate: bitrateLabels[bitrate]}), 'report')
})
socket.on('startGeneratingItems', function (data) {
toast(i18n.t('toasts.startGeneratingItems', { n: data.total }), 'loading', false, 'batch_' + data.uuid)

View File

@ -13,7 +13,9 @@
<td>{{ error.data.id }}</td>
<td>{{ error.data.artist }}</td>
<td>{{ error.data.title }}</td>
<td><span :title="error.stack">{{ error.errid ? $t(`errors.ids.${error.errid}`) : error.message }}</span></td>
<td><span :title="error.stack">
{{ error.errid ? $t(`errors.ids.${error.errid}`, { 'bitrate': downloadBitrate }) : error.message }}
</span></td>
</tr>
</table>
<div v-if="postErrors.length >= 1">
@ -38,6 +40,20 @@
import { mapGetters } from 'vuex'
export default {
data() {
return {
BITRATE_LABELS: {
15: '360 HQ',
14: '360 MQ',
13: '360 LQ',
9: 'FLAC',
3: '320kbps',
1: '128kbps',
8: '128kbps',
0: 'MP3'
}
}
},
computed: {
...mapGetters(['getErrors']),
title() {
@ -56,6 +72,9 @@ export default {
if(error.type === "post") errors.push(error)
})
return errors
},
downloadBitrate(){
return this.BITRATE_LABELS[this.getErrors.bitrate]
}
}
}

View File

@ -135,7 +135,7 @@ const en = {
notAvailableNoAlternative: "Track not available on Deezer's servers and no alternative found!",
noSpaceLeft: 'No space left on the device!',
albumDoesntExists: "Track's album doesn't exist, failed to gather info.",
wrongLicense: "Your account can't stream the track at the desired bitrate.",
wrongLicense: "Your account can't stream tracks in {bitrate}.",
wrongGeolocation: "Your account can't stream the track from your current country.",
wrongGeolocationNoAlternative:
"Your account can't stream the track from your current country and no alternative found."
@ -216,6 +216,7 @@ const en = {
startConvertingSpotifyPlaylist: 'Converting spotify tracks to Deezer tracks',
finishConvertingSpotifyPlaylist: 'Spotify playlist converted',
loginNeededToDownload: 'You need to log in to download tracks!',
queueErrorCantStream: `Your account can't stream at {bitrate}!`,
deezerNotAvailable: 'Deezer is not available in your country. You should use a VPN.',
deezerNotReachable: "The app can't reach Deezer. Check your internet connection, your firewall or your antivirus.",
startGeneratingItems: 'Processing {n} items...',