Examples of Song


Examples of us.jyg.freshet.dao.model.Song

  public void flush() {
    q = new ArrayList<QSong>();
    }

    public void insertSong(int songId, int position, String username) {
        Song s = songManager.getSong(songId);
        insertSong(s, position, username);
    }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

      } catch (InterruptedException iE) {
        log.error("Empty stack sleeper woken up... weird.");
      }
    }
   
    Song s = (Song)(songQ.next());
    try {
      String path = s.getPath();


      try {
        // make sure these things are set
        recoderCmdLine = System.getProperty("freshet.recoder.cmdLine");
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

    File f;
    while( (f=miner.next()) != null) {
      try {
        if (f.getName().matches(".*[mM][pP]3")) {
          SongData songData = new SongData(f);
          Song song = songManager.saveSong(songData);
          log.debug("Saved: " + song.getName() + " ("+song.getId() +")"+
              ", " + song.getAlbum().getName() + "("+song.getAlbum().getId()+")"+
              ", " + song.getArtist().getName() "("+song.getArtist().getId()+")"+
              ", " + song.getGenre().getName() + "("+song.getGenre().getId()+")" );
        }
      } catch (SongDataException sdE) {
        log.error("Could not process file: " +f.getAbsolutePath());
      }
    }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

   
    public void testGetSongs() {
      log.debug("=============================================================");
      List songs = songManager.getSongs();
      for (Iterator itr=songs.iterator(); itr.hasNext();) {
        Song song = (Song)itr.next();
        log.debug(song.getName() + " ("+song.getId() +")"+
            ", " + song.getAlbum().getName() +
            ", " + song.getArtist().getName() +
            ", " + song.getGenre().getName())
      }
      log.debug("=============================================================");
    }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

 
  public void setBrowseArtistDisplay(FreshetForm ff, User user) {
    log.debug("entering setBrowseArtistDisplay");
    Integer artistId = new Integer(ff.getBrowseId());
    ff.setBrowseArtist(artistManager.getArtist(artistId));
    Song song0 = (Song)songManager.getSongs(ff.getBrowseArtist()).get(0);
    ff.setBrowseGenre(song0.getGenre());
    ff.setBrowseItems(new ArrayList<SongAttribute>(albumManager.getAlbumsbyArtist(artistId)));
    ff.setBrowseType(Constants.BROWSE_ARTIST);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_ALBUM);
  }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

  public void setBrowseAlbumDisplay(FreshetForm ff, User user) {
    log.debug("entering setBrowseAlbumDisplay");
    Integer albumId = new Integer(ff.getBrowseId());
    ff.setBrowseAlbum(albumManager.getAlbum(albumId));
    ff.setBrowseItems(songManager.getSongs(ff.getBrowseAlbum()));
    Song song0 = (Song)ff.getBrowseItems().get(0);
    ff.setBrowseGenre(song0.getGenre());
    ff.setBrowseArtist(song0.getArtist());
    ff.setBrowseType(Constants.BROWSE_ALBUM);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_SONG);
  }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

public class QueueUpService {

    private final Log log = LogFactory.getLog(getClass());

    public void queueSong(FreshetForm ff) {
        Song song = songManager.getSong(new Integer(ff.getQueueId()));
    songQ.up(song, "");
        songManager.modifySongWeight(song, 1);
    }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

    }

    public void insertSong(FreshetForm ff) {
        int qId = Integer.parseInt(ff.getQueueId());
        Song s = songManager.getSong(qId);
        if (ff.getUser()==null)
            ff.setUser(new Guest());

        songManager.modifySongWeight(s, 1);
        songQ.insertSong(s, Integer.parseInt(ff.getInsertIdx()), ff.getUser().getUsername());
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

    public List<Song> findSongs(String pattern) {return songDao.searchSongs(pattern);}

  public void saveSong(Song song) {songDao.saveSong(song);}

    public boolean songIsInDb(File songFile) {
        Song s = songDao.getSongByFile(songFile);
        if (s == null)
            return false;
        else
            return true;
    }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Song

    public Song saveSong(SongData songData) {
      Album album = albumDao.getAlbum(songData.getAlbum());
      Artist artist = artistDao.getArtist(songData.getArtist());
      Genre genre = genreDao.getGenre(songData.getGenre());
      Song song = new Song(songData.getName(), songData.getPath(), songData
          .getTrack(), album, artist, genre);
      saveSong(song);
      return song;
  }
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.