aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/hd
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/hd')
-rw-r--r--plugins/hd/Makefile.am40
-rw-r--r--plugins/hd/lyrics_hd.c52
2 files changed, 0 insertions, 92 deletions
diff --git a/plugins/hd/Makefile.am b/plugins/hd/Makefile.am
deleted file mode 100644
index f4d4608d8..000000000
--- a/plugins/hd/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-AM_CPPFLAGS =\
- $(GLIB_CFLAGS)\
- $(GTHREAD_CFLAGS)\
- $(libcurl_CFLAGS)\
- -I../../src
-
-###----
-
-plugin_headers =\
- ../src_lyrics.h\
- ../screen_lyrics.h\
- ../easy_download.h\
- ../options.h
-
-###-----
-
-ncmpc_modulesdir = @plugindir@
-
-ncmpc_modules_LTLIBRARIES = libhd.la
-
-### libhd
-
-libhd_la_LIBADD =\
- $(GLIB_LIBS)\
- $(libcurl_LIBS)
-
-libhd_la_headers =\
- $(plugins_headers)
-
-libhd_la_SOURCES =\
- lyrics_hd.c\
- $(libhd_la_headers)
-install:
- @$(MAKE)
- mkdir -p ${ncmpc_modulesdir}
- if test -f .libs/libhd.so; then cp .libs/libhd.so ${ncmpc_modulesdir}/lyrics_hd.so; fi
-
-uninstall:
- @$(MAKE)
- rm -f ${ncmpc_modulesdir}/lyrics_hd.so
diff --git a/plugins/hd/lyrics_hd.c b/plugins/hd/lyrics_hd.c
deleted file mode 100644
index 7a3a8b745..000000000
--- a/plugins/hd/lyrics_hd.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <glib.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include "src_lyrics.h"
-
-char *check_lyr_hd(char *artist, char *title, int how)
-{ //checking whether for lyrics file existence and proper access
- result |= 2;
- static char path[1024];
- snprintf(path, 1024, "%s/.lyrics/%s/%s.lyric",
- getenv("HOME"), artist, title);
-
- if(g_access(path, how) != 0) return NULL;
- return path;
-}
-
-
-int get_lyr_hd(char *artist, char *title)
-{
- char *path = check_lyr_hd(artist, title, R_OK);
- if(path == NULL) return -1;
-
- FILE *lyr_file;
- lyr_file = fopen(path, "r");
- if(lyr_file == NULL) return -1;
- result |= 4;
- char *buf = NULL;
- char **line = &buf;
- size_t n = 0;
-
- while(1)
- {
- n = getline(line, &n, lyr_file);
- if( n < 1 || *line == NULL || feof(lyr_file) != 0 ) return 0;
- add_text_line(&lyr_text, *line, n);
- free(*line);
- *line = NULL; n = 0;
- }
-
- return 0;
-}
-
-int register_me (src_lyr *source_descriptor)
-{
- source_descriptor->check_lyr = check_lyr_hd;
- source_descriptor->get_lyr = get_lyr_hd;
-
- source_descriptor->name = "Harddisk";
- source_descriptor->description = "";
-}