mirror of
https://github.com/cooperhammond/irs.git
synced 2025-08-04 22:01:35 +00:00
minor fix to include duration_ms in all song metadata
This commit is contained in:
parent
8c15f7b5e2
commit
5eaac33345
|
@ -46,6 +46,7 @@ class TrackMapper
|
||||||
type: Int32,
|
type: Int32,
|
||||||
setter: true
|
setter: true
|
||||||
},
|
},
|
||||||
|
duration_ms: Int32,
|
||||||
type: String,
|
type: String,
|
||||||
uri: String
|
uri: String
|
||||||
)
|
)
|
||||||
|
|
|
@ -65,6 +65,7 @@ module Ranker
|
||||||
|
|
||||||
# SINGULAR COMPONENT OF RANKING ALGORITHM
|
# SINGULAR COMPONENT OF RANKING ALGORITHM
|
||||||
private def compare_timestamps(spotify_metadata : JSON::Any, node : VID_METADATA_CLASS) : Int32
|
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
|
actual_time = spotify_metadata["duration_ms"].as_i
|
||||||
vid_time = node["duration_ms"].to_i
|
vid_time = node["duration_ms"].to_i
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue