Merge pull request #260 from StopMotionCuber/fix_232

Changed TRACK_ID from base16 to base62 so that it is equal with the official Spotify app
This commit is contained in:
Anton Voyl 2018-11-07 07:32:19 +01:00 committed by GitHub
commit 96557b4ec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,16 +21,16 @@ pub fn run_program_on_events(event: PlayerEvent, onevent: &str) -> io::Result<Ch
new_track_id,
} => {
env_vars.insert("PLAYER_EVENT", "change".to_string());
env_vars.insert("OLD_TRACK_ID", old_track_id.to_base16());
env_vars.insert("TRACK_ID", new_track_id.to_base16());
env_vars.insert("OLD_TRACK_ID", old_track_id.to_base62());
env_vars.insert("TRACK_ID", new_track_id.to_base62());
}
PlayerEvent::Started { track_id } => {
env_vars.insert("PLAYER_EVENT", "start".to_string());
env_vars.insert("TRACK_ID", track_id.to_base16());
env_vars.insert("TRACK_ID", track_id.to_base62());
}
PlayerEvent::Stopped { track_id } => {
env_vars.insert("PLAYER_EVENT", "stop".to_string());
env_vars.insert("TRACK_ID", track_id.to_base16());
env_vars.insert("TRACK_ID", track_id.to_base62());
}
}
run_program(onevent, env_vars)