Filter user defined channels by size

This commit is contained in:
Michael 2024-01-30 10:05:05 +00:00
parent 0c583574e1
commit 3fe4991fcf
12 changed files with 68 additions and 5 deletions

View file

@ -427,6 +427,14 @@ class Timeline extends BaseModule
$condition = DBA::mergeConditions($condition, array_merge(["NOT `uri-id` IN (SELECT `uri-id` FROM `post-tag` INNER JOIN `tag` ON `tag`.`id` = `post-tag`.`tid` WHERE `post-tag`.`type` = 1 AND `name` IN (" . $placeholders . "))"], $search));
}
if (!is_null($channel->minSize)) {
$condition = DBA::mergeConditions($condition, ["`size` >= ?", $channel->minSize]);
}
if (!is_null($channel->maxSize)) {
$condition = DBA::mergeConditions($condition, ["`size` <= ?", $channel->maxSize]);
}
if (!empty($channel->mediaType)) {
$condition = DBA::mergeConditions($condition, ["`media-type` & ?", $channel->mediaType]);
}