mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-30 17:25:40 +02:00
Use the username for the user config path
Use the username to construct the UserConfigurationDirectory, instead of the user ID, and move the old ID-based path to the new path if needed when loading (temporary transitional code). Removes administrator guesswork as to what user each directory belongs to, which I found very annoying when investigating user configs.
This commit is contained in:
parent
2d011b781e
commit
d1d0ddf62f
|
@ -228,7 +228,15 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return System.IO.Path.Combine(ConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, safeFolderName);
|
return System.IO.Path.Combine(ConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, safeFolderName);
|
||||||
}
|
}
|
||||||
|
|
||||||
return System.IO.Path.Combine(parentPath, Id.ToString("N"));
|
// TODO: Remove idPath and just use usernamePath for future releases
|
||||||
|
var usernamePath = System.IO.Path.Combine(parentPath, username);
|
||||||
|
var idPath = System.IO.Path.Combine(parentPath, Id.ToString("N"));
|
||||||
|
if (!Directory.Exists(usernamePath) && Directory.Exists(idPath))
|
||||||
|
{
|
||||||
|
Directory.Move(idPath, usernamePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return usernamePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsParentalScheduleAllowed()
|
public bool IsParentalScheduleAllowed()
|
||||||
|
|
Loading…
Reference in a new issue