jerry icon indicating copy to clipboard operation
jerry copied to clipboard

Refactor `get_anime_from_list` and improve behavior for releasing shows

Open aaron-r-campbell opened this issue 1 month ago • 0 comments

Related issues

  • #100
  • #101

Changes made

Improved behavior for releasing shows

  • episodes_total computed based on released episodes to prevent auto playing of un-aired episodes
  • releasing shows now have "episode x in y days/hours/minutes" as the status
  • releasing shows now display episode info as watched|released|total instead of watched|total

Refactored get_anime_from_list()

  • moved graphql query to heredoc for better readability
  • removed unused graphql arguments
  • switched from sed to jq for API parsing
  • reduced redundent calls in branching menu logic

Remaining future changes

There is still some questionable behavior in the menu branching code (lines 560-581). I chose the maximum of a 2 second delay when calling download_thumbnails but otherwise left the calls mostly the same to avoid changing other functions. However, if these functions are ever reworked, this could still be simplified further.

aaron-r-campbell avatar Nov 23 '25 23:11 aaron-r-campbell