rgriebl / brickstore

An offline BrickLink inventory management tool.
https://www.brickstore.dev/
GNU General Public License v3.0
121 stars 26 forks source link

Option to have "Download even if already in cache" always checked #50

Closed BrickSouth closed 3 years ago

BrickSouth commented 3 years ago

I've never been entirely sure what the "Download even if already in cache" checkbox does, but I've just always checked it before updating my prices. I was just wondering if it would be beneficial to have an option to always have that checked? Maybe that makes sense, maybe not...I guess it would help if I knew what it did!

paramecie commented 3 years ago

I don't recommand this. It simply downloads the price guide for this item everytime instead of using the one automatically kept by BrickStore for 7 or 14 days - as you set it up. It makes a high load on BL (I've lists of hundreds or thousands of items), and items Avg price for ex don't change SO MUCH.

BrickSouth commented 3 years ago

Ok thanks for explaining it! I’ve played around with it and noticed sometimes it changes the price, sometimes doesn’t. When does it make sense to have it checked? When you are updating your prices after a long time of not doing so?

paramecie commented 3 years ago

Let it do what it does the best ;-) Simply decide the "age" you'd accept for an Avg price, like a week or a couple of weeks, and set this in Options.

Personnaly I use this (not sure if this is the default), and never or almost never refresh manually forcing it to be refreshed: image

rgriebl commented 3 years ago

I think it may be for the best to remove this option from set-to-priceguide dialog. The days of BrickStore's cache getting corrupted or out of sync are long gone. Plus, if you really need to update that a price-guide that you think is wrong, there's always the context-menu on the price guide view. Opinions anyone?

paramecie commented 3 years ago

Agreed for me - and anyway you still can set 1 day of cache in settings, but even that may be restricted to save a bit of the planet resources...

chiminirc commented 3 years ago

I have to say that removing this as an option doesn't make sense. There are times I need to get the latest price for something but otherwise want the default of 14 days. This is mostly when parting out the latest sets where prices (like lowest current price available) need to be pulled that moment.

I'm not sure the benefit to the user to not have this box displayed. It was blank by default.

paramecie commented 3 years ago

You can set a 3 days interval?

And you can right click here:

image

I can't hardly see the need of a big number of items to be updated as of "right now"? Just me.

chiminirc commented 3 years ago

I guess I don't understand the benefit of removing the checkbox. I have a workflow where I select multiple items and want to retrieve the price for those and force it. To expand a little, the workflow has to do with pulling the price data recursively (priceguide.txt) by timestamp of the file. A "get price from priceguide.txt where modified date is > Jan-8 2021 11:01am"

chiminirc commented 3 years ago

I do this because I want to create a spreadsheet of parts in a set and calculate price and volume. So I select the parts in a set that have good value, force a price update, then load those pricefiles (by modified date) to get volume. What I've been doing is then recreating a BSX file to change the COMMENT column into the value of "qty. last 6 months sales" and filtering out the low volume parts. All easily done when the checkbox existed.

chiminirc commented 3 years ago

In this screenshot price becomes "6 month sales qty" and comments becomes "dollar volume" Now, If i could add columns to display a parts sales volume (qty sold) along side 6ma price, that would be SUPER cool.

image

rgriebl commented 3 years ago

The problem with this force option is that it puts a heavy load on the BL servers and that's why I have come up with the caching scheme in the first place. That checkbox was really only meant as a debugging aid for me.

What you are doing may seem legit, but it really is abusing the timestamp of an internal cache file as a marker for your script, while hammering the BL servers with unnecessary requests.

chiminirc commented 3 years ago

Have you received complaints form bricklink regarding excessive price pulls? Since it is defaulted to unchecked, it won't accidentally get triggered be accident. Could you add an option under the configs to enable this?

image

paramecie commented 3 years ago

First, your IP and account will be blocked if you do about more than 5000 GET / POST in a signle day on BrickLink - even outside the APIs.

Trust me, I've be blocked once we changed thousands of prices...

Second, again, apart exceptions, the price of items doesn't change so much in 2 days or even a week.

I don't think setting your price based on any Avg of 0.33 instead of 0.34 will critically change your sales.

Setting to 0.05 will do - but it's not related to the exact current price guide, but your relative position to the Avg.

And also again - you can set the max age of the Price Guide to 3 days if you wish - why didn't you already change it, as I can see in the above picture?

But I think it's a heavy load on BrickLink... especially if we're numerous to do this. BrickStore could be banned/forbidden by BrickLink. What would we do then?

chiminirc commented 3 years ago

I understand your position. I guess I don't understand the concern about removing a feature that hasn't caused problems for users. For what I'm doing, changing the default days (priceguide cache age) doesn't fix what I'm doing with the price data. Even setting it to 1 day removes my ability to harvest price data for something I just updated. This is something I'm doing outside of your program so I'm an edge case. It isn't just about the latest price for what I'm doing. It's about identifying parts I want to further investigate volume on. I understand I'm an advanced seller case. This isn't just inventory management. It was an easy and great way for me to get stats on volume and price.

For now I can rename the price guide folder to do what I need to do. That would leave me with a folder structure of just price files I care about and not have to filter out older price data. If it becomes troublesome, a quick load of the BSX file in brickstock would work too.

paramecie commented 3 years ago

You malso generate GETs and download/parse the price guides you wish - I know it represents some work. Yesterday I read a bit of BrickSync code and apparently it's what it does, a basic get and html parse :-)

But then it'll be your queries on you IP and account, not through BrickStore impact on BL and responsability ;-)