aboutsummaryrefslogtreecommitdiff
path: root/src/x_command.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/x_command.sh')
-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