mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-23 13:14:17 +00:00
add force object conversion
This commit is contained in:
parent
ea4ae281eb
commit
e7470fa4a2
@ -53,7 +53,7 @@ try
|
|||||||
'version' => API_VERSION,
|
'version' => API_VERSION,
|
||||||
'updated' => time(),
|
'updated' => time(),
|
||||||
|
|
||||||
'settings' =>
|
'settings' => (object)
|
||||||
[
|
[
|
||||||
'YGGDRASIL_HOST_REGEX' => YGGDRASIL_HOST_REGEX,
|
'YGGDRASIL_HOST_REGEX' => YGGDRASIL_HOST_REGEX,
|
||||||
|
|
||||||
@ -88,42 +88,42 @@ try
|
|||||||
'MAGNET_COMMENT_MIN_LENGTH' => MAGNET_COMMENT_MIN_LENGTH,
|
'MAGNET_COMMENT_MIN_LENGTH' => MAGNET_COMMENT_MIN_LENGTH,
|
||||||
'MAGNET_COMMENT_MAX_LENGTH' => MAGNET_COMMENT_MAX_LENGTH,
|
'MAGNET_COMMENT_MAX_LENGTH' => MAGNET_COMMENT_MAX_LENGTH,
|
||||||
|
|
||||||
'MAGNET_STOP_WORDS_SIMILAR' => MAGNET_STOP_WORDS_SIMILAR,
|
'MAGNET_STOP_WORDS_SIMILAR' => (object) MAGNET_STOP_WORDS_SIMILAR,
|
||||||
],
|
],
|
||||||
'totals' =>
|
'totals' => (object)
|
||||||
[
|
[
|
||||||
'magnets' =>
|
'magnets' => (object)
|
||||||
[
|
[
|
||||||
'total' => $db->getMagnetsTotal(),
|
'total' => $db->getMagnetsTotal(),
|
||||||
'distributed' => $db->getMagnetsTotalByUsersPublic(true),
|
'distributed' => $db->getMagnetsTotalByUsersPublic(true),
|
||||||
'local' => $db->getMagnetsTotalByUsersPublic(false),
|
'local' => $db->getMagnetsTotalByUsersPublic(false),
|
||||||
],
|
],
|
||||||
'downloads' =>
|
'downloads' => (object)
|
||||||
[
|
[
|
||||||
'total' => $db->getMagnetDownloadsTotal(),
|
'total' => $db->getMagnetDownloadsTotal(),
|
||||||
'distributed' => $db->findMagnetDownloadsTotalByUsersPublic(true),
|
'distributed' => $db->findMagnetDownloadsTotalByUsersPublic(true),
|
||||||
'local' => $db->findMagnetDownloadsTotalByUsersPublic(false),
|
'local' => $db->findMagnetDownloadsTotalByUsersPublic(false),
|
||||||
],
|
],
|
||||||
'comments' =>
|
'comments' => (object)
|
||||||
[
|
[
|
||||||
'total' => $db->getMagnetCommentsTotal(),
|
'total' => $db->getMagnetCommentsTotal(),
|
||||||
'distributed' => $db->findMagnetCommentsTotalByUsersPublic(true),
|
'distributed' => $db->findMagnetCommentsTotalByUsersPublic(true),
|
||||||
'local' => $db->findMagnetCommentsTotalByUsersPublic(false),
|
'local' => $db->findMagnetCommentsTotalByUsersPublic(false),
|
||||||
],
|
],
|
||||||
'stars' =>
|
'stars' => (object)
|
||||||
[
|
[
|
||||||
'total' => $db->getMagnetStarsTotal(),
|
'total' => $db->getMagnetStarsTotal(),
|
||||||
'distributed' => $db->findMagnetStarsTotalByUsersPublic(true),
|
'distributed' => $db->findMagnetStarsTotalByUsersPublic(true),
|
||||||
'local' => $db->findMagnetStarsTotalByUsersPublic(false),
|
'local' => $db->findMagnetStarsTotalByUsersPublic(false),
|
||||||
],
|
],
|
||||||
'views' =>
|
'views' => (object)
|
||||||
[
|
[
|
||||||
'total' => $db->getMagnetViewsTotal(),
|
'total' => $db->getMagnetViewsTotal(),
|
||||||
'distributed' => $db->findMagnetViewsTotalByUsersPublic(true),
|
'distributed' => $db->findMagnetViewsTotalByUsersPublic(true),
|
||||||
'local' => $db->findMagnetViewsTotalByUsersPublic(false),
|
'local' => $db->findMagnetViewsTotalByUsersPublic(false),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'feeds' =>
|
'feeds' => (object)
|
||||||
[
|
[
|
||||||
'users' => API_EXPORT_USERS_ENABLED ? sprintf('%s/api/users.json', WEBSITE_URL) : false,
|
'users' => API_EXPORT_USERS_ENABLED ? sprintf('%s/api/users.json', WEBSITE_URL) : false,
|
||||||
'magnets' => API_EXPORT_MAGNETS_ENABLED ? sprintf('%s/api/magnets.json', WEBSITE_URL) : false,
|
'magnets' => API_EXPORT_MAGNETS_ENABLED ? sprintf('%s/api/magnets.json', WEBSITE_URL) : false,
|
||||||
@ -132,8 +132,8 @@ try
|
|||||||
'magnetStars' => API_EXPORT_MAGNET_STARS_ENABLED ? sprintf('%s/api/magnetStars.json', WEBSITE_URL) : false,
|
'magnetStars' => API_EXPORT_MAGNET_STARS_ENABLED ? sprintf('%s/api/magnetStars.json', WEBSITE_URL) : false,
|
||||||
'magnetViews' => API_EXPORT_MAGNET_VIEWS_ENABLED ? sprintf('%s/api/magnetViews.json', WEBSITE_URL) : false,
|
'magnetViews' => API_EXPORT_MAGNET_VIEWS_ENABLED ? sprintf('%s/api/magnetViews.json', WEBSITE_URL) : false,
|
||||||
],
|
],
|
||||||
'trackers' => json_decode(file_get_contents(__DIR__ . '/../../config/trackers.json')),
|
'trackers' => (object) json_decode(file_get_contents(__DIR__ . '/../../config/trackers.json')),
|
||||||
'nodes' => json_decode(file_get_contents(__DIR__ . '/../../config/nodes.json')),
|
'nodes' => (object) json_decode(file_get_contents(__DIR__ . '/../../config/nodes.json')),
|
||||||
];
|
];
|
||||||
|
|
||||||
/// Dump manifest manifest
|
/// Dump manifest manifest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user