You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue for this? (Please read the description)
I have searched the existing issues
Current Behavior
Related
Possibly same UI symptom as Media Duration #782 (0:00 in queue), but this report is a different root cause (audio-source match JSON units, not queue/track JSON persistence).
Summary
Plugin audio source receives duration from MetadataPlugin.create() → YouTubeEngine callbacks. That value is passed through Hetu plugins as SpotubeAudioSourceMatchObject JSON. SpotubeAudioSourceMatchObject.fromJson interprets duration as microseconds (Duration(microseconds: json['duration'])).
The engine currently sets 'duration': video.duration?.inSeconds, i.e. seconds (e.g. 210 for 3:30). That becomes Duration(microseconds: 210) ≈ 0 → displayed as 0:00 in the queue when UI uses sourced match duration.
'duration': video.duration?.inMicroseconds,
### ExpectedBehavior// metadata.dart — both search() and getVideo() callbacks:'duration': video.duration?.inMicroseconds, // ✓ microsecondsAffected:All audio source plugins using yt.search() / yt.getVideo() (YouTubeAudio, NewPipe, etc.) — TrackTile duration inPlayerQueue always shows 0:00for sourced tracks.
### Steps to reproduce
1. Install/ launch Spotube (Windowsis fine).
2. Set the audio source to the YouTube plugin or NewPipe (any engine backed by YouTubeEngine).
3. Signin to metadata (e.g. Spotify plugin) and enqueue a playlist/album, or use tracks where the UI relies on sourced duration / shows missing duration.
4. Open the playback queue (queued tracks list).
5. Observe: the duration column for tracks shows 0:00 (or effectively zero), even though playback works and the matched video has a real length.
### Logs
not needed
### OperatingSystemAndroid
### Spotube version
v5.1.1 build 44
### Installation source
Website (spotube.krtirtho.dev), F-Droid (Android)
### Additional information
_No response_
### Self grab
- [X] I'm ready to work on this issue!
Is there an existing issue for this? (Please read the description)
Current Behavior
Related
Summary
Plugin audio source receives
durationfromMetadataPlugin.create()→YouTubeEnginecallbacks. That value is passed through Hetu plugins asSpotubeAudioSourceMatchObjectJSON.SpotubeAudioSourceMatchObject.fromJsoninterpretsdurationas microseconds (Duration(microseconds: json['duration'])).The engine currently sets
'duration': video.duration?.inSeconds, i.e. seconds (e.g.210for 3:30). That becomesDuration(microseconds: 210)≈ 0 → displayed as 0:00 in the queue when UI uses sourced match duration.Where
lib/services/metadata/metadata.dart— insidecreateYoutubeEngine/YouTubeEnginecallbacks:searchmap:'duration': video.duration?.inSecondsgetVideomap:'duration': video.duration?.inSecondsSuggested fix
Use microseconds to match JSON contract: