funmaker / Hybooru

Hydrus-based booru-styled imageboard in React
https://booru.funmaker.moe/
MIT License
100 stars 17 forks source link

[Feature Request] Import from multiple tag services #15

Closed beam7894123 closed 2 years ago

beam7894123 commented 2 years ago

In Rebuilding Database Hybooru does get all the tags but Mappings, Tag parents and Tag siblings only get one local tag service, even though My hydrus have more than one local tag service.

npm start

> hybooru@1.4.8 start
> node server.js

Rebuilding Database!

Posts (11005/11005)             [####################] Done in 141ms
Urls (12529/12529)              [####################] Done in 97ms
Tags (8594/8594)                [####################] Done in 56ms
Mappings (50160/50160)          [####################] Done in 218ms
Tag parents (289/289)           [####################] Done in 5ms
Tag siblings (31/31)            [####################] Done in 4ms
Importing options...            [####################] Done in 12ms
Resolving file relations...     [####################] Done in 137ms
Normalizing tags (4/4)          [####################] Done in 34ms
Resolving tag parents...        [####################] Done in 90ms
Indexing (19/19)                [####################] Done in 528ms
Resolving tag siblings...       [####################] Done in 7ms
Counting tags usage...          [####################] Done in 47ms
Calculating statistics...       [####################] Done in 69ms
Finalizing...                   [####################] Done in 46ms

Database rebuild completed in 1.58s

Here, I have 2 local tag service.

  1. my tags
    • tag: 1562
    • mapping: 50163
    • tag parents: 289
    • tag siblings: 31
  2. downloader tags
    • tag: 7619
    • mapping: 83068
    • tag parents: 632
    • tag siblings: 140

This also making all tags in "downloader tags" not showing in Hybooru too

funmaker commented 2 years ago

Hi, Hybooru currently supports import from only one tag service.

I do not plan to add support for importing from multiple tag services for now as I do not have any use of that feature, but feel free to submit a PR if you want something like that. Just make sure it's properly configurable and resilient to conflicts which can happen when importing from multiple services(might need some temp tables). You can ask me if you have any questions.

Dividedby0KSJ commented 2 years ago

on that note, is there a way to change the tag services? Hybooru seems to be taking the tags from my tags rather than downloader tags.

is there a way to change this so that the predominantly used downloader tags (that update's automatically with newly downloaded content) is used rather than my tags?

like beam7894123 I would like to use both but have no coding knowledge outside of python to even try an attempt at that.

love the program btw, does a lot of things hydrus-web cant do that I love.

funmaker commented 2 years ago

on that note, is there a way to change the tag services? There is no such option.

In the following days I will look into this issue and either provide a solution to import multiple mapping sources or at least the ability to specify service id in the config.

funmaker commented 2 years ago

This feature has been released as part of Hybooru 1.5.0.