Skip to content

Commit

Permalink
Don't show play actions unless an item has params with item_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
CDrummond committed Feb 6, 2019
1 parent ee5cdd9 commit 88518be
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
0.3.2
-----
1. Support ratings via TrackStat plugin.
2. Don't show play actions unless an item has params with item_id.

0.3.1
-----
Expand Down
2 changes: 1 addition & 1 deletion MaterialSkin/HTML/material/html/js/browse-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ var lmsBrowse = Vue.component("lms-browse", {
<img v-lazy="item.image"></img>
<div class="image-grid-text truncate-multiline">{{item.title | clampText}}</div>
<div class="image-grid-text truncate-multiline subtext">{{item.subtitle | clampText}}</div>
<v-btn flat icon @click.stop="itemMenu(item, index, $event)" class="image-grid-btn">
<v-btn flat icon v-if="item.menuActions && item.menuActions.length>0" @click.stop="itemMenu(item, index, $event)" class="image-grid-btn">
<v-icon v-if="item.menuActions && item.menuActions.length>1">more_vert</v-icon>
<v-icon v-else-if="item.menuActions && item.menuActions.length===1 && undefined==item.menuActions[0].svg" :title="item.menuActions[0].title">{{item.menuActions[0].icon}}</v-icon>
<img v-else-if="item.menuActions && item.menuActions.length===1" :title="item.menuActions[0].title" class="svg-img" :src="item.menuActions[0].svg | svgIcon(darkUi)"></img>
Expand Down
24 changes: 13 additions & 11 deletions MaterialSkin/HTML/material/html/js/browse-resp.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,19 @@ function parseBrowseResp(data, parent, options, idStart, cacheKey) {
i.title = (num>9 ? num : ("0" + num))+" "+text;
}

if (playAction) {
i.menuActions.push(PLAY_ACTION);
addedPlayAction = true;
}
if (insertAction) {
i.menuActions.push(INSERT_ACTION);
addedPlayAction = true;
}
if (addAction) {
i.menuActions.push(ADD_ACTION);
addedPlayAction = true;
if (i.params && i.params.item_id) {
if (playAction) {
i.menuActions.push(PLAY_ACTION);
addedPlayAction = true;
}
if (insertAction) {
i.menuActions.push(INSERT_ACTION);
addedPlayAction = true;
}
if (addAction) {
i.menuActions.push(ADD_ACTION);
addedPlayAction = true;
}
}
}
var addedDivider = false;
Expand Down

0 comments on commit 88518be

Please sign in to comment.