diff --git a/libsaria/library/library.cpp b/libsaria/library/library.cpp index 4af5fd35..3cb46561 100644 --- a/libsaria/library/library.cpp +++ b/libsaria/library/library.cpp @@ -70,15 +70,6 @@ namespace libsaria return found; } - unsigned int library::size() - { - unsigned int size = 0; - list::iterator it; - for (it = path_list.begin(); it != path_list.end(); it++) - size += it->size(); - return size; - } - void library::refresh() { rebuild_list(); diff --git a/libsaria/library/list.cpp b/libsaria/library/list.cpp index 6d20f8e6..1dee7bd6 100644 --- a/libsaria/library/list.cpp +++ b/libsaria/library/list.cpp @@ -15,6 +15,8 @@ namespace libsaria list::iterator it; list *tag_list; + play_list.clear(); + for (it = path_list->begin(); it != path_list->end(); it++) { tag_list = it->get_list(); play_list.insert(play_list.end(), tag_list->begin(), tag_list->end()); @@ -22,4 +24,9 @@ namespace libsaria println("Rebuilding play list"); } + unsigned int library::size() + { + return play_list.size(); + } + }; /* Namespace: libsaria */