Commit 32596010 authored by Michael Smith's avatar Michael Smith
Browse files

Allow specifying restart-after-reread to restart a playlist if it gets

reread, as an option on the playlist_basic module.

svn path=/trunk/ices/; revision=2095
parent f51ddae3
/* playlist_basic.c
* - Simple built-in unscripted playlist
*
* $Id: playlist_basic.c,v 1.2 2001/09/25 12:04:22 msmith Exp $
* $Id: playlist_basic.c,v 1.3 2001/09/28 10:16:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith@labyrinth.net.au>
*
......@@ -130,6 +130,8 @@ char *playlist_basic_get_next_filename(void *data)
{
LOG_INFO1("Reloading playlist after file \"%s\" changed", pl->file);
load_playlist(pl);
if(pl->restartafterreread)
pl->pos = 0;
}
if (pl->pos < pl->len)
......@@ -167,6 +169,8 @@ int playlist_basic_initialise(module_param_t *params, playlist_state_t *pl)
data->random = atoi(params->value);
else if(!strcmp(params->name, "once"))
data->once = atoi(params->value);
else if(!strcmp(params->name, "restart-after-reread"))
data->restartafterreread = atoi(params->value);
else if(!strcmp(params->name, "type"))
; /* We recognise this, but don't want to do anything with it */
else
......
/* playlist_basic.h
* - Simple unscripted playlist
*
* $Id: playlist_basic.h,v 1.2 2001/09/25 12:04:22 msmith Exp $
* $Id: playlist_basic.h,v 1.3 2001/09/28 10:16:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith@labyrinth.net.au>
*
......@@ -23,6 +23,7 @@ typedef struct
time_t mtime;
int random;
int once;
int restartafterreread;
} basic_playlist;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment