Task #1162

Move favorites to SQLite database

Added by Spyhawk 3 months ago. Updated 2 months ago.

Status:Fixed% Done:

100%

Priority:Normal
Assignee:IR4T4
Category:Mod UI
Target version:2.77
OS: Arch:

Description

Check if storing favorites from files storage to embedded Sqlite storage is possible/makes sense (per profile entries?).


Related issues

Related to ET: Legacy Development - Feature #888: Improvements of server browser New 21.06.2017

Associated revisions

Revision 90e47278
Added by IR4T4 3 months ago

client: restore favorites from db, fix macro names, some refactoring
refs #1162

Revision abea290a
Added by IR4T4 3 months ago

client: new client command 'save_favs’ to export favorites from db/game
into old file format refs #1162

Revision c626d236
Added by IR4T4 3 months ago

client: update db favorite on connect refs #1162

Revision c9b5888b
Added by IR4T4 3 months ago

db: add whitelist table, fix start with non existing db, refactoring
refs #1166, #1162

Revision 0b64d601
Added by IR4T4 3 months ago

misc: don’t add localhost server to favorites, client command to add
favs (not active) refs #1162

History

#1 Updated by IR4T4 3 months ago

add new table(s) to db done
implement sql schema updates for existing dbs done

extend LAN_AddServer calls (source, name, addr) to send more properties (see table properties f.e. servername, mod ... ) but keep compatibility for vanilla clients (ui legacy & vanilla client case) done

add new UI to manage favorites (in main menu) old menu
share with other profiles? no
– add personal notes (for admin email etc) on hold
add/remove servers done
– server homepage link?! on hold
set sort order see field update
show current ping/status/player count won’t do
– total play time ?! (requires session tracking) on hold
on profile change: reset internal favorite servers and load favorites from profile only done
update on connect (hostname, updated) done
export favs to old file format. done
-addfav console cmd
done but not active
copy/save DB before updat done
- reset ui filter cvars on profile change? on hold

#2 Updated by Spyhawk 3 months ago

Before anything else... What is the initial point we’re trying to solve here?
Is this all about adding extra features (that few people or nobody really cares about)?

The upside of the file format is that it is easy to backup with their profile, by anyone. With a DB, not so much.

#3 Updated by ryven 3 months ago

One of the most important feature is that you can have common favorites gathered from all other mods. The favorites table would contain the profile field, and in case profile names will match in different mods, you would be able to display the whole list of added servers. You would be able then display the whole list in the legacy main menu, with the servers added in different mods. You could also change the terminology to bookmarked servers. More over, we could try to track the last visited servers directly from the game engine, and display it along with bookmarked servers. Also you would need then add the mod field in the table to give more information in the list.

#4 Updated by Spyhawk 3 months ago

One of the most important feature is that you can have common favorites gathered from all other mods.

Right, I didn’t think about that aspect. Do you think it is really worth splitting the Favorites by profiles, or one set of favorites per installation would be enough? Two people playing on the same computer might play on similar servers, so the current profile distinction could be more a con than a pro.

Also you would need then add the mod field in the table to give more information in the list.

I don’t think this is needed. If we just store IP, we can retrieve any info as long as the favorite server is online. We can however add some "last played" or "time tracking" as mentionned above.

#5 Updated by ryven 3 months ago

If we just store IP, we can retrieve any info as long as the favorite server is online. We can however add some "last played" or "time tracking" as mentionned above.

Good point!

Do you think it is really worth splitting the Favorites by profiles, or one set of favorites per installation would be enough?

Per profile distinction is just something that comes up intuitively i think, hence the proposal. Edge cases aren’t that important, i would think of adding a cvar to allow displaying all servers from all profiles, but i would not consider this wise for security reasons. We can start making it per profile, but then change the behavior if it would be requested.

Anyways abit offtopic but in addition to facade issue, we definitely should look onto making legacy main menu experience the most attractive way to start connecting to the servers, so the more features we add the better for us.

#6 Updated by IR4T4 3 months ago

We might do one favorite file for all mods since the managing calls (add/remove) are UI and the real work is done in client code.

#7 Updated by Spyhawk 3 months ago

  • Related to Feature #888: Improvements of server browser added

#8 Updated by IR4T4 3 months ago

  • Status changed from New to In Progress
  • Assignee set to IR4T4
  • % Done changed from 0 to 60

#9 Updated by IR4T4 3 months ago

  • % Done changed from 60 to 80

#10 Updated by IR4T4 3 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 80 to 100

#11 Updated by Spyhawk 2 months ago

  • Status changed from Feedback to Fixed

#12 Updated by Spyhawk 2 months ago

  • Category changed from Mod CGAME to Mod UI

Also available in: Atom PDF