| 1005 | |
| 1006 | |
| 1007 | QString UBSettings::userVideoDirectory() |
| 1008 | { |
| 1009 | static QString videoDirectory = ""; |
| 1010 | if(videoDirectory.isEmpty()){ |
| 1011 | if (sAppSettings && getAppSettings()->contains("App/UserVideoDirectory")) { |
| 1012 | videoDirectory = getAppSettings()->value("App/UserVideoDirectory").toString(); |
| 1013 | videoDirectory = replaceWildcard(videoDirectory); |
| 1014 | if(checkDirectory(videoDirectory)) |
| 1015 | return videoDirectory; |
| 1016 | else |
| 1017 | qCritical() << "failed to create video directory " << videoDirectory; |
| 1018 | } |
| 1019 | |
| 1020 | |
| 1021 | videoDirectory = QStandardPaths::writableLocation(QStandardPaths::MoviesLocation); |
| 1022 | |
| 1023 | if(videoDirectory.isEmpty()) |
| 1024 | videoDirectory = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/" + tr("My Movies"); |
| 1025 | else |
| 1026 | videoDirectory = videoDirectory + "/" + qApp->applicationName(); |
| 1027 | |
| 1028 | checkDirectory(videoDirectory); |
| 1029 | } |
| 1030 | return videoDirectory; |
| 1031 | } |
| 1032 | |
| 1033 | QString UBSettings::userAudioDirectory() |
| 1034 | { |
no test coverage detected