fix dynamic mode not sorting songs correctly
Previously when track information was loaded from the DB dates (such as lastQueueDate) were read as strings since they were simply deserialized with JSON.parse. Now type information is used to turn date properties into actual dates so that sorting and date operations can work.
This commit is contained in:
parent
656aab43ab
commit
b861d4776c
1 changed files with 8 additions and 1 deletions
|
|
@ -1757,7 +1757,14 @@ function isFileIgnored(basename) {
|
|||
}
|
||||
|
||||
function deserializeFileData(dataStr) {
|
||||
return JSON.parse(dataStr);
|
||||
var dbFile = JSON.parse(dataStr);
|
||||
for (var propName in DB_PROPS) {
|
||||
var propInfo = DB_PROPS[propName];
|
||||
if (!propInfo) continue;
|
||||
var parser = PROP_TYPE_PARSERS[propInfo.type];
|
||||
dbFile[propName] = parser(dbFile[propName]);
|
||||
}
|
||||
return dbFile;
|
||||
}
|
||||
|
||||
function serializePlaylistItem(item) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue