aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-07-18 13:27:47 -0700
committerFuwn <[email protected]>2023-07-18 13:27:47 -0700
commitd36a369ed0fa611a33bb86e05824172732e16dae (patch)
treec789322d8e7b5b93dd32d0d873681bb42352c7e5
parentfeat(x): open both flag (diff)
downloadkaguya-d36a369ed0fa611a33bb86e05824172732e16dae.tar.xz
kaguya-d36a369ed0fa611a33bb86e05824172732e16dae.zip
feat(x): always sort by popularity
-rw-r--r--src/x_command.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/x_command.sh b/src/x_command.sh
index 9e6e297..a4eb1e3 100644
--- a/src/x_command.sh
+++ b/src/x_command.sh
@@ -26,7 +26,8 @@ ID=$(curl 'https://graphql.anilist.co/' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data "{ \"query\": \"{ Media(search: \\\"${TITLE}\\\", \
- ${FILTER}: $(echo "${FORMAT}" | tr '[:lower:]' '[:upper:]' || true)) { id idMal } }\" }")
+ ${FILTER}: $(echo "${FORMAT}" | tr '[:lower:]' '[:upper:]' || true) \
+ sort: [ POPULARITY_DESC ]) { id idMal } }\" }")
# Open the anime or manga in AniList by default, permit MyAnimeList
if [[ "${args[--mal]}" = 1 ]]; then