diff options
author | Martin Arver <martin.arver@gmail.com> | 2006-10-27 11:35:34 +0000 |
---|---|---|
committer | Martin Arver <martin.arver@gmail.com> | 2006-10-27 11:35:34 +0000 |
commit | 3a9cd7780e02dec1b973e836e0abe3dbb6e69b44 (patch) | |
tree | b4f496cab2bbed5553d3798492aec32f9c20be2b | |
parent | f6c3a305815051c016c8b5cefe1959fbe475e27a (diff) | |
download | rockbox-3a9cd7780e02dec1b973e836e0abe3dbb6e69b44.tar.gz rockbox-3a9cd7780e02dec1b973e836e0abe3dbb6e69b44.zip |
Stop building the favourites plugin, as the same feature is duplicated with the playlist catalog command
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11363 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/SOURCES | 1 | ||||
-rw-r--r-- | apps/plugins/favorites.c | 46 |
2 files changed, 0 insertions, 47 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index c373d72dfe..63cfa8a52f 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -4,7 +4,6 @@ chessclock.c credits.c cube.c dict.c -favorites.c firmware_flash.c logo.c mosaique.c diff --git a/apps/plugins/favorites.c b/apps/plugins/favorites.c deleted file mode 100644 index d45f785d64..0000000000 --- a/apps/plugins/favorites.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "plugin.h" -#define FAVORITES_FILE "/favorites.m3u" - -PLUGIN_HEADER - -static struct plugin_api* rb; - -enum plugin_status plugin_start(struct plugin_api* api, void* parameter) -{ - struct mp3entry* id3; - char track_path[MAX_PATH+1]; - int fd, result, len; - - rb = api; - - /* If we were passed a parameter, use that as the file name, - else take the currently playing track */ - if(parameter) { - rb->strncpy(track_path, parameter, MAX_PATH); - } else { - id3 = rb->audio_current_track(); - if (!id3) { - rb->splash(HZ*2, true, "Nothing To Save"); - return PLUGIN_OK; - } - rb->strncpy(track_path, id3->path, MAX_PATH); - } - - track_path[MAX_PATH] = 0; - - len = rb->strlen(track_path); - - fd = rb->open(FAVORITES_FILE, O_CREAT|O_WRONLY|O_APPEND); - - if (fd >= 0) { - // append the current mp3 path - track_path[len] = '\n'; - result = rb->write(fd, track_path, len + 1); - track_path[len] = '\0'; - rb->close(fd); - } - - rb->splash(HZ*2, true, "Saved Favorite"); - - return PLUGIN_OK; -} |