playlist: removed {save,read}PlaylistState()
Those were only wrappers for playlist_state_{save,restore}(). Since sf_callbacks has been removed, we can call the latter functions directly.
This commit is contained in:
parent
9206f54979
commit
5a886da93b
@ -23,7 +23,6 @@
|
|||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#define PLAYLIST_COMMENT '#'
|
#define PLAYLIST_COMMENT '#'
|
||||||
|
|
||||||
@ -116,10 +115,6 @@ playlist_get_queue(const struct playlist *playlist)
|
|||||||
return &playlist->queue;
|
return &playlist->queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void readPlaylistState(FILE *);
|
|
||||||
|
|
||||||
void savePlaylistState(FILE *);
|
|
||||||
|
|
||||||
void clearPlaylist(struct playlist *playlist);
|
void clearPlaylist(struct playlist *playlist);
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
@ -52,13 +52,3 @@ void finishPlaylist(void)
|
|||||||
{
|
{
|
||||||
playlist_finish(&g_playlist);
|
playlist_finish(&g_playlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
void savePlaylistState(FILE *fp)
|
|
||||||
{
|
|
||||||
playlist_state_save(fp, &g_playlist);
|
|
||||||
}
|
|
||||||
|
|
||||||
void readPlaylistState(FILE *fp)
|
|
||||||
{
|
|
||||||
playlist_state_restore(fp, &g_playlist);
|
|
||||||
}
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "state_file.h"
|
#include "state_file.h"
|
||||||
#include "output_state.h"
|
#include "output_state.h"
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
|
#include "playlist_state.h"
|
||||||
#include "volume.h"
|
#include "volume.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
@ -52,7 +53,7 @@ state_file_write(void)
|
|||||||
|
|
||||||
save_sw_volume_state(fp);
|
save_sw_volume_state(fp);
|
||||||
saveAudioDevicesState(fp);
|
saveAudioDevicesState(fp);
|
||||||
savePlaylistState(fp);
|
playlist_state_save(fp, &g_playlist);
|
||||||
|
|
||||||
while(fclose(fp) && errno == EINTR) /* nothing */;
|
while(fclose(fp) && errno == EINTR) /* nothing */;
|
||||||
}
|
}
|
||||||
@ -77,7 +78,7 @@ state_file_read(void)
|
|||||||
rewind(fp);
|
rewind(fp);
|
||||||
readAudioDevicesState(fp);
|
readAudioDevicesState(fp);
|
||||||
rewind(fp);
|
rewind(fp);
|
||||||
readPlaylistState(fp);
|
playlist_state_restore(fp, &g_playlist);
|
||||||
|
|
||||||
while(fclose(fp) && errno == EINTR) /* nothing */;
|
while(fclose(fp) && errno == EINTR) /* nothing */;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user