Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 29 05:39
    Rooba opened #263
  • Jul 23 09:04
    dependabot[bot] labeled #262
  • Jul 23 09:04
    dependabot[bot] opened #262
  • Jul 23 09:04

    dependabot[bot] on npm_and_yarn

    Bump file-type from 16.5.2 to 1… (compare)

  • May 08 13:06

    twiddli on dev

    implement download queue ui; add collections; notifications; grouping; improv… and 26 more (compare)

  • Apr 04 18:01
    trailingslash commented #261
  • Apr 03 20:27
    trailingslash opened #261
  • Mar 28 22:12
    shanlol opened #260
  • Mar 28 22:08
    shanlol commented #222
  • Mar 28 21:25
    shanlol commented #222
  • Feb 09 01:06
    Zerendipity commented #242
  • Jan 03 15:53
    cirnosaiko opened #259
  • Oct 31 2021 18:43
    Cognitheurge opened #258
  • Oct 20 2021 22:43
    Cognitheurge commented #162
  • Sep 30 2021 21:31
    ndbiaw commented #224
  • Sep 13 2021 03:47

    twiddli on dev

    implement page navigation; add … add reader end content; minor f… add states; and 28 more (compare)

  • Sep 09 2021 09:30
    gy6221 commented #169
  • Jul 05 2021 16:01
    Dystasia commented #242
  • May 25 2021 00:38
    twiddli edited #246
  • May 25 2021 00:38
    twiddli edited #246
SophtwhereDev
@SophtwhereDev_gitlab
Thanks an example would be fantastic!
SophtwhereDev
@SophtwhereDev_gitlab
And yep I'm using the same account, I can see that there are galleries with times_read:0 while browsing that don't show up when I actually search for times_read:0. Besides, if I'm using a new user then times_read:0 should show all the galleries in the library
Twiddly
@twiddli
mm yea, you're right, i'll look into it when i get back
SophtwhereDev
@SophtwhereDev_gitlab
Thanks a lot!
SophtwhereDev
@SophtwhereDev_gitlab
Hi @twiddli any luck with the times_read:0 issue? And also an example of updating GalleryProgress will be great!
Happy new year btw!
Twiddly
@twiddli
Hello happy new years, I have exams right now so i'll come back to continue work on HPX sometime this month
I'll try and provide an example later tonight
SophtwhereDev
@SophtwhereDev_gitlab
Thanks a lot and good luck with your exams!
Twiddly
@twiddli
Okay, here's how to update GalleryProgress:
Twiddly
@twiddli
import __hpx__ as hpx

GalleryProgress = hpx.command.GetDatabaseModel("GalleryProgress")

def update_gallery_progress(gallery, page = "last"):
    """
    Update a GalleryProgress

    Args:
        gallery: gallery object
        page: "first", "last" or int
    """

    gallery_id = gallery.id

    page_id = gallery.last_page.id

    if page == 'first':
        page_id = gallery.first_page.id
    elif isinstance(page, int):
        page_id = gallery.pages[page].id

    GalleryProgress.update_progress(gallery_id, page_id)
sorry, I haven't tested it, but this should work
SophtwhereDev
@SophtwhereDev_gitlab
Thanks a lot, I'll try this out and get back to you. I really appreciate this!
SophtwhereDev
@SophtwhereDev_gitlab
Hi @twiddli sorry for the delay, so I figured I'd extend the File Metadata plugin based on the code snippet you gave me above and it seems to throw an AttributeError and no metadata is loaded when trying to add a gallery:
Jan-01 01:47:43--INFO   [plugin].context.file-metadata.main: Attempting with DataType.eze
Jan-01 01:47:43--INFO   [plugin].context.file-metadata.main: DataType.eze matched!
Jan-01 01:47:43--WARNING [plugin].context.file-metadata: An unhandled exception 'AttributeError' was raised by plugin handler on command 'GalleryFS.parse_metadata_file'
Jan-01 01:47:43--WARNING [plugin].context.file-metadata: An unhandled exception 'AttributeError' was raised by plugin handler on command 'GalleryFS.parse_metadata_file' by file-metadata:e38e24e4...c75510097653
I made these edits to the main.py file in the File Metadata plugin:
    if data.get('times_read'):
        gdata.times_read = SetValue(data['times_read'])
        log.debug("applied times_read")

        if data['times_read'] > 0:
            gallery_id = gallery.id
            page_id = gallery.last_page.id

            GalleryProgress.update_progress(gallery_id, page_id)
I uploaded the whole file in case that makes it easier
Twiddly
@twiddli
Uhh, it doesn't show more about the error? Which log is this? The plugin's own plugin.log?
MeiMei3
@MeiMei3
@twiddli do you need some more information or whats up?
Twiddly
@twiddli
I want you to tell me step by step what you're doing
@MeiMei3 the AuthRequired error you're getting is harmless and refreshing the browser should usually fix it
MeiMei3
@MeiMei3
Well, i open up HPX gui, turn on the server and it automatically opens a tab for HPX and I either get the "refused connection" error, or some other error and an endless loading screen
Twiddly
@twiddli
it can take a few seconds to connect the first time
but i'm not understanding all these errors you're getting
can you give me your error.log
MeiMei3
@MeiMei3
I let it load for 20 min and nothing
Here's the error log
Jan-01 04:15:15--WARNING happypanda.migrate: Failed to remove data/internals.db. Please remove it yourself.
Jan-01 04:53:33--ERROR [server].happypanda.core.server: A database error occured
Traceback (most recent call last):
File "happypanda\core\server.py", line 607, in advance
File "<E:\Weebshit2\doujin\HappyPandaX\decorator.pyc:decorator-gen-25>", line 2, in call_functions
File "happypanda\common\utils.py", line 1189, in only_cache_if
File "<E:\Weebshit2\doujin\HappyPandaX\decorator.pyc:decorator-gen-24>", line 2, in call_functions
File "site-packages\dogpile\cache\region.py", line 1272, in get_or_create_for_user_func
File "site-packages\dogpile\cache\region.py", line 879, in get_or_create
File "site-packages\dogpile\lock.py", line 186, in enter
File "site-packages\dogpile\lock.py", line 93, in _enter
File "site-packages\dogpile\lock.py", line 179, in _enter_create
File "site-packages\dogpile\cache\region.py", line 839, in gen_value
File "happypanda\core\server.py", line 577, in call_functions
File "happypanda\core\message.py", line 197, in append
File "happypanda\core\message.py", line 80, in json_friendly
File "happypanda\core\message.py", line 982, in data
File "happypanda\core\message.py", line 346, in json_friendly
File "happypanda\core\message.py", line 320, in data
File "happypanda\core\db.py", line 3688, in table_values
File "site-packages\sqlalchemy\orm\state.py", line 878, in value
File "site-packages\sqlalchemy\orm\attributes.py", line 282, in get
File "site-packages\sqlalchemy\orm\attributes.py", line 708, in get
File "site-packages\sqlalchemy\orm\strategies.py", line 439, in call
File "site-packages\sqlalchemy\orm\strategies.py", line 412, in _load_for_state
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <Page at 0xabfa410> is not bound to a Session; deferred load operation of attribute 'last_updated' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
Jan-01 02:02:23--WARNING [server].happypanda.core.server: Failed to start server because the address is already in use. Ensure that no other application or HPX isntances are using the same address
Jan-01 02:03:34--WARNING [server].happypanda.core.server: Failed to start server because the address is already in use. Ensure that no other application or HPX isntances are using the same address
Jan-01 02:03:58--WARNING [server].happypanda.core.server: Failed to start server because the address is already in use. Ensure that no other application or HPX isntances are using the same address
Jan-01 16:38:08--WARNING [server].happypanda.core.server: Failed to start server because the address is already in use. Ensure that no other application or HPX isntances are using the same address
Twiddly
@twiddli
Change the default ports 7008 and 7007 to something else like 9871 and 9872
MeiMei3
@MeiMei3
Same problem, just an endless loading screen
Twiddly
@twiddli
Then i really have no clue
If it's not the port not being free, somehow you have two HPX instances running, and your server settings looked fine
then i wouldnt know
SophtwhereDev
@SophtwhereDev_gitlab
@twiddli Hi, really sorry for the delay in getting back to you. That log file is from the HPX GUI, I didn't realise the plugins had their own logs. Let me try to look for that and get it to you
SophtwhereDev
@SophtwhereDev_gitlab
Found it! The error seems to imply that the gallery object doesn't have a last_page attribute
SmoofBrane
@SmoofBrane
Hi, I'm very new to this program, and it took me a few tries to get the server working. However, I haven't the slightest clue how to add galleries to my sever. Also, since I mainly use exhentai, I'd like to use the plugin which downloads and imports a gallery to the server, which for me however hasn't worked yet. Every time I try to download a gallery I get the error: "DownloadError('The resource could not be found in the cache directory downloads',)". I'm very willing and happy to share any other information if needed, and I'm very eager to use this program in the future.
Twiddly
@twiddli
Hello, firstly, exhentai, did you activate the Login plugin and put in your info?
without that, downloading from exhentai won't work
to download, click on the + icon on the menu
then you can either add a single gallery, or scan for multiple galleries
from your computer
Twiddly
@twiddli
@SophtwhereDev_gitlab please send me the whole file
SmoofBrane
@SmoofBrane
@twiddli Hiya, thanks for the response. I have logged in with the plugin, but I'm still getting the error. Please refer to the log above for details
Twiddly
@twiddli
Do you have enough credits/GP?
SophtwhereDev
@SophtwhereDev_gitlab

plugin.log

@twiddli The message I sent here contains the whole plugin.log file, do you want some other log as well?

Carl
@CarlCarlson_gitlab
Is there a way to check the validity of galleries in the database? Like check for galleries that no longer lead to valid archives?
Yes through the client API
Carl
@CarlCarlson_gitlab
I'm afraid I don't know how to use that. Where do I type in the command?
Carl
@CarlCarlson_gitlab
and will that scan the entire database?