CC-2562 : Allow users to convert linked files into watched directories
This commit is contained in:
parent
674509880f
commit
7dca2c93fd
|
@ -596,6 +596,8 @@ class Airtime190Upgrade{
|
||||||
$sql = "SELECT id FROM cc_music_dirs WHERE type='stor'";
|
$sql = "SELECT id FROM cc_music_dirs WHERE type='stor'";
|
||||||
echo $sql.PHP_EOL;
|
echo $sql.PHP_EOL;
|
||||||
$rows = Airtime190Upgrade::execSqlQuery($sql);
|
$rows = Airtime190Upgrade::execSqlQuery($sql);
|
||||||
|
echo var_dump($rows);
|
||||||
|
echo PHP_EOL;
|
||||||
|
|
||||||
echo "Creating media-monitor log file".PHP_EOL;
|
echo "Creating media-monitor log file".PHP_EOL;
|
||||||
mkdir("/var/log/airtime/media-monitor/", 755, true);
|
mkdir("/var/log/airtime/media-monitor/", 755, true);
|
||||||
|
@ -640,7 +642,14 @@ class Airtime190Upgrade{
|
||||||
|
|
||||||
//Check to see if the file still exists. (Could have still some entries under the stor dir or linked files that don't exist)
|
//Check to see if the file still exists. (Could have still some entries under the stor dir or linked files that don't exist)
|
||||||
foreach($db_files as $db_file) {
|
foreach($db_files as $db_file) {
|
||||||
echo $db_file->getDbTrackTitle();
|
$filepath = $db_file->getDbFilepath();
|
||||||
|
|
||||||
|
if (!file_exists($filepath)) {
|
||||||
|
$db_file->delete();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$db_file->setDbDirectory();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue