minor fix to include duration_ms in all song metadata

This commit is contained in:
Cooper Hammond 2021-04-15 09:41:13 -06:00
parent 8c15f7b5e2
commit 5eaac33345
2 changed files with 2 additions and 0 deletions

View file

@ -46,6 +46,7 @@ class TrackMapper
type: Int32,
setter: true
},
duration_ms: Int32,
type: String,
uri: String
)

View file

@ -65,6 +65,7 @@ module Ranker
# SINGULAR COMPONENT OF RANKING ALGORITHM
private def compare_timestamps(spotify_metadata : JSON::Any, node : VID_METADATA_CLASS) : Int32
# puts spotify_metadata.to_pretty_json()
actual_time = spotify_metadata["duration_ms"].as_i
vid_time = node["duration_ms"].to_i