Skip to content

Commit

Permalink
Improved code
Browse files Browse the repository at this point in the history
  • Loading branch information
gokadzev committed Nov 26, 2023
1 parent bb13736 commit 12f7a10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/API/musify.dart
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,11 @@ Future<AudioOnlyStreamInfo> getSongManifest(String songId) async {

Future<String> getSong(String songId, bool isLive) async {
try {
final isQualityChanged = audioQualitySetting.value != null;
final qualitySetting = audioQualitySetting.value;
final isQualityChanged = qualitySetting != null;

final cacheKey = isQualityChanged
? 'song_${songId}_${audioQualitySetting.value!.name}_url'
? 'song_${songId}_${qualitySetting.name}_url'
: 'song_${songId}__url';

final cachedUrl = await getData(
Expand Down

0 comments on commit 12f7a10

Please sign in to comment.