cc-2882: Airtime cannot delete watched folder when is been renamed
- initial commit Conflicts: airtime_mvc/application/models/MusicDir.php
This commit is contained in:
parent
6a0a739cef
commit
46146d1216
7 changed files with 104 additions and 5 deletions
|
@ -576,6 +576,27 @@ class StoredFile {
|
|||
{
|
||||
return StoredFile::Recall(null, null, null, $p_filepath);
|
||||
}
|
||||
|
||||
public static function RecallByPartialFilepath($partial_path){
|
||||
$path_info = MusicDir::splitFilePath($partial_path);
|
||||
|
||||
if (is_null($path_info)) {
|
||||
return null;
|
||||
}
|
||||
$music_dir = MusicDir::getDirByPath($path_info[0]);
|
||||
|
||||
$files = CcFilesQuery::create()
|
||||
->filterByDbDirectory($music_dir->getId())
|
||||
->filterByDbFilepath("$path_info[1]%")
|
||||
->find();
|
||||
$res = array();
|
||||
foreach ($files as $file){
|
||||
$storedFile = new StoredFile();
|
||||
$storedFile->_file = $file;
|
||||
$res[] = $storedFile;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
public static function searchFilesForPlaylistBuilder($datatables) {
|
||||
global $CC_CONFIG;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue