#!perl

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2020-09-09'; # DATE
our $DIST = 'App-YoutubeDlUtils'; # DIST
our $VERSION = '0.007'; # VERSION
# FRAGMENT id=shcompgen-hint command=_youtube-dl

use 5.010001;
use strict;
use warnings;

system "youtube-dl", "-o", '%(playlist_index)s-%(title)s-%(id)s.%(ext)s', @ARGV;

# PODNAME: youtube-dl-playlist
# ABSTRACT: Download a playlist with youtube-dl

__END__

=pod

=encoding UTF-8

=head1 NAME

youtube-dl-playlist - Download a playlist with youtube-dl

=head1 VERSION

This document describes version 0.007 of youtube-dl-playlist (from Perl distribution App-YoutubeDlUtils), released on 2020-09-09.

=head1 SYNOPSIS

 % youtube-dl-playlist https://www.youtube.com/playlist?list=PL8dPuuaLjXtPAJr1ysd5yGIyiSFuh0mIL

=head1 DESCRIPTION

This is a wrapper for B<youtube-dl> which does the following:

=over

=item * add track number prefix to filename

The wrapper adds this option:

 -o '%(playlist_index)s-%(title)s-%(id)s.%(ext)s'

So instead of the default '%(title)s-%(id)s.%(ext)s' filename pattern like
these:

 Introduction to Astronomy: Crash Course Astronomy #1-0rHUDWjR5gg.mp4
 Naked Eye Observations: Crash Course Astronomy #2-L-Wtlev6suc.mp4
 Cycles in the Sky: Crash Course Astronomy #3-01QWC-rZcfE.mp4
 ...

you get:

 01-Introduction to Astronomy: Crash Course Astronomy #1-0rHUDWjR5gg.mp4
 02-Naked Eye Observations: Crash Course Astronomy #2-L-Wtlev6suc.mp4
 03-Cycles in the Sky: Crash Course Astronomy #3-01QWC-rZcfE.mp4
 ...

=back

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-YoutubeDlUtils>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-YoutubeDlUtils>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-YoutubeDlUtils>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 SEE ALSO

Other youtube-dl wrappers in L<App::YoutubeDlUtils> and L<App::YoutubeDlIf>.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
