aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Patrick Collins <Patricol@users.noreply.github.com> 2022-06-26 00:50:51 -0600
committerGravatar GitHub <noreply@github.com> 2022-06-26 08:50:51 +0200
commit2c7a9d7c45d3bc4dc955bb8fd5701a0df47ab3d5 (patch)
tree4e7717e9f882cca05fe68b0843fda57e855b9703
parent5076d09de61c5b08fef8293b5452f158df1fa0ba (diff)
downloadrss-bridge-2c7a9d7c45d3bc4dc955bb8fd5701a0df47ab3d5.tar.gz
rss-bridge-2c7a9d7c45d3bc4dc955bb8fd5701a0df47ab3d5.tar.zst
rss-bridge-2c7a9d7c45d3bc4dc955bb8fd5701a0df47ab3d5.zip
[MangaDex] improve date handling (#2864)
prioritize new chapters rather than just edited ones. should avoid batch-renaming drowning out new chapters, and existing items being re-sorted in the feed when they're edited. documentation here: https://api.mangadex.org/docs/dates/
-rw-r--r--bridges/MangaDexBridge.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/bridges/MangaDexBridge.php b/bridges/MangaDexBridge.php
index b919073b..6cfd18e9 100644
--- a/bridges/MangaDexBridge.php
+++ b/bridges/MangaDexBridge.php
@@ -94,7 +94,7 @@ class MangaDexBridge extends BridgeAbstract {
preg_match(self::TITLE_REGEX, $this->getInput('url'), $matches)
or returnClientError('Invalid URL Parameter');
$this->feedURI = self::URI . 'title/' . $matches['uuid'];
- $params['order[updatedAt]'] = 'desc';
+ $params['order[readableAt]'] = 'desc';
if (!$this->getInput('external')) {
$params['includeFutureUpdates'] = '0';
}
@@ -105,7 +105,7 @@ class MangaDexBridge extends BridgeAbstract {
$params['chapter'] = $this->getInput('chapter');
$params['groups[]'] = $this->getInput('groups');
$params['uploader'] = $this->getInput('uploader');
- $params['order[updatedAt]'] = 'desc';
+ $params['order[readableAt]'] = 'desc';
if (!$this->getInput('external')) {
$params['includeFutureUpdates'] = '0';
}
@@ -196,7 +196,7 @@ class MangaDexBridge extends BridgeAbstract {
}
$item['title'] .= ' [' . $chapter['attributes']['translatedLanguage'] . ']';
- $item['timestamp'] = $chapter['attributes']['updatedAt'];
+ $item['timestamp'] = $chapter['attributes']['readableAt'];
$groups = array();
$users = array();