aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-10-11 21:46:02 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-10-11 21:46:02 -0400
commit314a51dff3f070be75bcaf00be244977fdd3ceb5 (patch)
tree9fd0588448932f9f829f314521f6f2ba340da9a6 /MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
parentf3539686bd7ff6c748a0a9441086538081fa8903 (diff)
add more device options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Devices/DeviceManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Devices/DeviceManager.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs b/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
index 55425ad7e..6d4238bdf 100644
--- a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
+++ b/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
@@ -29,7 +29,7 @@ namespace MediaBrowser.Server.Implementations.Devices
_config = config;
}
- public Task RegisterDevice(string reportedId, string name, string usedByUserId)
+ public Task RegisterDevice(string reportedId, string name, string appName, string usedByUserId)
{
var device = GetDevice(reportedId) ?? new DeviceInfo
{
@@ -37,6 +37,7 @@ namespace MediaBrowser.Server.Implementations.Devices
};
device.Name = name;
+ device.AppName = appName;
if (!string.IsNullOrWhiteSpace(usedByUserId))
{
@@ -115,12 +116,21 @@ namespace MediaBrowser.Server.Implementations.Devices
{
var config = _config.GetUploadOptions();
+ var device = GetDevice(deviceId);
+
if (!string.IsNullOrWhiteSpace(config.CameraUploadPath))
{
return config.CameraUploadPath;
}
- return Path.Combine(_config.CommonApplicationPaths.DataPath, "camerauploads");
+ var path = Path.Combine(_config.CommonApplicationPaths.DataPath, "camerauploads");
+
+ if (config.EnableCameraUploadSubfolders)
+ {
+ path = Path.Combine(path, _fileSystem.GetValidFilename(device.Name));
+ }
+
+ return path;
}
}