mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
Use prettyname if description is missing in collection's settings, save trackcount when updating index
This commit is contained in:
@@ -1496,6 +1496,7 @@ Tomahawk.Collection = {
|
|||||||
t.sqlSelect("tracks", resultMap, ["_id", "artistId", "albumId", "track"]);
|
t.sqlSelect("tracks", resultMap, ["_id", "artistId", "albumId", "track"]);
|
||||||
return t.execDefferedStatements();
|
return t.execDefferedStatements();
|
||||||
}).then(function (results) {
|
}).then(function (results) {
|
||||||
|
that._trackCount = results[0].length;
|
||||||
Tomahawk.log("Added " + results[0].length + " tracks to collection '" + id + "'");
|
Tomahawk.log("Added " + results[0].length + " tracks to collection '" + id + "'");
|
||||||
// Add the db ids together with the basic metadata to the fuzzy index list
|
// Add the db ids together with the basic metadata to the fuzzy index list
|
||||||
var fuzzyIndexList = [];
|
var fuzzyIndexList = [];
|
||||||
@@ -1788,6 +1789,9 @@ Tomahawk.Collection = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
collection: function () {
|
collection: function () {
|
||||||
|
this.settings.trackcount = this._trackCount;
|
||||||
|
if(! this.settings.description)
|
||||||
|
this.settings.description = this.settings.prettyname;
|
||||||
return this.settings;
|
return this.settings;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user