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 /apps | |
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
Diffstat (limited to 'apps')
-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 | |||
4 | credits.c | 4 | credits.c |
5 | cube.c | 5 | cube.c |
6 | dict.c | 6 | dict.c |
7 | favorites.c | ||
8 | firmware_flash.c | 7 | firmware_flash.c |
9 | logo.c | 8 | logo.c |
10 | mosaique.c | 9 | 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 @@ | |||
1 | #include "plugin.h" | ||
2 | #define FAVORITES_FILE "/favorites.m3u" | ||
3 | |||
4 | PLUGIN_HEADER | ||
5 | |||
6 | static struct plugin_api* rb; | ||
7 | |||
8 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | ||
9 | { | ||
10 | struct mp3entry* id3; | ||
11 | char track_path[MAX_PATH+1]; | ||
12 | int fd, result, len; | ||
13 | |||
14 | rb = api; | ||
15 | |||
16 | /* If we were passed a parameter, use that as the file name, | ||
17 | else take the currently playing track */ | ||
18 | if(parameter) { | ||
19 | rb->strncpy(track_path, parameter, MAX_PATH); | ||
20 | } else { | ||
21 | id3 = rb->audio_current_track(); | ||
22 | if (!id3) { | ||
23 | rb->splash(HZ*2, true, "Nothing To Save"); | ||
24 | return PLUGIN_OK; | ||
25 | } | ||
26 | rb->strncpy(track_path, id3->path, MAX_PATH); | ||
27 | } | ||
28 | |||
29 | track_path[MAX_PATH] = 0; | ||
30 | |||
31 | len = rb->strlen(track_path); | ||
32 | |||
33 | fd = rb->open(FAVORITES_FILE, O_CREAT|O_WRONLY|O_APPEND); | ||
34 | |||
35 | if (fd >= 0) { | ||
36 | // append the current mp3 path | ||
37 | track_path[len] = '\n'; | ||
38 | result = rb->write(fd, track_path, len + 1); | ||
39 | track_path[len] = '\0'; | ||
40 | rb->close(fd); | ||
41 | } | ||
42 | |||
43 | rb->splash(HZ*2, true, "Saved Favorite"); | ||
44 | |||
45 | return PLUGIN_OK; | ||
46 | } | ||