# "artist": "%s" % obj.artist.id, # "release": "%s" % obj.artist.id, "track": "%s" % obj.uuid, "length": duration, "codever": "%s" % version, "source": "%s" % "NRGFP", "import_date": "%sZ" % id, } # print nfp res = fp.ingest(nfp, split=False, do_commit=True) print "getting code by id (check)" if fp.fp_code_for_track_id("%s" % obj.id): print "ALL RIGHT!!! FP INSERTED!!" status = 1 else: status = 2 res = fp.best_match_for_query(code_string=code_pre) print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" print res.score print res.match() print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" except Exception, e: print e status = 2
"track_id": "%s" % self.id, "fp": code, #"artist": "%s" % self.artist.id, #"release": "%s" % self.artist.id, "track": "%s" % self.uuid, "length": duration, "codever": "%s" % version, "source": "%s" % "NRGFP", "import_date": "%sZ" % id } res = fp.ingest(nfp, split=False) print 'getting code by id (check)' if fp.fp_code_for_track_id("%s" % self.id): print "ALL RIGHT!!! FP INSERTED!!" self.echoprint_status = 1 else: self.echoprint_status = 2 self.save() #print code def save(self, *args, **kwargs): log = logging.getLogger('alibrary.mediamodels.save') log.info('Media id: %s - Save' % (self.pk)) """
"fp": code, #"artist": "%s" % self.artist.id, #"release": "%s" % self.artist.id, "track": "%s" % self.uuid, "length": duration, "codever": "%s" % version, "source": "%s" % "NRGFP", "import_date": "%sZ" % id } res = fp.ingest(nfp, split=False) print 'getting code by id (check)' if fp.fp_code_for_track_id("%s" % self.id): print "ALL RIGHT!!! FP INSERTED!!" self.echoprint_status = 1 else: self.echoprint_status = 2 self.save() #print code
#"artist": "%s" % obj.artist.id, #"release": "%s" % obj.artist.id, "track": "%s" % obj.uuid, "length": duration, "codever": "%s" % version, "source": "%s" % "NRGFP", "import_date": "%sZ" % id } #print nfp res = fp.ingest(nfp, split=False, do_commit=True) print 'getting code by id (check)' if fp.fp_code_for_track_id("%s" % obj.id): print "ALL RIGHT!!! FP INSERTED!!" status = 1 else: status = 2 res = fp.best_match_for_query(code_string=code_pre) print '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' print res.score print res.match() print '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' except Exception, e: print e status = 2