Spritradar, fuel price search app

Given recent developments and missing it on 4.4, I found and updated harbour-spritradar.

Spritradar (fork) | OpenRepos.net — Community Repository System and chum (soonish) …

I’ve moved the api key for Tankkoenig out of the app and into Settings, so you need to get an api key for that endpoint.

I’d like to hear if any of the other endpoints still work. I doubt it.

And btw, this was an experiment to see if I could finally get a minimal Settings implementation working with Sailjail. I failed. It’s very weird.

Declare: orgname and appname ‘harbour-spritradar’ and ‘harbour-spritradar’ and a minimal implementation of Settings will find files at
~/config/harbour-spritradar/harbour-spritradar.conf

That’s WITH a Sailjail entry. Don’t get it. I know a number of solutions, but all of them mean a completely new implementation of Settings. Grrr.

5 Likes

Ah, note. don’t bother UNLESS you already have an old version around. Or you are willing to create the conf files by hand.

1 Like

For the time being, I’ve removed sailjail. Also moved apikey to the plugin level.

Currently only the spanish provider and tankkoenig provider work.

Any links to open apis (json) would be appreciated.

Bumping this since some talk in the German thread leads me to believe that postal code searches are broken?

@carmenfdezb and I both have versions available. If anyone sees this, please make a note of which version you have installed here so we can test where the postal code error shows up. Thanks!

2 Likes

I got this error ad have version 0.2.1-1.2.1-jolla installed from chum.

I fixed bug about postal code searches: Commits · carmenfdezb/harbour-spritradar · GitHub
If you want, I can do PR to your code, but I don’t know if you did some modifications that I don’t have in my code.

3 Likes

Oh, that’d be really sweet if you do a PR. Then I’ll propagate to chum, ASAP! If the merge has issues, I’ll fix em!

Thanks!
EDIT, if it’s only that one line, I can quickly do that by hand!

Ok, that’s ‘my’ version. I’ll see if I can get @carmenfdezb 's fix in this weekend.

1 Like

Meanwhile I’ve updated spritradar for aarch64 in openrepos, if someone wants to try it: SpritRadar (aarch64) | OpenRepos.net — Community Repository System

5 Likes

Thank you, works like a charm.

But another question, what is the difference between @carmenfdezb and @poetaster version?

1 Like

I’ve done PR to your project in github with some fixes. It’s working fine on my phone, I changed plugin default because app crashes if apikey isn’t added before. Please, take a look PR and accept it if it’s all right for you. Thanks!

1 Like

The main difference is that in @poetaster version you have to input an apikey for Tankerkönig plugin from settings, and in my version it’s included in code.

3 Likes

Thank you very much! I’ve released Release v0.2.2 · poetaster/harbour-spritradar · GitHub and am pushing to CHUM. I’ll update to open repos, though, @carmenfdezb maybe I should remove my version from openrepos ?

1 Like

Well, maybe the best way is to keep an only version. So I can remove my version aarch64 in openrepos, and keep only your version in openrepos and chum. What do you think? For me it’s right :slight_smile:

I think some users will be unhappy having to go get keys for tankerkönig :slight_smile: The reason I added the api key is that it’s a free service and the only way they can monitor and respond to abuse is if they have a contact mail for a key. I thought about that and realized that I didn’t want to be on the hook for api abuse. Though, I don’t think it’s an issue.

I’m fine with it either way. I think (?) all of your fixes and translation updates are in now, too? I set up automatic builds on github today so that it’s also available there.

2 Likes

You are right, to avoid abuse api it’s better than every user add its own apikey, so I will remove my version from openrepos asap. Thank you for all your work!

2 Likes

When I ran ‘zypper dup’ an hour ago, it pulled a new version of Spritradar from chum. Now, it seems pretty borked. The application takes forever to start: I first get the spinner in the icon view spinning forever, then icon view disappears and a considerable time late the application first asks for Sailjail permissions and, finally, gives me the “favorites” view - albeit, not always, sometimes it just does not come up at all after the spinner vanishing.

Starting from the CLI gives me this:

defaultuser@192.168.2.15's password: 
Last login: Sat Nov  4 16:00:34 2023 from 192.168.2.1
,---
| Sailfish OS 4.5.0.24 (Struven ketju)
'---
[defaultuser@Xperia10II-DualSIM ~]$ harbour-spritradar 
[D] unknown:0 - Using Wayland-EGL
library "libGLESv2_adreno.so" not found
library "eglSubDriverAndroid.so" not found
[D] load:45 - Cannot assign [undefined] to QString
[D] load:45 - Cannot assign [undefined] to QString
[D] load:45 - Cannot assign [undefined] to QString
[D] load:45 - Cannot assign [undefined] to QString
[...]

Tried rebooting, tried reinstalling from openrepos as well as from chum. Tried the previous version from openrepos. No avail.

Until an hour ago, it just worked - promptly and reliably - as it had for years now. Unfortunately, I have no idea which version that was. Since I run ‘zypper dup’ once in a while it could probably not have been to exotic.

Please help!

I recently updated the chum and ‘my’ openrepos version with fixes that @carmenfdezb had made (for postal code searches). It seems to have worked for everyone till now. I would suggest it’s a conflict between ‘my’ version and @carmenfdezb s where my version requires an api key for the german ‘tankerkönig’ api and does not for her’s . So, if you were using a version before, with the german provider without a personal api key you may have issues. A key from tankerkönig has no costs associated but requires an email (which thy don’t appear to check).

3 Likes

As @poetaster said, you need an api key if you want to use tankerkönig provider, and you have to put it in Settings before to use the app, if not, the app never load searching results. I suggest you to get an api key, remove ~/.config/share/harbour-spritradar/harbour-spritradar.conf, open the app and add api key to settings, and then, go to search page and select tankerkönig provider before the searching. Instead of removing .conf file you can edit it and add api key if you don’t want to lose your favorites.

1 Like

I really need to add a check + how to & link to keep people from struggling with this. I had a question before I go at it. Which providers do we know work?