Examples of TrackSimilarityParserImpl


Examples of com.github.hakko.musiccabinet.parser.lastfm.TrackSimilarityParserImpl

    Assert.assertNotNull(ts);
  }
 
  @Test
  public void addCherSimilarTracksAndGetPlaylist() throws ApplicationException {
    TrackSimilarityParser tsParser = new TrackSimilarityParserImpl(
        new ResourceUtil(CHER_SIMILAR_TRACKS).getInputStream());
    trackRelationDao.createTrackRelations(
        tsParser.getTrack(), tsParser.getTrackRelations());
   
    List<File> files = new ArrayList<>();
    for (TrackRelation tr : tsParser.getTrackRelations()) {
      String artistName = tr.getTarget().getArtist().getName();
      if ("Madonna".equals(artistName)) {
        files.add(getFile(artistName, null, tr.getTarget().getName()));
      }
    }
    UnittestLibraryUtil.submitFile(additionDao, files);
   
    int trackId = musicDao.getTrackId(tsParser.getTrack().getArtist().getName(),
        tsParser.getTrack().getName());
   
    playlistGeneratorDao.updateSearchIndex();
    List<PlaylistItem> ts = playlistGeneratorDao.getPlaylistForTrack(trackId);
   
    Assert.assertNotNull(ts);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.