From e9f2c3a9bfc831fe9177564225236e2588e257df Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Fri, 13 Dec 2013 00:51:06 +0100 Subject: Check if URL is already added to bookmark --- atari/hotlist.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/atari/hotlist.c b/atari/hotlist.c index 1644935f5..b4e36ae1a 100644 --- a/atari/hotlist.c +++ b/atari/hotlist.c @@ -308,6 +308,12 @@ void atari_hotlist_add_page( const char * url, const char * title ) if (nsurl_create(url, &nsurl) != NSERROR_OK) return; + if (hotlist_has_url(nsurl)) { + LOG(("URL already added as Bookmark")); + nsurl_unref(nsurl); + return; + } + /* doesn't look nice: if( hl.tv->click.x >= 0 && hl.tv->click.y >= 0 ){ hotlist_add_entry( nsurl, title, true, hl.tv->click.y ); -- cgit v1.2.3