aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 07ede4cad..9626d949c 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -32,6 +32,7 @@ import org.traccar.database.ConnectionManager;
import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
import org.traccar.database.IdentityManager;
+import org.traccar.database.MediaManager;
import org.traccar.database.NotificationManager;
import org.traccar.database.PermissionsManager;
import org.traccar.database.GeofenceManager;
@@ -90,6 +91,12 @@ public final class Context {
return dataManager;
}
+ private static MediaManager mediaManager;
+
+ public static MediaManager getMediaManager() {
+ return mediaManager;
+ }
+
private static DeviceManager deviceManager;
public static DeviceManager getDeviceManager() {
@@ -214,6 +221,10 @@ public final class Context {
dataManager = new DataManager(config);
}
+ if (config.hasKey("media.path")) {
+ mediaManager = new MediaManager(config);
+ }
+
if (dataManager != null) {
deviceManager = new DeviceManager(dataManager);
}