Uncommented ReloadConfiguration and updated GetAllUsers to return a dummy user, in order to unblock UI development.

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-08-02 08:51:43 -04:00
parent dfc12d728c
commit 23a4c9af21
3 changed files with 108 additions and 77 deletions

View File

@@ -38,15 +38,6 @@ namespace MediaBrowser.Controller
return ApplicationPaths.RootFolderPath;
}
}
//gonna want to load this from the standard repository... -ebr
//private string UsersPath
//{
// get
// {
// return Path.Combine(ProgramDataPath, "Users");
// }
//}
/// <summary>
/// Gets the list of currently registered entity resolvers
@@ -436,61 +427,17 @@ namespace MediaBrowser.Controller
/// </summary>
private IEnumerable<User> GetAllUsers()
{
//we'll get this from the standard repo... -ebr
//if (!Directory.Exists(UsersPath))
//{
// Directory.CreateDirectory(UsersPath);
//}
List<User> list = new List<User>();
//foreach (string folder in Directory.GetDirectories(UsersPath, "*", SearchOption.TopDirectoryOnly))
//{
// User item = GetFromDirectory(folder);
// Return a dummy user for now since all calls to get items requre a userId
User user = new User();
// if (item != null)
// {
// list.Add(item);
// }
//}
user.Name = "Default User";
user.Id = Guid.NewGuid();
list.Add(user);
return list;
}
/// <summary>
/// Gets a User from it's directory
/// </summary>
//private User GetFromDirectory(string path)
//{
// string file = Path.Combine(path, "user.js");
// return JsonSerializer.DeserializeFromFile<User>(file);
//}
/// <summary>
/// Creates a User with a given name
/// </summary>
//public User CreateUser(string name)
//{
// var now = DateTime.Now;
// User user = new User()
// {
// Name = name,
// Id = Guid.NewGuid(),
// DateCreated = now,
// DateModified = now
// };
// user.Path = Path.Combine(UsersPath, user.Id.ToString());
// Directory.CreateDirectory(user.Path);
// JsonSerializer.SerializeToFile(user, Path.Combine(user.Path, "user.js"));
// return user;
//}
}
}