summaryrefslogtreecommitdiff
path: root/src/fruits/cmsrv
diff options
context:
space:
mode:
Diffstat (limited to 'src/fruits/cmsrv')
-rw-r--r--src/fruits/cmsrv/cmsrv.c16
-rw-r--r--src/fruits/cmsrv/ui.c9
2 files changed, 5 insertions, 20 deletions
diff --git a/src/fruits/cmsrv/cmsrv.c b/src/fruits/cmsrv/cmsrv.c
index e830831..ca65beb 100644
--- a/src/fruits/cmsrv/cmsrv.c
+++ b/src/fruits/cmsrv/cmsrv.c
@@ -57,22 +57,6 @@ static u8 server_line_callback(void *userdata, str *line)
//lia_list_clear(list);
} else {
struct nn_packet *packet = nn_packet_create();
-#ifdef CAMU_HAVE_PORTAL
- if (al_str_at(line, 0) == ';' || camu_is_url(line, 0)) {
- nn_packet_write_u8(packet, CAMU_RESOURCE_SIMPLE_SEARCH);
-#elif defined NAUNET_HAS_CURL
- if (camu_is_url(line, 0)) {
- nn_packet_write_u8(packet, CAMU_RESOURCE_HTTP);
-#else
- if (0) {
-#endif
-#if CACHE_HAVE_CDIO
- } else if (al_str_cmp(line, &al_str_c("cdda://"), 0, 7) == 0) {
- nn_packet_write_u8(packet, CAMU_RESOURCE_CDIO);
-#endif
- } else {
- nn_packet_write_u8(packet, CAMU_RESOURCE_FILE);
- }
nn_packet_write_str(packet, line);
camu_server_local_add(&s->server, packet);
}
diff --git a/src/fruits/cmsrv/ui.c b/src/fruits/cmsrv/ui.c
index 0a41bfc..c8e9dcb 100644
--- a/src/fruits/cmsrv/ui.c
+++ b/src/fruits/cmsrv/ui.c
@@ -156,15 +156,16 @@ static void render_lists(struct cmsrv_ui *ui)
ncplane_putchar_yx(n, y, 1, '>');
x += 2;
}
- wstr *name = &entry->name;
#ifdef CAMU_HAVE_PORTAL
struct camu_resource *resource = (struct camu_resource *)entry->opaque;
if (resource->type == CAMU_RESOURCE_PORTAL) {
- struct camu_resource_portal *portal = (struct camu_resource_portal *)resource;
- name = &portal->post->title;
+ putnwstr_maxwidth_yx(n, y, x, max_width - x, &resource->post->title);
+ } else {
+ char *c_str = al_str_to_c_str(&entry->brief);
+ ncplane_putstr_yx(n, y, x, c_str);
+ al_free(c_str);
}
#endif
- putnwstr_maxwidth_yx(n, y, x, max_width - x, name);
if (++current_line >= max_height) break;
}
}