AnyEvent-DAAP-Server

 view release on metacpan or  search on metacpan

lib/AnyEvent/DAAP/Server/Track/File/MP3.pm  view on Meta::CPAN

        $self->daap_songtime( $info->{SECS} * 1000 );
    }

    # read the tag if we can, fall back to very simple data otherwise.
    my $tag = MP3::Info::get_mp3tag( $file ) || {};
    $self->dmap_itemname( $tag->{TITLE} || basename($file, ".mp3") );
    $self->daap_songalbum( $tag->{ALBUM} );
    $self->daap_songartist( $tag->{ARTIST} );
    $self->daap_songcomment( $tag->{COMMENT} );
    $self->daap_songyear( $tag->{YEAR} || undef );
    my ($number, $count) = split m{/}, ($tag->{TRACKNUM} || "");
    $self->daap_songtrackcount( $count || 0);
    $self->daap_songtracknumber( $number || 0 );

    # from blech:
    # if ($rtag->{TCP} || $rtag->{TCMP}) {
    #     $artist = 'various artists';
    # }
    #
    $self->daap_songcompilation( 0 );
    # $self->daap_songcomposer( );



( run in 0.790 second using v1.01-cache-2.11-cpan-efa8479b9fe )