@@ -124,6 +124,9 @@ discard block |
||
| 124 | 124 | return self::startsWith($filePath, $musicPath); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | + /** |
|
| 128 | + * @param string $userId |
|
| 129 | + */ |
|
| 127 | 130 | private function updateImage($file, $userId) { |
| 128 | 131 | $coverFileId = $file->getId(); |
| 129 | 132 | $parentFolderId = $file->getParent()->getId(); |
@@ -133,6 +136,9 @@ discard block |
||
| 133 | 136 | } |
| 134 | 137 | } |
| 135 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $userId |
|
| 141 | + */ |
|
| 136 | 142 | private function updateAudio($file, $userId, $userHome, $filePath, $mimetype) { |
| 137 | 143 | if(ini_get('allow_url_fopen')) { |
| 138 | 144 | |
@@ -457,6 +463,10 @@ discard block |
||
| 457 | 463 | return $info; |
| 458 | 464 | } |
| 459 | 465 | |
| 466 | + /** |
|
| 467 | + * @param string $fileId |
|
| 468 | + * @param string $userId |
|
| 469 | + */ |
|
| 460 | 470 | private function getIndexedFileInfo($fileId, $userId, $userFolder) { |
| 461 | 471 | $track = $this->trackBusinessLayer->findByFileId($fileId, $userId); |
| 462 | 472 | if ($track !== null) { |
@@ -471,6 +481,10 @@ discard block |
||
| 471 | 481 | return null; |
| 472 | 482 | } |
| 473 | 483 | |
| 484 | + /** |
|
| 485 | + * @param string $fileId |
|
| 486 | + * @param string $userId |
|
| 487 | + */ |
|
| 474 | 488 | private function getUnindexedFileInfo($fileId, $userId, $userFolder) { |
| 475 | 489 | $fileNodes = $userFolder->getById($fileId); |
| 476 | 490 | if (count($fileNodes) > 0) { |
@@ -577,7 +591,7 @@ discard block |
||
| 577 | 591 | * integers or strings. |
| 578 | 592 | * From https://stackoverflow.com/a/8827033 |
| 579 | 593 | * @param array $b |
| 580 | - * @param array $a |
|
| 594 | + * @param integer[] $a |
|
| 581 | 595 | * @return array |
| 582 | 596 | */ |
| 583 | 597 | private static function fast_array_diff($b, $a) { |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | * user's data is not leaked to unauthorized users. |
| 76 | 76 | * @param integer[] $ids IDs of the entities to be found |
| 77 | 77 | * @param string|null $userId |
| 78 | - * @return Entity[] |
|
| 78 | + * @return \OCA\Music\Db\Entity[] |
|
| 79 | 79 | */ |
| 80 | 80 | public function findById($ids, $userId=null){ |
| 81 | 81 | return $this->mapper->findById($ids, $userId); |
@@ -59,6 +59,9 @@ |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param Music $app |
|
| 64 | + */ |
|
| 62 | 65 | private static function handleUpdated($node, $app){ |
| 63 | 66 | // we are interested only about updates on files, not on folders |
| 64 | 67 | if ($node->getType() == FileInfo::TYPE_FILE) { |