Skip to content

Instantly share code, notes, and snippets.

@AddictedCS
Last active December 17, 2020 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AddictedCS/b477bb9b026128c678d594e603b025b5 to your computer and use it in GitHub Desktop.
Save AddictedCS/b477bb9b026128c678d594e603b025b5 to your computer and use it in GitHub Desktop.
Insert Track into Emy
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