evansloan / collection-log

A Runelite plugin that adds visual improvements to the collection log
BSD 2-Clause "Simplified" License
15 stars 10 forks source link

Auto-upload collection log #56

Open mrhappyasthma opened 2 months ago

mrhappyasthma commented 2 months ago

My colleciton log doesn't upload unless I go into the side panel and manually upload it.

Is there any way (or could we add a feature) to just auto-upload on every login or something?

peanubnutter commented 2 months ago

One possible implementation: any time a collection log page is opened and any data is found to be out of date, start a timer for like 30 seconds. if any other page is opened, reset the 30 second timer. At the end of the timer, upload collection log.

This should cut down a bit on unnecessary updates

Sharpienero commented 2 months ago

This is already an option image

mrhappyasthma commented 2 months ago

I have that enabled, but it doesn't seem to update for me. Do I need to open my collection log before logging out or something?

peanubnutter commented 2 months ago

As far as I'm aware, that button only uploads the collection log if you receive a new item. However I'd like to upload if I get a dupe item, or if my KC changes as well.

Sharpienero commented 2 months ago

Just as a quick sanity check..

1) On logout, it checks to see if that is toggled

2) Checks to see if it's a valid world, if you've hopped or logged out, and then eventually calls...

3) updateUser, which calls updateCollectionLog, which takes the data that it has stored about your account and tries to upload it.

I've never debugged this code, but it works as intended for my account. I never have to go through and manually upload, but to be fair, I have heard that this is somewhat of a common complaint with people who do use this service. Maybe there are conflicting plugins, I'm really not sure what this issue could be here.

peanubnutter commented 2 months ago

Interesting... It does seem like the code is correct, but I also have seen my collection log be very outdated before. I'll do some more testing...

On Fri, Sep 20, 2024, 1:44 PM Sharpienero @.***> wrote:

Just as a quick sanity check..

1.

On logout, it checks to see if that is toggled https://github.com/evansloan/collection-log/blob/c000e66294866fe56fc0e579faedd5d5f6356f19/src/main/java/com/evansloan/collectionlog/CollectionLogPlugin.java#L253 2.

Checks to see if it's a valid world, if you've hopped or logged out, and then eventually calls... 3.

updateUser https://github.com/evansloan/collection-log/blob/master/src/main/java/com/evansloan/collectionlog/CollectionLogApiClient.java#L36, which calls updateCollectionLog https://github.com/evansloan/collection-log/blob/master/src/main/java/com/evansloan/collectionlog/CollectionLogApiClient.java#L54, which takes the data that it has stored about your account and tries to upload it.

I've never debugged this code, but it works as intended for my account. I never have to go through and manually upload, but to be fair, I have heard that this is somewhat of a common complaint with people who do use this service. Maybe there are conflicting plugins, I'm really not sure what this issue could be here.

— Reply to this email directly, view it on GitHub https://github.com/evansloan/collection-log/issues/56#issuecomment-2364214619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ4IQOW5ON6XX62C7HODPWDZXRNJHAVCNFSM6AAAAABOJVPBMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRUGIYTINRRHE . You are receiving this because you commented.Message ID: @.***>

mrhappyasthma commented 2 months ago

So I just tried. I killed Callisto ~20 times. Hopped world. No update to collectionlog.net.

If I manually log out, no update to collectionlog.net.

I tried logging back in. Opening my collection log. Then logging out. -- It updated

peanubnutter commented 2 months ago

Part of the problem might be that people only check the collection log occasionally, and especially each page only occasionally. Can we confirm that only opened pages are the ones that update on logout?

mrhappyasthma commented 2 months ago

I can test that now. But I assume so. Lemme see.

mrhappyasthma commented 2 months ago

Correct. If I open the collection log (but don't go to Callisto page) it doesn't upload. If I open collection log and open Callisto page, then it uploads on logout (or world hop).

Not sure if that's a technical limitation or not. But it would probably be ideal to upload the whole collection log.

Sharpienero commented 2 months ago

I'm pretty sure it is a technical limitation since you have to open each panel for the initial sync. The values must not be sent to the client as varps/varbs and must just be read as an interface.

elwakka commented 1 month ago

I've been having this issue for two years. Manual uploads only work. But also sometimes it just uploads the same item again... and says todays date it was found. (even if I found the item years ago)