removed GetDisplayPreferencesId method
This commit is contained in:
parent
2b07e6aaf8
commit
e670b875fe
|
@ -272,7 +272,7 @@ namespace MediaBrowser.Controller.Dto
|
||||||
{
|
{
|
||||||
if (item.IsFolder && fields.Contains(ItemFields.DisplayPreferencesId))
|
if (item.IsFolder && fields.Contains(ItemFields.DisplayPreferencesId))
|
||||||
{
|
{
|
||||||
dto.DisplayPreferencesId = ((Folder)item).GetDisplayPreferencesId(user.Id).ToString();
|
dto.DisplayPreferencesId = ((Folder) item).DisplayPreferencesId.ToString("N");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.IsFolder)
|
if (item.IsFolder)
|
||||||
|
|
|
@ -81,16 +81,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the display preferences id.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userId">The user id.</param>
|
|
||||||
/// <returns>Guid.</returns>
|
|
||||||
public Guid GetDisplayPreferencesId(Guid userId)
|
|
||||||
{
|
|
||||||
return (userId + DisplayPreferencesId.ToString()).GetMD5();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<LinkedChild> LinkedChildren { get; set; }
|
public List<LinkedChild> LinkedChildren { get; set; }
|
||||||
|
|
||||||
protected virtual bool SupportsShortcutChildren
|
protected virtual bool SupportsShortcutChildren
|
||||||
|
|
|
@ -99,7 +99,7 @@ namespace MediaBrowser.ServerApplication
|
||||||
var currentFolder = folder;
|
var currentFolder = folder;
|
||||||
Task.Factory.StartNew(() =>
|
Task.Factory.StartNew(() =>
|
||||||
{
|
{
|
||||||
var prefs = ddlProfile.SelectedItem != null ? _displayPreferencesManager.GetDisplayPreferences(currentFolder.GetDisplayPreferencesId((ddlProfile.SelectedItem as User).Id), (ddlProfile.SelectedItem as User).Id, "LibraryExplorer") ?? new DisplayPreferences { SortBy = ItemSortBy.SortName } : new DisplayPreferences { SortBy = ItemSortBy.SortName };
|
var prefs = ddlProfile.SelectedItem != null ? _displayPreferencesManager.GetDisplayPreferences(currentFolder.DisplayPreferencesId, (ddlProfile.SelectedItem as User).Id, "LibraryExplorer") ?? new DisplayPreferences { SortBy = ItemSortBy.SortName } : new DisplayPreferences { SortBy = ItemSortBy.SortName };
|
||||||
var node = new TreeViewItem { Tag = currentFolder };
|
var node = new TreeViewItem { Tag = currentFolder };
|
||||||
|
|
||||||
var subChildren = currentFolder.GetChildren(CurrentUser, true, prefs.IndexBy);
|
var subChildren = currentFolder.GetChildren(CurrentUser, true, prefs.IndexBy);
|
||||||
|
@ -152,7 +152,7 @@ namespace MediaBrowser.ServerApplication
|
||||||
var subFolder = item as Folder;
|
var subFolder = item as Folder;
|
||||||
if (subFolder != null)
|
if (subFolder != null)
|
||||||
{
|
{
|
||||||
var prefs = _displayPreferencesManager.GetDisplayPreferences(subFolder.GetDisplayPreferencesId(user.Id), user.Id, "LibraryExplorer");
|
var prefs = _displayPreferencesManager.GetDisplayPreferences(subFolder.DisplayPreferencesId, user.Id, "LibraryExplorer");
|
||||||
|
|
||||||
AddChildren(node, OrderBy(subFolder.GetChildren(user, true), user, prefs.SortBy), user);
|
AddChildren(node, OrderBy(subFolder.GetChildren(user, true), user, prefs.SortBy), user);
|
||||||
node.Header = item.Name + " (" + node.Items.Count + ")";
|
node.Header = item.Name + " (" + node.Items.Count + ")";
|
||||||
|
@ -200,7 +200,7 @@ namespace MediaBrowser.ServerApplication
|
||||||
ItemSortBy.Runtime
|
ItemSortBy.Runtime
|
||||||
};
|
};
|
||||||
|
|
||||||
var prefs = _displayPreferencesManager.GetDisplayPreferences(folder.GetDisplayPreferencesId((ddlProfile.SelectedItem as User).Id), (ddlProfile.SelectedItem as User).Id, "LibraryExplorer");
|
var prefs = _displayPreferencesManager.GetDisplayPreferences(folder.DisplayPreferencesId, (ddlProfile.SelectedItem as User).Id, "LibraryExplorer");
|
||||||
|
|
||||||
ddlIndexBy.SelectedItem = prefs != null
|
ddlIndexBy.SelectedItem = prefs != null
|
||||||
? prefs.IndexBy ?? LocalizedStrings.Instance.GetString("NoneDispPref")
|
? prefs.IndexBy ?? LocalizedStrings.Instance.GetString("NoneDispPref")
|
||||||
|
@ -359,7 +359,7 @@ namespace MediaBrowser.ServerApplication
|
||||||
var folder = treeItem != null
|
var folder = treeItem != null
|
||||||
? treeItem.Tag as Folder
|
? treeItem.Tag as Folder
|
||||||
: null;
|
: null;
|
||||||
var prefs = folder != null ? _displayPreferencesManager.GetDisplayPreferences(folder.GetDisplayPreferencesId(CurrentUser.Id), CurrentUser.Id, "LibraryExplorer") : new DisplayPreferences { SortBy = ItemSortBy.SortName };
|
var prefs = folder != null ? _displayPreferencesManager.GetDisplayPreferences(folder.DisplayPreferencesId, CurrentUser.Id, "LibraryExplorer") : new DisplayPreferences { SortBy = ItemSortBy.SortName };
|
||||||
if (folder != null && prefs.IndexBy != ddlIndexBy.SelectedItem as string)
|
if (folder != null && prefs.IndexBy != ddlIndexBy.SelectedItem as string)
|
||||||
{
|
{
|
||||||
//grab UI context so we can update within the below task
|
//grab UI context so we can update within the below task
|
||||||
|
@ -400,7 +400,7 @@ namespace MediaBrowser.ServerApplication
|
||||||
var folder = treeItem != null
|
var folder = treeItem != null
|
||||||
? treeItem.Tag as Folder
|
? treeItem.Tag as Folder
|
||||||
: null;
|
: null;
|
||||||
var prefs = folder != null ? _displayPreferencesManager.GetDisplayPreferences(folder.GetDisplayPreferencesId(CurrentUser.Id), CurrentUser.Id, "LibraryExplorer") : new DisplayPreferences();
|
var prefs = folder != null ? _displayPreferencesManager.GetDisplayPreferences(folder.DisplayPreferencesId, CurrentUser.Id, "LibraryExplorer") : new DisplayPreferences();
|
||||||
if (folder != null && prefs.SortBy != ddlSortBy.SelectedItem as string)
|
if (folder != null && prefs.SortBy != ddlSortBy.SelectedItem as string)
|
||||||
{
|
{
|
||||||
//grab UI context so we can update within the below task
|
//grab UI context so we can update within the below task
|
||||||
|
|
Loading…
Reference in New Issue
Block a user