Skip to content

Commit

Permalink
allow loading lyrics for instrumental songs
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Nov 20, 2024
1 parent 7f37482 commit d0c1d52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/app/scripts/controllers/relations.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ angular.module('bmmApp')

$rootScope.songtreasures.lyricsAvailable = false;
$rootScope.songtreasures.lyricsStatus = 'loading';
_api.songLyricsGet(response.result.id, model.original_language)
_api.songLyricsGet(response.result.id, convertLanguageToSongtreasure(model.original_language))
.fail(function(response){
$rootScope.songtreasures.lyricsStatus = 'not available';
})
Expand Down
3 changes: 1 addition & 2 deletions common/app/scripts/services/_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1208,10 +1208,9 @@ angular.module('bmmLibApp')
};

factory.songLyricsGet = function(songGuid, language){
var songtreasuresLanguage = language === "nb" ? "no" : language;
return factory.addToQueue({
method: 'GET',
url: serverUrl+'songtreasures/Songs/'+songGuid+'/Lyrics?language='+songtreasuresLanguage+'&format=json',
url: serverUrl+'songtreasures/Songs/'+songGuid+'/Lyrics?language='+language+'&format=json',
beforeSend: function(xhr) {
xhr.setRequestHeader("X-Api-Version", 3);
}
Expand Down

0 comments on commit d0c1d52

Please sign in to comment.