Last active
December 17, 2020 20:44
-
-
Save AddictedCS/b477bb9b026128c678d594e603b025b5 to your computer and use it in GitHub Desktop.
Insert Track into Emy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pathToAudioFile = "adelle.mp3"; | |
// use FFmpegAudioService | |
var audioService = new FFmpegAudioService(); | |
// connect to Emy on port 3399 | |
var emyModelService = EmyModelService.NewInstance("localhost", 3399); | |
// define track info | |
var track = new TrackInfo("GBBKS1200164", "Skyfall", "Adele", new Dictionary<string, string> {{ "Market", "US" }}); | |
// create fingerprints | |
var hashedFingerprints = await FingerprintCommandBuilder.Instance | |
.BuildFingerprintCommand() | |
.From(pathToAudioFile) | |
.UsingServices(audioService) | |
.Hash(); | |
// store hashes in the database for later retrieval | |
emyModelService.Insert(track, hashedFingerprints); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment