From 3a9cd7780e02dec1b973e836e0abe3dbb6e69b44 Mon Sep 17 00:00:00 2001 From: Martin Arver Date: Fri, 27 Oct 2006 11:35:34 +0000 Subject: 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 --- apps/plugins/SOURCES | 1 - apps/plugins/favorites.c | 46 ---------------------------------------------- 2 files changed, 47 deletions(-) delete mode 100644 apps/plugins/favorites.c (limited to 'apps') 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; -} -- cgit v1.2.3