Merge pull request #4389 from JRaspass/master
Remove old Emby (3.x) version checks
This commit is contained in:
commit
8a0e2f142d
3 changed files with 8 additions and 24 deletions
|
@ -3423,12 +3423,6 @@ class PlaybackManager {
|
||||||
|
|
||||||
streamInfo.lastMediaInfoQuery = new Date().getTime();
|
streamInfo.lastMediaInfoQuery = new Date().getTime();
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(serverId);
|
|
||||||
|
|
||||||
if (!apiClient.isMinServerVersion('3.2.70.7')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ServerConnections.getApiClient(serverId).getLiveStreamMediaInfo(liveStreamId).then(function (info) {
|
ServerConnections.getApiClient(serverId).getLiveStreamMediaInfo(liveStreamId).then(function (info) {
|
||||||
mediaSource.MediaStreams = info.MediaStreams;
|
mediaSource.MediaStreams = info.MediaStreams;
|
||||||
Events.trigger(player, 'mediastreamschange');
|
Events.trigger(player, 'mediastreamschange');
|
||||||
|
|
|
@ -54,15 +54,11 @@ import confirm from '../../../components/confirm/confirm';
|
||||||
}
|
}
|
||||||
|
|
||||||
function showDeviceMenu(view, btn, deviceId) {
|
function showDeviceMenu(view, btn, deviceId) {
|
||||||
const menuItems = [];
|
const menuItems = [{
|
||||||
|
name: globalize.translate('Edit'),
|
||||||
if (canEdit) {
|
id: 'open',
|
||||||
menuItems.push({
|
icon: 'mode_edit'
|
||||||
name: globalize.translate('Edit'),
|
}];
|
||||||
id: 'open',
|
|
||||||
icon: 'mode_edit'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (canDelete(deviceId)) {
|
if (canDelete(deviceId)) {
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
|
@ -100,7 +96,7 @@ import confirm from '../../../components/confirm/confirm';
|
||||||
deviceHtml += '<div class="cardBox visualCardBox">';
|
deviceHtml += '<div class="cardBox visualCardBox">';
|
||||||
deviceHtml += '<div class="cardScalable">';
|
deviceHtml += '<div class="cardScalable">';
|
||||||
deviceHtml += '<div class="cardPadder cardPadder-backdrop"></div>';
|
deviceHtml += '<div class="cardPadder cardPadder-backdrop"></div>';
|
||||||
deviceHtml += `<a is="emby-linkbutton" href="${canEdit ? '#/device.html?id=' + device.Id : '#'}" class="cardContent cardImageContainer ${cardBuilder.getDefaultBackgroundClass()}">`;
|
deviceHtml += `<a is="emby-linkbutton" href="#/device.html?id=${device.Id}" class="cardContent cardImageContainer ${cardBuilder.getDefaultBackgroundClass()}">`;
|
||||||
const iconUrl = imageHelper.getDeviceIcon(device);
|
const iconUrl = imageHelper.getDeviceIcon(device);
|
||||||
|
|
||||||
if (iconUrl) {
|
if (iconUrl) {
|
||||||
|
@ -114,7 +110,7 @@ import confirm from '../../../components/confirm/confirm';
|
||||||
deviceHtml += '</div>';
|
deviceHtml += '</div>';
|
||||||
deviceHtml += '<div class="cardFooter">';
|
deviceHtml += '<div class="cardFooter">';
|
||||||
|
|
||||||
if (canEdit || canDelete(device.Id)) {
|
if (canDelete(device.Id)) {
|
||||||
if (globalize.getIsRTL())
|
if (globalize.getIsRTL())
|
||||||
deviceHtml += '<div style="text-align:left; float:left;padding-top:5px;">';
|
deviceHtml += '<div style="text-align:left; float:left;padding-top:5px;">';
|
||||||
else
|
else
|
||||||
|
@ -155,7 +151,6 @@ import confirm from '../../../components/confirm/confirm';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const canEdit = ApiClient.isMinServerVersion('3.4.1.31');
|
|
||||||
export default function (view) {
|
export default function (view) {
|
||||||
view.querySelector('.devicesList').addEventListener('click', function (e) {
|
view.querySelector('.devicesList').addEventListener('click', function (e) {
|
||||||
const btnDeviceMenu = dom.parentWithClass(e.target, 'btnDeviceMenu');
|
const btnDeviceMenu = dom.parentWithClass(e.target, 'btnDeviceMenu');
|
||||||
|
|
|
@ -1157,12 +1157,7 @@ function renderMoreFromArtist(view, item, apiClient) {
|
||||||
const section = view.querySelector('.moreFromArtistSection');
|
const section = view.querySelector('.moreFromArtistSection');
|
||||||
|
|
||||||
if (section) {
|
if (section) {
|
||||||
if (item.Type === 'MusicArtist') {
|
if (item.Type !== 'MusicArtist' && (item.Type !== 'MusicAlbum' || !item.AlbumArtists || !item.AlbumArtists.length)) {
|
||||||
if (!apiClient.isMinServerVersion('3.4.1.19')) {
|
|
||||||
section.classList.add('hide');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if (item.Type !== 'MusicAlbum' || !item.AlbumArtists || !item.AlbumArtists.length) {
|
|
||||||
section.classList.add('hide');
|
section.classList.add('hide');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue