From d36a369ed0fa611a33bb86e05824172732e16dae Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 18 Jul 2023 13:27:47 -0700 Subject: feat(x): always sort by popularity --- src/x_command.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3