App-DrivePlayer
view release on metacpan or search on metacpan
lib/App/DrivePlayer/GUI.pm view on Meta::CPAN
track list, and playback controls (play/pause, stop, seek, volume).
=item *
Lazily initialising the Google REST API connection and
L<App::DrivePlayer::Player> on first use, so start-up is fast even when network
access is unavailable.
=item *
Running folder scans (via L<App::DrivePlayer::Scanner>) in a background thread
with live progress reporting.
=item *
Persisting configuration changes (music folder list, OAuth2 credentials)
through L<App::DrivePlayer::Config>.
=back
Requires the GTK3 system libraries and the L<Gtk3> and L<Glib> Perl
lib/App/DrivePlayer/GUI/MetadataFetch.pm view on Meta::CPAN
package App::DrivePlayer::GUI::MetadataFetch;
# Moo role: background metadata-fetch machinery.
use strict;
use warnings;
use utf8;
use Moo::Role;
use Glib qw( TRUE FALSE );
use Gtk3 '-init';
use JSON::MaybeXS qw( encode_json decode_json );
use POSIX qw( WNOHANG );
lib/App/DrivePlayer/GUI/MetadataFetch.pm view on Meta::CPAN
my $msg = eval { decode_json($1) } or next;
$process_msg->($msg);
}
$self->_meta_buf($buf);
return TRUE;
});
$self->_meta_watch_id($watch_id);
$self->_meta_fetch_item->set_label('Stop Metadata Fetch');
$self->_set_status("Fetching metadata for $total tracks in backgroundâ¦");
return;
}
sub _stop_metadata_fetch {
my ($self) = @_;
return unless $self->_meta_watch_id;
Glib::Source->remove($self->_meta_watch_id);
$self->_meta_watch_id(undef);
$self->_meta_fetch_item->set_label('Fetch All Metadata');
if (my $pid = $self->_meta_pid) {
lib/App/DrivePlayer/GUI/MetadataFetch.pm view on Meta::CPAN
$self->_set_status('Metadata found.');
return $meta;
}
1;
__END__
=head1 NAME
App::DrivePlayer::GUI::MetadataFetch - Role for background metadata fetching
=head1 DESCRIPTION
A L<Moo::Role> consumed by L<App::DrivePlayer::GUI> that handles background
metadata fetching via a forked child process.
=cut
( run in 0.682 second using v1.01-cache-2.11-cpan-f56aa216473 )