mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add + button to song lists
This commit is contained in:
parent
dc02d75161
commit
3ed10f65e5
12 changed files with 76 additions and 16 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.465",
|
||||
"_release": "1.4.465",
|
||||
"version": "1.4.466",
|
||||
"_release": "1.4.466",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.465",
|
||||
"commit": "13b0fddbfbc24ac9dff0db7007be0cde3a94aed2"
|
||||
"tag": "1.4.466",
|
||||
"commit": "ae0866aa2337e97515ea80a82a813b17ef662613"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -247,6 +247,9 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
else if (options.shape === 'square') {
|
||||
options.width = options.width || 243;
|
||||
}
|
||||
else if (options.shape === 'banner') {
|
||||
options.width = options.width || 800;
|
||||
}
|
||||
}
|
||||
|
||||
options.width = options.width || getImageWidth(options.shape);
|
||||
|
@ -504,6 +507,9 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
if (shape.indexOf('square') !== -1) {
|
||||
return 1;
|
||||
}
|
||||
if (shape.indexOf('banner') !== -1) {
|
||||
return (1000 / 185);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -398,6 +398,10 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
|
|||
|
||||
if (!clickEntireItem) {
|
||||
|
||||
if (options.queueButton) {
|
||||
html += '<button is="paper-icon-button-light" class="listItemButton itemAction autoSize" data-action="queue"><i class="md-icon"></i></button>';
|
||||
}
|
||||
|
||||
if (options.moreButton !== false) {
|
||||
html += '<button is="paper-icon-button-light" class="listItemButton itemAction autoSize" data-action="menu"><i class="md-icon">' + moreIcon + '</i></button>';
|
||||
}
|
||||
|
|
|
@ -2355,7 +2355,36 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
return player.queue(item);
|
||||
}
|
||||
|
||||
// TODO
|
||||
if (options.items) {
|
||||
|
||||
return translateItemsForPlayback(options.items, options).then(function (items) {
|
||||
|
||||
queueAll(items, mode);
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
if (!options.serverId) {
|
||||
throw new Error('serverId required!');
|
||||
}
|
||||
|
||||
return getItemsForPlayback(options.serverId, {
|
||||
|
||||
Ids: options.ids.join(',')
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
return translateItemsForPlayback(result.Items, options).then(function (items) {
|
||||
queueAll(items, mode);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function queueAll(items, mode) {
|
||||
for (var i = 0, length = items.length; i < length; i++) {
|
||||
playlist.push(items[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function onPlaybackStarted(player, streamInfo, mediaSource) {
|
||||
|
|
|
@ -209,6 +209,12 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
|||
});
|
||||
}
|
||||
|
||||
function sendToast(text) {
|
||||
require(['toast'], function (toast) {
|
||||
toast(text);
|
||||
});
|
||||
}
|
||||
|
||||
function executeAction(card, target, action) {
|
||||
|
||||
target = target || card;
|
||||
|
@ -257,6 +263,22 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
|||
});
|
||||
}
|
||||
|
||||
else if (action === 'queue') {
|
||||
|
||||
if (playbackManager.isPlaying()) {
|
||||
playbackManager.queue({
|
||||
ids: [playableItemId],
|
||||
serverId: serverId
|
||||
});
|
||||
sendToast(globalize.translate('sharedcomponents#MediaQueued'));
|
||||
} else {
|
||||
playbackManager.queue({
|
||||
ids: [playableItemId],
|
||||
serverId: serverId
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else if (action === 'playallfromhere') {
|
||||
playAllFromHere(card, serverId);
|
||||
}
|
||||
|
|
|
@ -377,5 +377,6 @@
|
|||
"SyncJobItemStatusRemovedFromDevice": "Removed from device",
|
||||
"SyncJobItemStatusCancelled": "Cancelled",
|
||||
"Retry": "Retry",
|
||||
"HeaderMyDevice": "My Device"
|
||||
"HeaderMyDevice": "My Device",
|
||||
"MediaQueued": "Media queued."
|
||||
}
|
|
@ -51,10 +51,6 @@
|
|||
<button type="button" is="paper-icon-button-light" id="btnSelectSeriesRecordingPath" title="${ButtonSelectDirectory}"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
</div>
|
||||
<label class="checkboxContainer">
|
||||
<input type="checkbox" is="emby-checkbox" id="chkOrganize" />
|
||||
<span>${OptionSendRecordingsToAutoOrganize}</span>
|
||||
</label>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" id="chkConvertRecordings" />
|
||||
|
|
|
@ -274,7 +274,8 @@
|
|||
playFromHere: true,
|
||||
action: 'playallfromhere',
|
||||
smallIcon: true,
|
||||
artist: true
|
||||
artist: true,
|
||||
queueButton: true
|
||||
});
|
||||
break;
|
||||
|
||||
|
|
|
@ -1260,7 +1260,8 @@
|
|||
action: 'playallfromhere',
|
||||
image: false,
|
||||
artist: 'auto',
|
||||
containerAlbumArtist: item.AlbumArtist
|
||||
containerAlbumArtist: item.AlbumArtist,
|
||||
queueButton: true
|
||||
});
|
||||
isList = true;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
$('#selectGuideDays', page).val(config.GuideDays || '');
|
||||
|
||||
$('#chkMovies', page).checked(config.EnableMovieProviders);
|
||||
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
||||
$('#chkConvertRecordings', page).checked(config.EnableRecordingEncoding);
|
||||
$('#chkPreserveAudio', page).checked(config.EnableOriginalAudioWithEncodedRecordings || false);
|
||||
$('#chkPreserveVideo', page).checked(config.RecordedVideoCodec == 'copy');
|
||||
|
@ -38,7 +37,6 @@
|
|||
|
||||
config.GuideDays = $('#selectGuideDays', form).val() || null;
|
||||
config.EnableMovieProviders = $('#chkMovies', form).checked();
|
||||
config.EnableAutoOrganize = $('#chkOrganize', form).checked();
|
||||
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
|
||||
config.EnableOriginalAudioWithEncodedRecordings = $('#chkPreserveAudio', form).checked();
|
||||
config.RecordedVideoCodec = $('#chkPreserveVideo', form).checked() ? 'copy' : null;
|
||||
|
|
|
@ -98,7 +98,8 @@
|
|||
html = listView.getListViewHtml({
|
||||
items: result.Items,
|
||||
context: 'music',
|
||||
sortBy: query.SortBy
|
||||
sortBy: query.SortBy,
|
||||
queueButton: true
|
||||
});
|
||||
}
|
||||
else if (viewStyle == "PosterCard") {
|
||||
|
|
|
@ -73,7 +73,8 @@
|
|||
items: result.Items,
|
||||
action: 'playallfromhere',
|
||||
smallIcon: true,
|
||||
artist: true
|
||||
artist: true,
|
||||
queueButton: true
|
||||
});
|
||||
|
||||
var i, length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue