library - where are the "view" settings stored

Fixxx your Mixxx

Moderator: garth

library - where are the "view" settings stored

Postby pieterdp » Fri Jan 19, 2018 9:16 am

Hi,

I used the mixxx source code to build a version that I can run in kiosk mode (touchscreen) without menu bar, so users can't get out of the application.
I'm running Raspbian stretch on a PI3. I have mixxx 2.1.

Now, I would like to change how the library gets displayed, i.e. I would like to remove some columns (e.g. "comment", "preview",...) since this is confusing for the users.

Doing this with an official package is easy: you hide some columns, do a proper quit and restart, and they remain gone until you unhide them again.

However, since I don't have the menu bar anymore, I can't do a proper quit (also the Ctrl+q is not working).

So I'm wondering where this info on which library columns to hide or show is stored.
I checked the mixxx.cfg file, but I haven't seen anything that related to library columns (maybe I overlooked?)
I also checked mixxxdb.sqlite file, but can't find setting related to the view of the library.

Thanks for your help!

Pieter
pieterdp
 
Posts: 3
Joined: Fri Jan 19, 2018 8:54 am

Re: library - where are the "view" settings stored

Postby tapir » Fri Jan 19, 2018 4:52 pm

The selected columns and their state are stored in the settings table, a binary protobuf object encoded as a string:
Code: Select all
mixxx.db.model.library.header_state_pb|CggIARAAGAAgAAoRCAAQMhgBIAEqB3ByZXZpZXcKEggAEFoYAiACKghjb3ZlcmFydAoICAEQABgDIAMKCAgAEDIYBCAECggIARAAGAUgBQoJCAAQyAEYBiAGCgkIABDIARgHIAcKCQgAEKwCGAggCAoICAEQABgJIAkKCAgAEGQYCiAKCggIABBkGAsgCwoICAEQABgMIAwKCAgBEAAYDSANCggIARAAGA4gDgoICAAQMhgPIA8KCAgBEAAYECAQCggIABBGGBEgEQoICAEQABgSIBIKCAgAEEYYEyATCggIABAyGBQgFAoICAEQABgVIBUKCAgAEDIYFiAWCggIABBaGBcgFwoICAEQABgYIBgKCAgBEAAYGSAZCgkIABD6ARgaIBoKCAgBEAAYGyAbCggIARAAGBwgHAoICAEQABgdIB0KCAgBEAAYHiAeCggIARAAGB8gHxABGAcgAA==|0|0


The sorting is easier to read and parse:
Code: Select all
mixxx.db.model.library.ColumnsSorting|genre 1 title 1 artist 1 |0|0
tapir
Mixxx Developer
 
Posts: 367
Joined: Sat Aug 04, 2012 12:03 pm
Location: Stuttgart

Re: library - where are the "view" settings stored

Postby pieterdp » Fri Jan 19, 2018 8:21 pm

ok, thanks, got it. Is there an easy way to know what to write to the header_state_pb field in order to hide or show some columns?
pieterdp
 
Posts: 3
Joined: Fri Jan 19, 2018 8:54 am

Re: library - where are the "view" settings stored

Postby tapir » Sat Jan 20, 2018 1:38 pm

Unfortunately not. But I would suggest the following process as a workaround if you need to maintain only a few, predefined configuration options:
  • Change the configuration interactively in some Mixxx instance to capture the desired settings in a development database
  • Export the strings from the development database
  • Import the strings into the target database
You can use the sqlite3 command-line tool for accessing the database.

Protobuf is portable and reasonably efficient, but very inflexible because it relies on generated code for (de-)serialization. Today I would simply use JSON for this purpose, even if it is less strict, has some runtime overhead, and requires compromises. Portability, interoperability, and transparency should be key!
tapir
Mixxx Developer
 
Posts: 367
Joined: Sat Aug 04, 2012 12:03 pm
Location: Stuttgart

Re: library - where are the "view" settings stored

Postby tapir » Sat Jan 20, 2018 1:51 pm

tapir
Mixxx Developer
 
Posts: 367
Joined: Sat Aug 04, 2012 12:03 pm
Location: Stuttgart

Re: library - where are the "view" settings stored

Postby pieterdp » Sat Jan 20, 2018 4:44 pm

ok, will do this, should indeed work.
Thanks for your help!!
pieterdp
 
Posts: 3
Joined: Fri Jan 19, 2018 8:54 am


Return to Troubleshooting & FAQ

Who is online

Users browsing this forum: No registered users and 26 guests