Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
e5c323fd
Commit
e5c323fd
authored
Jan 23, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: removed stopOnError flag from playPlaylist()
All callers pass false. Don't bother to collect that parameter.
parent
9da7ae02
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
command.c
src/command.c
+2
-2
playlist.c
src/playlist.c
+6
-6
playlist.h
src/playlist.h
+2
-2
No files found.
src/command.c
View file @
e5c323fd
...
...
@@ -388,7 +388,7 @@ handle_play(struct client *client, int argc, char *argv[])
if
(
argc
==
2
&&
!
check_int
(
client
,
&
song
,
argv
[
1
],
need_positive
))
return
COMMAND_RETURN_ERROR
;
result
=
playPlaylist
(
song
,
0
);
result
=
playPlaylist
(
song
);
return
print_playlist_result
(
client
,
result
);
}
...
...
@@ -401,7 +401,7 @@ handle_playid(struct client *client, int argc, char *argv[])
if
(
argc
==
2
&&
!
check_int
(
client
,
&
id
,
argv
[
1
],
need_positive
))
return
COMMAND_RETURN_ERROR
;
result
=
playPlaylistById
(
id
,
0
);
result
=
playPlaylistById
(
id
);
return
print_playlist_result
(
client
,
result
);
}
...
...
src/playlist.c
View file @
e5c323fd
...
...
@@ -224,7 +224,7 @@ static void loadPlaylistFromStateFile(FILE *fp, char *buffer,
if
(
addToPlaylist
(
temp
,
NULL
)
==
PLAYLIST_RESULT_SUCCESS
&&
current
==
song
)
{
if
(
state
!=
PLAYER_STATE_STOP
)
{
playPlaylist
(
queue_length
(
&
playlist
.
queue
)
-
1
,
0
);
playPlaylist
(
queue_length
(
&
playlist
.
queue
)
-
1
);
}
if
(
state
==
PLAYER_STATE_PAUSE
)
{
playerPause
();
...
...
@@ -681,7 +681,7 @@ static void playPlaylistOrderNumber(int orderNum)
playlist
.
current
=
orderNum
;
}
enum
playlist_result
playPlaylist
(
int
song
,
int
stopOnError
)
enum
playlist_result
playPlaylist
(
int
song
)
{
unsigned
i
=
song
;
...
...
@@ -718,26 +718,26 @@ enum playlist_result playPlaylist(int song, int stopOnError)
}
}
playlist_stopOnError
=
stopOnError
;
playlist_stopOnError
=
false
;
playlist_errorCount
=
0
;
playPlaylistOrderNumber
(
i
);
return
PLAYLIST_RESULT_SUCCESS
;
}
enum
playlist_result
playPlaylistById
(
int
id
,
int
stopOnError
)
enum
playlist_result
playPlaylistById
(
int
id
)
{
int
song
;
if
(
id
==
-
1
)
{
return
playPlaylist
(
id
,
stopOnError
);
return
playPlaylist
(
id
);
}
song
=
song_id_to_position
(
id
);
if
(
song
<
0
)
return
PLAYLIST_RESULT_NO_SUCH_SONG
;
return
playPlaylist
(
song
,
stopOnError
);
return
playPlaylist
(
song
);
}
static
void
playPlaylistIfPlayerStopped
(
void
);
...
...
src/playlist.h
View file @
e5c323fd
...
...
@@ -118,9 +118,9 @@ enum playlist_result playlistId(struct client *client, int song);
void
stopPlaylist
(
void
);
enum
playlist_result
playPlaylist
(
int
song
,
int
stopOnError
);
enum
playlist_result
playPlaylist
(
int
song
);
enum
playlist_result
playPlaylistById
(
int
song
,
int
stopOnError
);
enum
playlist_result
playPlaylistById
(
int
song
);
void
nextSongInPlaylist
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment