A tool for adding anime to your anidb list.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2KB

  1. #include <stdio.h>
  2. #include "error.h"
  3. #include "api.h"
  4. #include "util.h"
  5. #include "uio.h"
  6. enum error cmd_stats(void *data)
  7. {
  8. enum error err = NOERR;
  9. struct api_result res;
  10. struct api_myliststats_result *stats = &res.myliststats;
  11. err = api_cmd_myliststats(&res);
  12. if (err != NOERR) {
  13. uio_error("Failed to request stats from API server");
  14. return err;
  15. }
  16. printf("Mylist status:\n"
  17. "Anime: %lu\n"
  18. "Episodes: %lu\n"
  19. "Files: %lu\n"
  20. "Size of files: %lu\n"
  21. "Added groups: %lu\n"
  22. "leech%%: %lu\n"
  23. "Glory%%: %lu\n"
  24. "Viewed%%/DB: %lu\n"
  25. "Mylist%%/DB: %lu\n"
  26. "Viewed%%/Mylist: %lu\n"
  27. "Viewed eps: %lu\n"
  28. "Votes: %lu\n"
  29. "Reviews: %lu\n"
  30. "Viewed minutes: %lu\n",
  31. stats->animes, stats->eps, stats->files, stats->size_of_files, stats->added_groups,
  32. stats->leech_prcnt, stats->glory_prcnt, stats->viewed_prcnt_of_db,
  33. stats->mylist_prcnt_of_db, stats->viewed_prcnt_of_mylist, stats->num_of_viewed_eps,
  34. stats->votes, stats->reviews, stats->viewed_minutes);
  35. return NOERR;
  36. }