fix:Replace calls containing deprecated 'uri' parameter of core.LibraryController.lookup().
This commit is contained in:
parent
19363e1476
commit
a81a3ac1d8
@ -541,7 +541,7 @@ function getFavourites() {
|
||||
function addFavourite(uri, name) {
|
||||
var uri = uri || $('#streamuriinput').val().trim();
|
||||
var name = name || $('#streamnameinput').val().trim();
|
||||
mopidy.library.lookup({'uri': uri}).then(function(results) {
|
||||
mopidy.library.lookup({'uris': [uri]}).then(function(results) {
|
||||
var newTracks = results[uri];
|
||||
if (newTracks.length == 1) {
|
||||
// TODO: Supporting adding an entire playlist?
|
||||
|
||||
@ -266,7 +266,8 @@ function showArtist(nwuri) {
|
||||
//TODO cache
|
||||
$('#h_artistname').html('');
|
||||
showLoading(true);
|
||||
mopidy.library.lookup({'uri': nwuri}).then(function(resultArr) {
|
||||
mopidy.library.lookup({'uris': [nwuri]}).then(function(resultDict) {
|
||||
var resultArr = resultDict[Object.keys(resultDict)[0]];
|
||||
resultArr.uri = nwuri;
|
||||
processArtistResults(resultArr);
|
||||
}, console.error);
|
||||
@ -291,7 +292,8 @@ function showAlbum(uri) {
|
||||
$('#coverpopupalbumname').html(albumname);
|
||||
$('#coverpopupartist').html(artistname);
|
||||
showLoading(false);
|
||||
mopidy.library.lookup({'uri': uri}).then(function(resultArr) {
|
||||
mopidy.library.lookup({'uris': [uri]}).then(function(resultDict) {
|
||||
var resultArr = resultDict[Object.keys(resultDict)[0]];
|
||||
resultArr.uri = uri;
|
||||
processAlbumResults(resultArr);
|
||||
}, console.error);
|
||||
@ -299,7 +301,8 @@ function showAlbum(uri) {
|
||||
showLoading(true);
|
||||
$('#h_albumname').html('');
|
||||
$('#h_albumartist').html('');
|
||||
mopidy.library.lookup({'uri': uri}).then(function(resultArr) {
|
||||
mopidy.library.lookup({'uris': [uri]}).then(function(resultDict) {
|
||||
var resultArr = resultDict[Object.keys(resultDict)[0]];
|
||||
resultArr.uri = uri;
|
||||
processAlbumResults(resultArr);
|
||||
}, console.error);
|
||||
|
||||
@ -118,9 +118,10 @@ function processBrowseDir(resultArr) {
|
||||
iconClass = getMediaClass(resultArr[i].uri);
|
||||
if (resultArr[i].type == 'track') {
|
||||
//console.log(resultArr[i]);
|
||||
mopidy.library.lookup({'uri': resultArr[i].uri}).then(function (resultArr) {
|
||||
popupData[resultArr[0].uri] = resultArr[0];
|
||||
browseTracks.push(resultArr[0]);
|
||||
mopidy.library.lookup({'uris': [resultArr[i].uri]}).then(function (resultDict) {
|
||||
var uri = Object.keys(resultDict)[0];
|
||||
popupData[uri] = resultDict[uri][0];
|
||||
browseTracks.push(resultDict[uri][0]);
|
||||
}, console.error);
|
||||
child += '<li class="song albumli" id="browselisttracks-' + resultArr[i].uri + '">' +
|
||||
'<a href="#" class="moreBtn" onclick="return popupTracks(event, \'' + uri + '\', \'' + resultArr[i].uri + '\', \'' + index + '\');">' +
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
CACHE MANIFEST
|
||||
|
||||
# 2016-01-30:v1
|
||||
# 2016-01-31:v1
|
||||
|
||||
NETWORK:
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user