[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/
This commit is contained in:
Patrick Collins 2022-06-26 00:50:51 -06:00 committed by GitHub
parent 5076d09de6
commit 2c7a9d7c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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();