Merge pull request #5082 from nielsvanvelzen/nvv-remove-sync

Remove unused sync code
This commit is contained in:
Bill Thornton 2024-01-07 00:59:41 -05:00 committed by GitHub
commit c35edd30b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 41 deletions

View file

@ -230,10 +230,6 @@ const supportedFeatures = function () {
features.push('htmlvideoautoplay');
}
if (browser.edgeUwp) {
features.push('sync');
}
if (supportsFullscreen()) {
features.push('fullscreenchange');
}

View file

@ -290,14 +290,6 @@ export function getCommands(options) {
});
}
if (options.sync !== false && itemHelper.canSync(user, item)) {
commands.push({
name: globalize.translate('Sync'),
id: 'sync',
icon: 'sync'
});
}
if (options.openAlbum !== false && item.AlbumId && item.MediaType !== 'Photo') {
commands.push({
name: globalize.translate('ViewAlbum'),

View file

@ -154,18 +154,6 @@ export function canEditImages (user, item) {
return itemType !== 'Timer' && itemType !== 'SeriesTimer' && canEdit(user, item) && !isLocalItem(item);
}
export function canSync (user, item) {
if (user && !user.Policy.EnableContentDownloading) {
return false;
}
if (isLocalItem(item)) {
return false;
}
return item.SupportsSync;
}
export function canShare (item, user) {
if (item.Type === 'Program') {
return false;
@ -311,7 +299,6 @@ export default {
canIdentify: canIdentify,
canEdit: canEdit,
canEditImages: canEditImages,
canSync: canSync,
canShare: canShare,
enableDateAddedDisplay: enableDateAddedDisplay,
canMarkPlayed: canMarkPlayed,

View file

@ -260,7 +260,6 @@ function showMoreMenu(context, button, user) {
edit: false,
editImages: true,
editSubtitles: true,
sync: false,
share: false,
play: false,
queue: false,

View file

@ -421,24 +421,10 @@ function showBySelector(selector, show) {
function updateLibraryMenu(user) {
if (!user) {
showBySelector('.libraryMenuDownloads', false);
showBySelector('.lnkSyncToOtherDevices', false);
showBySelector('.userMenuOptions', false);
return;
}
if (user.Policy.EnableContentDownloading) {
showBySelector('.lnkSyncToOtherDevices', true);
} else {
showBySelector('.lnkSyncToOtherDevices', false);
}
if (user.Policy.EnableContentDownloading && appHost.supports('sync')) {
showBySelector('.libraryMenuDownloads', true);
} else {
showBySelector('.libraryMenuDownloads', false);
}
const userId = Dashboard.getCurrentUserId();
const apiClient = getCurrentApiClient();

View file

@ -1497,7 +1497,6 @@
"SubtitleYellow": "Yellow",
"Suggestions": "Suggestions",
"Sunday": "Sunday",
"Sync": "Sync",
"SyncPlayAccessHelp": "The SyncPlay feature enables to sync playback with other devices. Select the level of access this user has to the SyncPlay.",
"SyncPlayGroupDefaultTitle": "{0}'s group",
"SystemDlnaProfilesHelp": "System profiles are read-only. Changes to a system profile will be saved to a new custom profile.",