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
Copy file name to clipboardExpand all lines: src/main/java/se/michaelthelin/spotify/model_objects/specification/Track.java
+1-17Lines changed: 1 addition & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -562,7 +562,7 @@ public Track createModelObject(JsonObject jsonObject) {
562
562
: null)
563
563
.setDurationMs(
564
564
hasAndNotNull(jsonObject, "duration_ms")
565
-
? getDurationMsFixed(jsonObject) // TODO: use `jsonObject.get("duration_ms").getAsInt()` when Spotify has fixed their API / API description, see method documentation below
565
+
? jsonObject.get("duration_ms").getAsInt()
566
566
: null)
567
567
.setExplicit(
568
568
hasAndNotNull(jsonObject, "explicit")
@@ -627,22 +627,6 @@ public Track createModelObject(JsonObject jsonObject) {
627
627
: null)
628
628
.build();
629
629
}
630
-
631
-
/**
632
-
* @see <a href="https://community.spotify.com/t5/Spotify-for-Developers/duration-ms-includes-nonsense-JSON/m-p/5753768">Bug report on Spotify forums</a>
633
-
* @deprecated This is a temporary workaround to handle an edge-case involving local files,
634
-
* which for some reason have their duration_ms field contain an additional field called totalMilliseconds.
635
-
* Once Spotify fixes their API, this workaround should be removed.
0 commit comments