App-MP4Meta

 view release on metacpan or  search on metacpan

lib/App/MP4Meta/Film.pm  view on Meta::CPAN


use File::Spec '3.33';
use AtomicParsley::Command::Tags;

use App::MP4Meta::Source::Data::Film;

sub new {
    my $class = shift;
    my $args  = shift;

    my $self = $class->SUPER::new($args);

    # Of course, its a movie, but this fixes the
    # 'Home Video' problem in iTunes 11.
    $self->{'media_type'} = 'Short Film';

    return $self;
}

sub apply_meta {
    my ( $self, $path ) = @_;

lib/App/MP4Meta/MusicVideo.pm  view on Meta::CPAN

use App::MP4Meta::Base;
our @ISA = 'App::MP4Meta::Base';

use File::Spec '3.33';
use AtomicParsley::Command::Tags;

sub new {
    my $class = shift;
    my $args  = shift;

    my $self = $class->SUPER::new($args);

    $self->{'media_type'} = 'Music Video';

    return $self;
}

sub apply_meta {
    my ( $self, $path ) = @_;

    # get the file name

lib/App/MP4Meta/Source/OMDB.pm  view on Meta::CPAN

use File::Temp  ();
use LWP::Simple ();

use constant NAME     => 'OMDB';
use constant PLOT     => 'short';
use constant RESPONSE => 'json';

sub new {
    my $class = shift;
    my $args  = shift;
    my $self  = $class->SUPER::new($args);

    return $self;
}

sub name {
    return NAME;
}

sub get_film {
    my ( $self, $args ) = @_;

    $self->SUPER::get_film($args);

    my $result = WebService::OMDB::title(
        $args->{title},
        {
            year => $args->{year},
            plot => PLOT,
            r    => RESPONSE
        }
    );

lib/App/MP4Meta/Source/TVDB.pm  view on Meta::CPAN


use WebService::TVDB 1.122800;
use File::Temp  ();
use LWP::Simple ();

use constant NAME => 'theTVDB.com';

sub new {
    my $class = shift;
    my $args  = shift;
    my $self  = $class->SUPER::new($args);

    # TODO: specify language
    # TODO: API key?
    $self->{tvdb} = WebService::TVDB->new();

    return $self;
}

sub name {
    return NAME;
}

sub get_tv_episode {
    my ( $self, $args ) = @_;

    $self->SUPER::get_tv_episode($args);

    my $series_list = $self->{tvdb}->search( $args->{show_title} );

    die 'no series found' unless @$series_list;

    # TODO: ability to search results i.e. by year
    my $series = @{$series_list}[0];
    my $cover_file;

    if ( $self->{cache}->{ $series->id } ) {

lib/App/MP4Meta/TV.pm  view on Meta::CPAN

    qr/^(?<show>.*)-S(?<season>\d\d?)E(?<episode>\d\d?)\s*-\s*E(?<end_episode>\d\d)/i,
    qr/S(?<season>\d\d?)E(?<episode>\d\d?)/i,
    qr/S(?<season>\d\d?)E(?<episode>\d\d?)\s*-\s*E(?<end_episode>\d\d?)/i,
    qr/^(?<show>.*)\s*-?\s*(?<season>\d\d?)x(?<episode>\d\d?)/,
);

sub new {
    my $class = shift;
    my $args  = shift;

    my $self = $class->SUPER::new($args);

    # args for skipping
    $self->{'continue_without_any'}      = $args->{'continue_without_any'};
    $self->{'continue_without_overview'} = $args->{'continue_without_overview'};
    $self->{'continue_without_genre'}    = $args->{'continue_without_genre'};
    $self->{'continue_without_year'}     = $args->{'continue_without_year'};
    $self->{'continue_without_cover'}    = $args->{'continue_without_cover'};

    # attributes
    $self->{'season'}   = $args->{'season'};



( run in 1.055 second using v1.01-cache-2.11-cpan-49f99fa48dc )