Nimbin2git.christianimmanuel.de / Games / dvd / ratings.h

dvd files

last change 2026-09-04 (2 hours ago)

wget https://git.christianimmanuel.de/games/dvd/archive/dvd.tar.gz
ratings.h 461 B · 14 lines raw
// Define the struct to hold ratings information
typedef struct {
    char tconst[13];      // tconst
    float averageRating; // averageRating
    int numVotes;        // numVotes
} RatingInfo;

int load_ratings(RatingInfo **ratings);
// Function to get ratings by tconst from the title.ratings.tsv file
RatingInfo get_ratings(const char *tconst);

RatingInfo *get_rating_by_tconst(const char *tconst, RatingInfo *ratings, int* ratings_count);

int testRat();