aboutsummaryrefslogtreecommitdiff
path: root/p/api
diff options
context:
space:
mode:
Diffstat (limited to 'p/api')
-rw-r--r--p/api/fever.php14
-rw-r--r--p/api/greader.php8
2 files changed, 20 insertions, 2 deletions
diff --git a/p/api/fever.php b/p/api/fever.php
index 01e6d7b61..420a17f64 100644
--- a/p/api/fever.php
+++ b/p/api/fever.php
@@ -317,6 +317,9 @@ final class FeverAPI
/** @var FreshRSS_Feed $feed */
foreach ($myFeeds as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$feeds[] = [
'id' => $feed->id(),
'favicon_id' => $feed->id(),
@@ -362,6 +365,9 @@ final class FeverAPI
$myFeeds = $this->feedDAO->listFeeds();
foreach ($myFeeds as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$id = $feed->hashFavicon();
$filename = DATA_PATH . '/favicons/' . $id . '.ico';
if (!file_exists($filename)) {
@@ -390,6 +396,9 @@ final class FeverAPI
$myFeeds = $this->feedDAO->listFeeds();
foreach ($myFeeds as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$ids[$feed->categoryId()][] = $feed->id();
}
@@ -471,10 +480,13 @@ final class FeverAPI
$feeds = [];
foreach ($group_ids as $id) {
$category = $categoryDAO->searchById((int)$id); //TODO: Transform to SQL query without loop! Consider FreshRSS_CategoryDAO::listCategories(true)
- if ($category == null) {
+ if ($category === null) {
continue;
}
foreach ($category->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$feeds[] = $feed->id();
}
}
diff --git a/p/api/greader.php b/p/api/greader.php
index b983bfa90..6b67a7451 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -340,6 +340,9 @@ final class GReaderAPI {
$categoryDAO = FreshRSS_Factory::createCategoryDao();
foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
foreach ($cat->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$subscriptions[] = [
'id' => 'feed/' . $feed->id(),
'title' => escapeToUnicodeAlternative($feed->name(), true),
@@ -502,6 +505,9 @@ final class GReaderAPI {
foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
$catLastUpdate = 0;
foreach ($cat->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$lastUpdate = $feedsNewestItemUsec['f_' . $feed->id()] ?? 0;
$unreadcounts[] = [
'id' => 'feed/' . $feed->id(),
@@ -662,7 +668,7 @@ final class GReaderAPI {
'starred' => 's',
'feed' => 'f',
'label' => 'c',
- 'reading-list' => 'A',
+ 'reading-list' => 'A', // All except PRIORITY_HIDDEN
default => 'A',
};