commit 7100e5c99ec578f9abfd6c111b547b3918b79396
Author: Sai <suman.sai14@gmail.com>
Date:   Thu May 2 10:47:39 2013 +0530

    loadmore patch

diff --git a/src/query.js b/src/query.js
index 4382f64..7b9a3c5 100644
--- a/src/query.js
+++ b/src/query.js
@@ -26,6 +26,8 @@ const artist = 'SELECT DISTINCT rdf:type(?album) tracker:id(?album) as id (SELEC
 
 const album_count = 'SELECT COUNT(?album) AS childcount WHERE { ?album a nmm:MusicAlbum }';
 
+const artist_count = 'SELECT COUNT(DISTINCT ?artist) WHERE { ?artist a nmm:Artist . ?album nmm:performer ?artist }';
+
 /*const songs = 'SELECT DISTINCT rdf:type(?song) tracker:id(?song) as id nie:url(?song) as url nie:title(?song) as title nmm:artistName(nmm:performer(?song)) as artist nie:title(nmm:musicAlbum(?song)) as album nfo:duration(?song) as duration { ?song a nmm:MusicPiece } (SELECT fn:year-from-dateTime(?c) WHERE { ?_2 nmm:musicAlbum(?song); nie:contentCreated ?c; tracker:available "true" } LIMIT 1) as creation-date ORDER BY tracker:added(?song)';*/
 
 const songs = 'SELECT DISTINCT rdf:type(?song) tracker:id(?song) as id nie:url(?song) as url nie:title(?song) as title nmm:artistName(nmm:performer(?song)) as artist nie:title(nmm:musicAlbum(?song)) as album nfo:duration(?song) as duration { ?song a nmm:MusicPiece } ORDER BY tracker:added(?song)';
diff --git a/src/view.js b/src/view.js
index ce6fde9..9427c72 100644
--- a/src/view.js
+++ b/src/view.js
@@ -397,6 +397,7 @@ const Artists = new Lang.Class({
     _init: function(header_bar, player) {
         this.parent("Artists", header_bar);
         this.player = player;
+        this.countQuery = Query.artist_count;
         this._artists = {};
         this._artistAlbumsWidget = new Gtk.Frame({
             shadow_type:    Gtk.ShadowType.NONE
@@ -449,6 +450,7 @@ const Artists = new Lang.Class({
     },
 
     _addItem: function (source, param, item) {
+        this._offset+=1;
         if( item == null )
             return
         var artist = "Unknown"
