Skip to content

Commit

Permalink
chore: disable writing tags to audio file after getting cached
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Mar 1, 2025
1 parent 65939a5 commit 3e487e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions lib/base/audio_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ class NamidaAudioVideoHandler<Q extends Playable> extends BasicAudioHandler<Q> {
final prevAudioBitrate = prevAudioStream?.bitrate ?? currentCachedAudio.value?.bitrate;
final prevAudioLangCode = prevAudioStream?.audioTrack?.langCode ?? currentCachedAudio.value?.langaugeCode;
final prevAudioLangName = prevAudioStream?.audioTrack?.displayName ?? currentCachedAudio.value?.langaugeName;
final prevVideoInfo = YoutubeInfoController.current.currentYTStreams.value;

// -- Adding recently cached audio to cache map, to be displayed on cards.
audioCacheMap[videoId]?.removeWhere((element) => element.file == audioCacheFile); // removing previous same entries
Expand All @@ -936,13 +935,14 @@ class NamidaAudioVideoHandler<Q extends Playable> extends BasicAudioHandler<Q> {
));

// -- Writing metadata too
final meta = await YTUtils.getMetadataInitialMap(videoId, null, null, prevAudioStream, prevVideoInfo, null, null, null, null);
await YTUtils.writeAudioMetadata(
videoId: videoId,
audioFile: audioCacheFile,
thumbnailFile: null,
tagsMap: meta,
);
// -- x (currently disabled, no need as to avoid issues, and downloading will already write tags)
// final meta = await YTUtils.getMetadataInitialMap(videoId, null, null, prevAudioStream, prevVideoInfo, null, null, null, null);
// await YTUtils.writeAudioMetadata(
// videoId: videoId,
// audioFile: audioCacheFile,
// thumbnailFile: null,
// tagsMap: meta,
// );
}

VideoStreamInfo? _ytNotificationVideoInfo;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: namida
description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter
publish_to: "none"
version: 5.0.28-beta+250226100
version: 5.0.29-beta+250226600

environment:
sdk: ">=3.6.0 <4.0.0"
Expand Down

0 comments on commit 3e487e4

Please sign in to comment.