bug: extra text added in new videos and imgs

This commit is contained in:
Chris Cochrun 2022-09-20 13:55:50 -05:00
parent eb8d98b924
commit 3461bfdf98

View file

@ -403,11 +403,19 @@ ColumnLayout {
function addItem(index, name, type, function addItem(index, name, type,
background, backgroundType, text, itemID) { background, backgroundType, text, itemID) {
const newtext = songsqlmodel.getLyricList(itemID); if (type === "song") {
const newtext = songsqlmodel.getLyricList(itemID);
print("adding: " + name + " of type " + type);
serviceItemModel.insertItem(index, name,
type, background,
backgroundType, newtext);
totalServiceItems++;
return;
}
print("adding: " + name + " of type " + type); print("adding: " + name + " of type " + type);
serviceItemModel.insertItem(index, name, serviceItemModel.insertItem(index, name,
type, background, type, background,
backgroundType, newtext); backgroundType);
totalServiceItems++; totalServiceItems++;
} }
@ -415,16 +423,21 @@ ColumnLayout {
print("adding: " + name + " of type " + type); print("adding: " + name + " of type " + type);
let lyrics; let lyrics;
if (type === "song") { if (type === "song") {
print("THIS IS A SONG!!!!!");
print(itemID); print(itemID);
lyrics = songsqlmodel.getLyricList(itemID); lyrics = songsqlmodel.getLyricList(itemID);
print(lyrics); print(lyrics);
} serviceItemModel.addItem(name, type, background,
backgroundType, lyrics);
totalServiceItems++;
return;
};
print(background); print(background);
print(backgroundType); print(backgroundType);
serviceItemModel.addItem(name, type, background, serviceItemModel.addItem(name, type, background,
backgroundType, lyrics); backgroundType);
totalServiceItems++; totalServiceItems++;
} }