Kill code for loading the first available playlist.
authorAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 11:45:31 +0000 (13:45 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 11:45:31 +0000 (13:45 +0200)
It's unused.

playlist.c

index bf8fc73..1c496ca 100644 (file)
@@ -84,18 +84,6 @@ err:
        return 1;
 }
 
        return 1;
 }
 
-static int load_first_available_playlist(struct playlist_info *playlist)
-{
-       int ret = osl_rbtree_loop(playlists_table, BLOBCOL_NAME, playlist,
-               load_playlist);
-       if (ret == -E_PLAYLIST_LOADED) /* success */
-               return 1;
-       if (ret < 0)
-               return ret; /* error */
-       PARA_NOTICE_LOG("no valid playlist found\n");
-       return -E_NO_PLAYLIST;
-}
-
 static int check_playlist_path(char *path, void *data)
 {
        struct para_buffer *pb = data;
 static int check_playlist_path(char *path, void *data)
 {
        struct para_buffer *pb = data;
@@ -165,12 +153,10 @@ void playlist_close(void)
  *
  * \param name The name of the playlist to open.
  *
  *
  * \param name The name of the playlist to open.
  *
- * If name is \p NULL, load the first available playlist. Files which are
- * listed in the playlist, but not contained in the database are ignored.
- * This is not considered an error.
+ * Files which are listed in the playlist, but not contained in the database
+ * are ignored.  This is not considered an error.
  *
  *
- * \return Positive on success, negative on errors. Possible errors
- * include: Given playlist not found, -E_NO_PLAYLIST (no playlist defined).
+ * \return Standard.
  */
 int playlist_open(char *name)
 {
  */
 int playlist_open(char *name)
 {
@@ -178,8 +164,6 @@ int playlist_open(char *name)
        int ret;
        struct osl_row *row;
 
        int ret;
        struct osl_row *row;
 
-       if (!name)
-               return load_first_available_playlist(&current_playlist);
        obj.data = name;
        obj.size = strlen(obj.data);
        ret = osl_get_row(playlists_table, BLOBCOL_NAME, &obj, &row);
        obj.data = name;
        obj.size = strlen(obj.data);
        ret = osl_get_row(playlists_table, BLOBCOL_NAME, &obj, &row);