Closed affinityDrops closed 4 years ago
Yes, it points to the root level of its parent galleries. It can be used to determine duplicated old galleries, and to query its torrents (uploaded torrents are saved under root gallery).
(uploaded torrents are saved under root gallery).
do only root galleries have uploaded torrents, not the descendants?
Maybe, as on torrent search page, the gallery of each torrents is the root gallery, also on gallery torrent page, the tracker id is the root gallery.
Thank you for your detailed explanation!
I have one more question besides. Why is torrent-import
marked as USE AT YOUR OWN RISK? Does this put a lot of load on the eh server?
Yes, this script will request ALL the gallery torrent pages of galleries that mark root_gid
as NULL
. The script will do the following things:
root_gid
fieldroot_gid
fieldtorrent
table with gid
field as root_gid
Since when you import the gdata.json
, you've imported about 800K galleries, so this script will request at least 800K times to get these informations.
I made a release here, which includes a copy of my server's database dump. Also someone requested me to give him a latest dump about 2 weeks ago, so I also made a patch here. If you want to run the server and start with a latest data set, you can just import these SQLs without importing gdata.json
.
I see that the only way to identify root_gid
is to request one by one since the official API does not tell you about the parent.
I think that it would be good to have a flag for "root_gid
existence is not determined". Once you know whether root_gid
really exists or not, you don't have to request again since the existence of root_gid
remains constant. Next thing to do is to create a long-running task version of torrent-sync
to avoid too much frequent request. I might make a PR for it, but it is not that urgent.
Speaking about the database dump, that someone is me. Thanks anyway 😁
Is it used to indicate the gallery has a parent gallery of id
root_gid
?