Package com.musica.autor

Examples of com.musica.autor.AutorS


        return getAutor(nome, true);
    }

    public static AutorS getAutor(String nome, boolean criar) {
        nome = MusicaGerencia.removeCaracteresEsp(nome);
        AutorS autor = Busca.buscar(autores, nome);
//        AutorS autor = autores.get(nome);
        if (criar && autor == null) {
            autor = new AutorS();
            autor.setNome(nome);
            autores.add(autor);
//            autores.put(nome, autor);
        }
        return autor;
    }
View Full Code Here


    public static MusicaS getMusica(MP3File mp3, File file) throws Exception {
        getMaxDirComum(file);
        //getID3v2Tag
        MusicaS musica = null;
        if (mp3.hasID3v2Tag()) {
            AutorS autor = PortaCDs.getAutor(mp3.getID3v2Tag().getLeadArtist());
            AlbumS album = autor.getAlbum(mp3.getID3v2Tag().getAlbumTitle());
//            if (file.getAbsolutePath().equals(maxDirComum.getAbsolutePath())) {
//                autor.setCaminho(file.getParentFile().getAbsolutePath());
//                album.setNomeDiretorio(null);
//            } else {
//                autor.setCaminho(file.getParentFile().getParentFile().getAbsolutePath());
//                album.setNomeDiretorio(file.getParent());
//            }
            if (album.getImg() == null) {
                album.setImg(getImagemDir(file.getParentFile()));
            }
            album.setGenero(mp3.getID3v2Tag().getSongGenre());

            musica = album.getMusica(mp3.getID3v2Tag().getSongTitle());
            musica.setNomeArquivo(file.getAbsolutePath());

            if (musica.getAlbum().getNome() == null) {
                musica.getAlbum().setNome(mp3.getID3v1Tag().getAlbumTitle());
            }
            if (musica.getNome() == null || musica.getNome().isEmpty()) {
                musica.setNome(file.getName());
            }
        } else if (mp3.hasID3v1Tag()) {
            AutorS autor = PortaCDs.getAutor(mp3.getID3v1Tag().getLeadArtist());

//            if (file.getAbsolutePath().equals(maxDirComum.getAbsolutePath())) {
//                autor.setCaminho(file.getParentFile().getAbsolutePath());
//            } else {
//                autor.setCaminho(file.getParentFile().getParentFile().getAbsolutePath());
//            }

            AlbumS album = autor.getAlbum(mp3.getID3v1Tag().getAlbumTitle());
//            album.setNomeDiretorio(file.getParent());
            if (album.getImg() != null) {
                album.setImg(getImagemDir(file.getParentFile()));
            }
            album.setGenero(mp3.getID3v1Tag().getSongGenre());
View Full Code Here

        } catch (Exception ex) {
            Logger.getLogger(MusicaGerencia.class.getName()).log(Level.SEVERE, null, ex);
        }
        Map<String, String> pro = getPropriedades(file);
        if (pro != null) {
            AutorS autor = PortaCDs.getAutor(pro.get("author"));
            AlbumS album = autor.getAlbum(pro.get("album"));
//            if (file.getAbsolutePath().equals(maxDirComum.getAbsolutePath())) {
//                autor.setCaminho(file.getParentFile().getAbsolutePath());
//                album.setNomeDiretorio(null);
//            } else {
//                autor.setCaminho(file.getParentFile().getParentFile().getAbsolutePath());
View Full Code Here

            return null;
        } else if (valor instanceof ArrayList) {
            return valor.toString().replaceAll("[\\[\\]]", "");
        } else if (valor instanceof MusicaS) {
            MusicaS musica = (MusicaS) valor;
            AutorS autor = musica.getAlbum().getAutor();
            return autor.getNome() + "/" + musica.getAlbum().getNome() + "/" + musica.getNome();
        } else if (valor instanceof Enum) {
            return ((Enum) valor).name();
        } else if (valor instanceof Rectangle) {
            Rectangle rec = (Rectangle) valor;
            return "[" + rec.x + "," + rec.y + "," + rec.width + "," + rec.height + "]";
View Full Code Here

                    }
                    String[] valores = valor.split(",");
                    lista.addAll(Arrays.asList(valores));
                } else if (tipoGenerico.isAssignableFrom(MusicaS.class)) {
                    String[] split = valor.trim().split("/");
                    AutorS autor = PortaCDs.getAutor(split[0], false);
                    if (autor != null) {
                        AlbumS album = autor.getAlbum(split[1], false);
                        if (album != null) {
                            MusicaS musica = album.getMusica(split[2]);
                            configuracao.setValor(musica);
                        }
                    }
View Full Code Here

TOP

Related Classes of com.musica.autor.AutorS

Copyright © 2018 www.massapicom. 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.