Skip to content

Commit

Permalink
Fix checks
Browse files Browse the repository at this point in the history
Signed-off-by: Niels <niels.muendler@inf.ethz.ch>
  • Loading branch information
nielstron committed Sep 10, 2024
1 parent 6b236ee commit a43dbb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Command/Classify.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int
MusicnnClassifier::MODEL_NAME => [],
];
foreach ($this->storageService->getFilesInMount($mount['storage_id'], $mount['override_root'], $models, $lastFileId) as $file) {
$i++;
$lastFileId = $file['fileid'];
// if retry flag is set, skip tagged files
if ($input->getOption('retry')) {
$fileTags = $this->tagManager->getTagsForFiles([$lastFileId]);
// check if processed tag is already in the tags
if (in_array($processedTag, $fileTags)) {
if (in_array($processedTag, $fileTags[$lastFileId])) {
continue;
}
}
$i++;
$lastFileId = $file['fileid'];
$queueFile = new QueueFile();
$queueFile->setStorageId($mount['storage_id']);
$queueFile->setRootId($mount['root_id']);
Expand Down

0 comments on commit a43dbb1

Please sign in to comment.