added sync to the tour

This commit is contained in:
Luke Pulverenti
2015-02-11 15:23:07 -05:00
parent cfb7e50720
commit 21933002f3
4 changed files with 28 additions and 15 deletions

View File

@@ -104,7 +104,7 @@ namespace MediaBrowser.Server.Implementations.Dto
SetItemByNameInfo(item, dto, libraryItems.ToList(), user);
}
FillSyncInfo(dto, item, itemIdsWithSyncJobs, options);
FillSyncInfo(dto, item, itemIdsWithSyncJobs, options, user);
list.Add(dto);
}
@@ -128,11 +128,11 @@ namespace MediaBrowser.Server.Implementations.Dto
SetItemByNameInfo(item, dto, libraryItems.ToList(), user);
FillSyncInfo(dto, item, options);
FillSyncInfo(dto, item, options, user);
return dto;
}
FillSyncInfo(dto, item, options);
FillSyncInfo(dto, item, options, user);
return dto;
}
@@ -171,11 +171,12 @@ namespace MediaBrowser.Server.Implementations.Dto
return result.Items;
}
private void FillSyncInfo(BaseItemDto dto, BaseItem item, DtoOptions options)
private void FillSyncInfo(BaseItemDto dto, BaseItem item, DtoOptions options, User user)
{
if (options.Fields.Contains(ItemFields.SyncInfo))
{
dto.SupportsSync = _syncManager.SupportsSync(item);
var userCanSync = user != null && user.Policy.EnableSync;
dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
}
if (dto.SupportsSync ?? false)
@@ -184,11 +185,12 @@ namespace MediaBrowser.Server.Implementations.Dto
}
}
private void FillSyncInfo(BaseItemDto dto, BaseItem item, IEnumerable<string> itemIdsWithSyncJobs, DtoOptions options)
private void FillSyncInfo(BaseItemDto dto, BaseItem item, IEnumerable<string> itemIdsWithSyncJobs, DtoOptions options, User user)
{
if (options.Fields.Contains(ItemFields.SyncInfo))
{
dto.SupportsSync = _syncManager.SupportsSync(item);
var userCanSync = user != null && user.Policy.EnableSync;
dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
}
if (dto.SupportsSync ?? false)
@@ -308,7 +310,7 @@ namespace MediaBrowser.Server.Implementations.Dto
var dto = GetBaseItemDtoInternal(item, options, user);
SetItemByNameInfo(item, dto, taggedItems, user);
FillSyncInfo(dto, item, options);
FillSyncInfo(dto, item, options, user);
return dto;
}

View File

@@ -656,6 +656,7 @@
"WebClientTourUserPreferences4": "Configure backdrops, theme songs and external players",
"WebClientTourMobile1": "The web client works great on smartphones and tablets...",
"WebClientTourMobile2": "and easily controls other devices and Media Browser apps",
"WebClientTourMySync": "Sync your personal media to your devices for offline viewing.",
"MessageEnjoyYourStay": "Enjoy your stay",
"DashboardTourDashboard": "The server dashboard allows you to monitor your server and your users. You'll always know who is doing what and where they are.",
"DashboardTourHelp": "In-app help provides easy buttons to open wiki pages relating to the on-screen content.",
@@ -667,6 +668,7 @@
"DashboardTourNotifications": "Automatically send notifications of server events to your mobile device, email and more.",
"DashboardTourScheduledTasks": "Easily manage long running operations with scheduled tasks. Decide when they run, and how often.",
"DashboardTourMobile": "The Media Browser dashboard works great on smartphones and tablets. Manage your server from the palm of your hand anytime, anywhere.",
"DashboardTourSync": "Sync your personal media to your devices for offline viewing.",
"MessageRefreshQueued": "Refresh queued",
"TabDevices": "Devices",
"TabExtras": "Extras",