~ahayzen/+junk/music-app-u1db-conversion

« back to all changes in this revision

Viewing changes to meta-database.js

  • Committer: Victor Thompson
  • Date: 2014-01-11 04:10:51 UTC
  • mto: This revision was merged to the branch mainline in revision 305.
  • Revision ID: victor.thompson@gmail.com-20140111041051-8fp4f4d1oqoer8ip
Revert last change

Show diffs side-by-side

added added

removed removed

Lines of Context:
349
349
    return res;
350
350
}
351
351
 
352
 
function getGenreCover(genre) {
353
 
    var res = "";
354
 
    var db = getDatabase();
355
 
    //console.log("Genre: " + genre);
356
 
    db.transaction( function(tx) {
357
 
        var rs = tx.executeSql("SELECT cover FROM metadata WHERE genre=? ORDER BY cover DESC", [genre]);
358
 
        if (rs.rows.length > 0) {
359
 
            res = rs.rows.item(0).value;
360
 
        }
361
 
    });
362
 
    return res;
363
 
}
364
 
 
365
352
 
366
353
function size() {
367
354
    var db = getDatabase();