diff --git a/src/app/common/settings/settings.base.ts b/src/app/common/settings/settings.base.ts index a1bba8000..5fcdebdc9 100644 --- a/src/app/common/settings/settings.base.ts +++ b/src/app/common/settings/settings.base.ts @@ -66,6 +66,5 @@ export abstract class SettingsBase { public abstract showLove: boolean; public abstract enableMultimediaKeys: boolean; public abstract downloadArtistInformationFromLastFm: boolean; - public abstract isMuted: boolean; public abstract downloadLyricsOnline: boolean; } diff --git a/src/app/common/settings/settings.ts b/src/app/common/settings/settings.ts index c3ab9e2d2..b4a7798c7 100644 --- a/src/app/common/settings/settings.ts +++ b/src/app/common/settings/settings.ts @@ -610,15 +610,6 @@ export class Settings implements SettingsBase { this.settings.set('downloadArtistInformationFromLastFm', v); } - // isMuted - public get isMuted(): boolean { - return this.settings.get('isMuted'); - } - - public set isMuted(v: boolean) { - this.settings.set('isMuted', v); - } - // downloadLyricsOnline public get downloadLyricsOnline(): boolean { return this.settings.get('downloadLyricsOnline'); @@ -890,10 +881,6 @@ export class Settings implements SettingsBase { this.settings.set('downloadArtistInformationFromLastFm', true); } - if (!this.settings.has('isMuted')) { - this.settings.set('isMuted', false); - } - if (!this.settings.has('downloadLyricsOnline')) { this.settings.set('downloadLyricsOnline', true); } diff --git a/src/app/services/playback/playback.service.ts b/src/app/services/playback/playback.service.ts index ed55a8718..4ee7a0fe1 100644 --- a/src/app/services/playback/playback.service.ts +++ b/src/app/services/playback/playback.service.ts @@ -7,12 +7,9 @@ import { AlbumModel } from '../album/album-model'; import { ArtistModel } from '../artist/artist-model'; import { ArtistType } from '../artist/artist-type'; import { GenreModel } from '../genre/genre-model'; - import { PlaylistModel } from '../playlist/playlist-model'; - import { TrackModel } from '../track/track-model'; import { TrackModels } from '../track/track-models'; - import { LoopMode } from './loop-mode'; import { PlaybackProgress } from './playback-progress'; import { PlaybackStarted } from './playback-started'; @@ -40,7 +37,6 @@ export class PlaybackService implements PlaybackServiceBase { private _isPlaying: boolean = false; private _canPause: boolean = false; private _canResume: boolean = true; - private _isMuted: boolean = false; private _volumeBeforeMute: number = 0; private subscription: Subscription = new Subscription(); @@ -337,15 +333,12 @@ export class PlaybackService implements PlaybackServiceBase { } public toggleMute(): void { - if (this._isMuted) { + if (this._volume === 0) { this.applyVolume(this._volumeBeforeMute > 0 ? this._volumeBeforeMute : 0.5); } else { this._volumeBeforeMute = this._volume; this.applyVolume(0); } - - this._isMuted = !this._isMuted; - this.settings.isMuted = this._isMuted; } private play(trackToPlay: TrackModel, isPlayingPreviousTrack: boolean): void { @@ -455,8 +448,7 @@ export class PlaybackService implements PlaybackServiceBase { } private applyVolumeFromSettings(): void { - this._isMuted = this.settings.isMuted; - this._volume = this._isMuted ? 0 : this.settings.volume; + this._volume = this.settings.volume; this.audioPlayer.setVolume(this._volume); } diff --git a/src/app/ui/components/volume-control/volume-control.component.html b/src/app/ui/components/volume-control/volume-control.component.html index f3f640cea..57929c069 100644 --- a/src/app/ui/components/volume-control/volume-control.component.html +++ b/src/app/ui/components/volume-control/volume-control.component.html @@ -1,5 +1,5 @@
-
+
diff --git a/src/assets/i18n/bg.json b/src/assets/i18n/bg.json index 1e22e6cc3..ba0a1b9c1 100644 --- a/src/assets/i18n/bg.json +++ b/src/assets/i18n/bg.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/cs.json b/src/assets/i18n/cs.json index 3f49d37d3..062cc1244 100644 --- a/src/assets/i18n/cs.json +++ b/src/assets/i18n/cs.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 1ab655f7e..8909ca2bc 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/el.json b/src/assets/i18n/el.json index 0827c619f..16749e5ea 100644 --- a/src/assets/i18n/el.json +++ b/src/assets/i18n/el.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index ad86f3beb..c4b95e6f5 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 0f8e479f0..b057d438e 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 6067a828a..77552addd 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -249,5 +249,7 @@ "no-lyrics": "Pas de paroles", "embedded-lyrics": "Paroles intégrées", "lrc-lyrics": "Paroles LRC", - "online-lyrics": "Paroles en ligne" + "online-lyrics": "Paroles en ligne", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/hr.json b/src/assets/i18n/hr.json index 52bcccaf7..db4bb70a2 100644 --- a/src/assets/i18n/hr.json +++ b/src/assets/i18n/hr.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/ja-JP.json b/src/assets/i18n/ja-JP.json index 51e919bcb..13f1338b7 100644 --- a/src/assets/i18n/ja-JP.json +++ b/src/assets/i18n/ja-JP.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 273ae5b37..9f60d31e5 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/ku.json b/src/assets/i18n/ku.json index 67c4be0ce..26c8aa177 100644 --- a/src/assets/i18n/ku.json +++ b/src/assets/i18n/ku.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index 3942200f6..c7b5f605e 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -249,5 +249,7 @@ "no-lyrics": "Geen songteksten", "embedded-lyrics": "Ingebedde songteksten", "lrc-lyrics": "LRC songteksten", - "online-lyrics": "Online songteksten" + "online-lyrics": "Online songteksten", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/pt-BR.json b/src/assets/i18n/pt-BR.json index 3aca37384..0ce9c7097 100644 --- a/src/assets/i18n/pt-BR.json +++ b/src/assets/i18n/pt-BR.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/ru.json b/src/assets/i18n/ru.json index c5a117b6e..3573d1658 100644 --- a/src/assets/i18n/ru.json +++ b/src/assets/i18n/ru.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/vi.json b/src/assets/i18n/vi.json index 2662f1896..69f2273ec 100644 --- a/src/assets/i18n/vi.json +++ b/src/assets/i18n/vi.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/zh-CN.json b/src/assets/i18n/zh-CN.json index 5c54631f0..e350a9af5 100644 --- a/src/assets/i18n/zh-CN.json +++ b/src/assets/i18n/zh-CN.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" } diff --git a/src/assets/i18n/zh-TW.json b/src/assets/i18n/zh-TW.json index 41ea24dc2..78d1150e1 100644 --- a/src/assets/i18n/zh-TW.json +++ b/src/assets/i18n/zh-TW.json @@ -249,5 +249,7 @@ "no-lyrics": "No lyrics", "embedded-lyrics": "Embedded lyrics", "lrc-lyrics": "LRC lyrics", - "online-lyrics": "Online lyrics" + "online-lyrics": "Online lyrics", + "mute": "Mute", + "unmute": "Unmute" }