mirror of
http://mpg123.de/trunk/.git
synced 2025-07-31 13:24:22 +03:00
Be more helpful on empty playlist.
git-svn-id: svn://scm.orgis.org/mpg123/trunk@3188 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
@ -53,6 +53,12 @@ else
|
||||
write_list();
|
||||
}
|
||||
|
||||
unless(@files)
|
||||
{
|
||||
print STDERR "There are no files to play.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if($entry < 0 or $entry > $#files or $frame < 0)
|
||||
{
|
||||
die "You got bad data in your playlist file (mismatch between current entry and total count, bad frame index). Clean that up.\n";
|
||||
@ -78,6 +84,11 @@ write_list();
|
||||
|
||||
sub write_list
|
||||
{
|
||||
unless(@files)
|
||||
{
|
||||
print STDERR "Refusing to write empty playlist.\n";
|
||||
return;
|
||||
}
|
||||
open(LIST, '>', $listfile) or die "Cannot write Playlist";
|
||||
print LIST "#M3U\n";
|
||||
print LIST "#current entry: $entry\n";
|
||||
|
Reference in New Issue
Block a user