Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 30 13:27
    Rooba closed #263
  • Nov 13 05:26
    lionhoho commented #232
  • Nov 13 05:26
    lionhoho commented #232
  • Nov 13 05:25
    lionhoho commented #232
  • Oct 18 03:52
    austinfttwxd commented #242
  • Oct 18 03:50
    austinfttwxd commented #242
  • Oct 18 03:50
    austinfttwxd commented #242
  • Oct 18 03:45
    austinfttwxd commented #210
  • Sep 09 16:44
    Sirver51 opened #265
  • Aug 24 10:35
    symmetricalbyte opened #264
  • 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
SophtwhereDev
@SophtwhereDev_gitlab
I found the table on the happypanda.db for starters but I can't really mess with anything there directly.
gallery_progress seems to store the page that you're on but not the Times Read parameter right? If I could at least modify just the Times Read parameter that would suffice as a starting point although it's not exactly what I wanted to accomplish
Twiddly
@twiddli
Okay, well times_read should work, but it's kinda tied to the user who issued the extract command. Is there any code or anything i can see?
SophtwhereDev
@SophtwhereDev_gitlab
mtimesread = filedata.get('times_read')
if mtimesread != None:
                d['times_read'] = mtimesread
This is on eze.py
if data.get('times_read'):
gdata.rating = SetValue(data['times_read'])
        log.debug("applied times_read")
This is on main.py
common_data = {
    'titles': None, # [(title, language),...]
    'artists': None, # [(artist, (circle, circle, ..)),...]
    'parodies': None, # [parody, ...]
    'category': None,
    'tags': None, # [tag, tag, tag, ..] or {ns:[tag, tag, tag, ...]}
    'pub_date': None, # DateTime object or Arrow object
    'language': None,
    'urls': None, # [url, ...]
    'rating': None,
    'times_read': None
}
And This is on common.py
This is all within the File Metadata plugin
Twiddly
@twiddli
gdata.rating = SetValue(data['times_read']) it's assigning to .rating
SophtwhereDev
@SophtwhereDev_gitlab
facepalm
My bad
Let me quickly fix this and try again and get back to you
SophtwhereDev
@SophtwhereDev_gitlab
Yup that worked out nicely! Thank you very much!!
And sorry for taking up your time with my silly mistake haha
Twiddly
@twiddli
that's great, and no sweat, it happens
SophtwhereDev
@SophtwhereDev_gitlab
Btw I hope you eventually find the time to do some detailed plugin documentation cause I'd like to write a plugin to migrate from ComicRack to HPX
Twiddly
@twiddli
yes, i'll do that
SophtwhereDev
@SophtwhereDev_gitlab
Thanks a lot for all your work!
SophtwhereDev
@SophtwhereDev_gitlab
Hi @twiddli would you please let me know how to use filters with multiple namespaced tags and also to filter special tags like Times Read to basically find all the galleries that are Unread? I couldn't find any documentation on them.
I tried setting it up as comma separated tags but that doesn't seem to work although it does work for searching. Although I can't seem to even search the times_read variable
SophtwhereDev
@SophtwhereDev_gitlab
Okay I tried searching "times_read:0" and that seems to output very few of the unread galleries although there's a lot more that's not being shown.
I also realised that although I updated the "times_read" to 1 through metadata (info.json) the little icon on the top right of the gallery thumbnail shows unread.
SophtwhereDev
@SophtwhereDev_gitlab
Alright I don't know what happened but now I get 2 massive errors whenever I type anything into the search bar. I'll link the two errors to avoid cluttering the chat: https://pastebin.com/cHz5apKC
SophtwhereDev
@SophtwhereDev_gitlab
In the case of these 2 errors I just typed "asdf" into the search. I'm not sure what triggered this but I was just trying to search variants of times_read:0 such as times_read:"0" to see whether I could get all my unread stuff to appear and then I suddenly started getting these errors
Twiddly
@twiddli
You get that error when enabling regex
The read indicator checks for GalleryProgress, not times_read
Twiddly
@twiddli
Are you using the default account?
SophtwhereDev
@SophtwhereDev_gitlab
Oh shit I must've enabled regex while messing around with the search my bad
And no I made an admin account and I'm using that
Any way I can update GalleryProgress through a plugin?
Also would you be able to help me out with the "times_read:0" search not giving all the expected results?
Twiddly
@twiddli
Updating GalleryProgress through plugin is pretty advanced. I'll post an example later when i get time.
Twiddly
@twiddli
Also, make sure you're using the same account you used to extract metadata with.
times_read and rating apply on a per-user basis
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