Database - PaulHaeussler/HappyPanda GitHub Wiki

The database will be set up automatically and will contain the following tables:

imgs

PK is a compound of img_id and ex_id

- img_id       (AI)
- ex_id        (old ID used by sadpanda)
- img_page     (url to page where the image can be currently viewed on sadpanda)
- file_size    (size of image, fetched from sadpanda, string formatted)
- img_width    (in px, from sadpanda)
- img_height   (in px, from sadpanda)
- file_type    (jpg, png, gif...)
- added        (timestamp when first added to local db)

tags

PK is a compound of tag_id and tag_name

- tag_id        (AI) 
- tag_name      (e.g. ahegao, nakadashi, futanari ...)

albums

PK is a compound of album_id and ex_id

- album_id      (AI)
- ex_id         (six digit identifier used by sadpanda)
- album_name    (Album name, in english if available)
- album_name_jp (Album name in japanese, if available)
- posted        (date when first posted on exhentai)
- parent        (ex_id of parent, when applicable)
- language      (Japanese, English, ...)
- file_size     (combined size reported by exhentai, may not be accurate, String formatted)
- length        (no. of pages)
- favourited    (no. favourited by other people)
- rating_total  (no. of total ratings given)
- rating_avg    (average of all ratings, 0.5-5 in .5 steps)
- rating_local  (rating given by you, represented as a percentage float 0.0 - 100.0)
- category      (platform categories; Doujinshi, Manga, Artist CG, Game CG, Western, Non-H, Image Set, Cosplay, Asian Porn, Misc)
- uploader      (username of uploader)
- fav_id        (favourite id, if in any favourites)
- added         (timestamp when first added to local db)

alb_img

Cross table to link images to their album, PK is a compound of both ids

- img_id
- album_id
- order_pos (image position in album)

alb_tag

Cross table to link albums with their tags, PK is a compound of both ids

- tag_id
- album_id
- tag_category  (e.g. female, misc, artist ...)

favs

PK is a compound of fav_id and fav_name

- fav_id      (AI) (1-10 are categories extracted from sadpanda)
- fav_name