Same settings of colums in all views [#17594]

Get answers about the current version of MediaMonkey for Windows

Moderatore: Gurus

sonymaster
Messaggi: 16
Iscritto il: ven ott 05, 2012 3:27 am

Same settings of colums in all views [#17594]

Messaggio da sonymaster »

Hi experts,

Is it possible, to set the configuration of the colums for all views as same. I mean, that I would configure the colums for the Album Interpret view and copy this configuration to the search result view.
I've already checked the MediaMonkey.ini file after configure a view, but it seems, the configuration is stored in the database.

Is there any way, to do it?
Ludek
Messaggi: 5115
Iscritto il: ven mar 09, 2007 9:00 am

Re: Same settings of colums in all views

Messaggio da Ludek »

This values are not stored in the database, but within persistent.json

Anyhow you can create custom List view with whatever columns you want and use it then in various views (see Manage Views funtionality)
Ludek
Messaggi: 5115
Iscritto il: ven mar 09, 2007 9:00 am

Re: Same settings of colums in all views

Messaggio da Ludek »

Ludek ha scritto: lun feb 22, 2021 1:03 pm This values are not stored in the database, but within persistent.json

Anyhow you can create custom List view with whatever columns you want and use it then in various views (see Manage Views funtionality)
Sorry, I spoken too soon, seeing that currently most of the custom views for various nodes are incompatible (due to different view elements etc).
So the only current workaround seems to be editing persistent.json -- which is cumbersome though.

So entered this feature request as https://www.ventismedia.com/mantis/view.php?id=17594

Alternatively I could easily write an addon that would make MM5 to share columns configuration (size & visibility) for all views. Would such an addon be welcome?
sonymaster
Messaggi: 16
Iscritto il: ven ott 05, 2012 3:27 am

Re: Same settings of colums in all views [#17594]

Messaggio da sonymaster »

Hi Ludek,

many thanks for your hints. I had a look into the persistent.json file. It seems to be very complex. Is this something like an API or would it be better to don't touch it? :o

An add on would be great... in any case!
Ludek
Messaggi: 5115
Iscritto il: ven mar 09, 2007 9:00 am

Re: Same settings of colums in all views [#17594]

Messaggio da Ludek »

OK,
installing this addon: https://www.dropbox.com/s/drw57fd27zc4y ... .mmip?dl=0
will make the trick for you (the column settings and visibility will be shared for all views)

EDIT: OK, this initial version of the addon isn't perfect, as by sharing the columns it removes '#' column from playlists / playing node.
Workaround is to edit the shared columns within a _playlist_ node.

i.e.
1) install the addon (restart MM5)
2) Go to a playlist node and configure columns and visibility
=> the same columns config will be in all other nodes/views
drakinite
Messaggi: 988
Iscritto il: mar mag 12, 2020 10:06 am

Re: Same settings of colums in all views [#17594]

Messaggio da drakinite »

sonymaster ha scritto: mar feb 23, 2021 3:44 am I had a look into the persistent.json file. It seems to be very complex. Is this something like an API or would it be better to don't touch it? :o
MM5 stores data in three different locations:
1) MediaMonkey.ini contains some app settings, such as launch preferences and other important settings
2) Persistent.json contains other app settings - Pretty much any minor data that wouldn't cause a big headache if it were lost. For example, your columns, views, and the general "state" of the app.
And 3) the database - which contains your library.
Ludek's point was moreso that it was not in the database. It's not necessarily meant to be changed by hand, even if there's no big risk if you do so. The worst that can happen, to my knowledge, is that you'll just have to delete it. MM automatically remakes persistent.json if it's deleted.
Having an addon handle it would make more sense than editing persistent.json by hand :)
Immagine
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
sonymaster
Messaggi: 16
Iscritto il: ven ott 05, 2012 3:27 am

Re: Same settings of colums in all views [#17594]

Messaggio da sonymaster »

@Ludek
I installed your add on this morning and it seems to work fine.... Thanks for providing this snippet so quickly :)
As you wrote, it is a first version, but it does what I wanted :wink:

@draknite
That helps me a lot to understand the very basics of the config settings, thanks!
Barry4679
Messaggi: 2446
Iscritto il: ven set 11, 2009 8:07 am

Re: Same settings of colums in all views

Messaggio da Barry4679 »

Ludek ha scritto: lun feb 22, 2021 1:17 pm Alternatively I could easily write an addon that would make MM5 to share columns configuration (size & visibility) for all views. Would such an addon be welcome?
Yes, I think that is useful. I will install it, as I prefer that behaviour (I think ... time will tell).
Thanks.

I installed it.
It seems to break the Manage View facility. ... I can make a change using "Choose columns/sort" ... that works as expected.

But "Manage Views" is not working correctly. I can change sort, but I cannot add an extra column.
When I tried to change both it crashed (6A540000), and the Restart button white screened.

nb. I was testing the List By Album view.

[UPDATE] the original dump was 3C3F46EE ... I am running 2314
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Ludek
Messaggi: 5115
Iscritto il: ven mar 09, 2007 9:00 am

Re: Same settings of colums in all views [#17594]

Messaggio da Ludek »

Yes, I can confirm that this addon supresses the 'Manage Views' functionality with regard to columns settings and visibility.

I just cannot replicate the crashes, but will check the crash logs.
felixkasza
Messaggi: 9
Iscritto il: mer ago 12, 2020 4:31 pm

Re: Same settings of colums in all views [#17594]

Messaggio da felixkasza »

Ludek ha scritto: mar feb 23, 2021 1:15 pm installing this addon: […] will make the trick for you (the column settings and visibility will be shared for all views)
SUPER! I cannot thank you enough!

If you decide to also add something that sets every node to "List", it'll be perfect. To me, MM is a specialised music management DB, and I have no need for browsers and for grid views of covers.

Thanks,
Felix.
Toemmel
Messaggi: 98
Iscritto il: dom mar 02, 2008 4:50 pm

Re: Same settings of colums in all views [#17594]

Messaggio da Toemmel »

Hi Ludek,

I've installed you nice addon on MM 5.0.2.2531 and it made a good job by synchronizing the comumn views.

But I get a lot of error messages on MM startup, while MM ist running and also on quitting MM. Here only a part of the messages:

Codice: Seleziona tutto

Application Error 
Application throw an exception "Cannot set property 'allColumns• of  undefined" 
TypeError: Cannot set property 'allColumns' of undefined at ColumnTrackList.storePersistentState 
(file:///controls/columntracklistjs:469:30) at ColumnTrackListstorePersistentState 
(file:///controls/columntracklistjs:617 1 ) at ColumnTrackList.method [as storePersistentState] 
(file:///mminitjs:4060:38) at storeStateFn (file:///controls/controljs:1 138:75) 
at window.forEach 
at window.Control.ControlstorePersistentStates 
(file:///controls/controljs:1 143:5) at Object.window.uitools.browseAndStoreUlState 
(file:///actionsjs:8692:34) at Object.window.uitoolsstoreUlState (file:///actions.js:871 2:17) 
at eval (file:///maincontent.js:66:24) 
at line 469!! 
Source code: 
465. 
466. 
467. 
468. 
469. 
470. 
storePersistentState: function (state) { 
if (!this.disableStateStoring) { 
state.allColumns = thisstoreColumnsO; 
if (this.autoSortSup 
Callstack: Script: file:///mminit.js ; Func window.myAlert ; Row: 324 ; 
COI: 17 
Script: file:///mminit.js ; Func window.alertException ; Row: 334 ; COI: 9 
Script: file:///mminit.js ; Func window.onerror ; Row: 304 ; COI: 13 
If you like, I can send you all the screenshots bei PM because I'm not able to attach them here.

I'm using the portable version and I have included some user specific columns.

Thomas
Ludek
Messaggi: 5115
Iscritto il: ven mar 09, 2007 9:00 am

Re: Same settings of colums in all views [#17594]

Messaggio da Ludek »

Hi Thomas,
I see, the addon hasn't been updated, here is the new version: https://www.dropbox.com/s/drw57fd27zc4y ... .mmip?dl=0
Toemmel
Messaggi: 98
Iscritto il: dom mar 02, 2008 4:50 pm

Re: Same settings of colums in all views [#17594]

Messaggio da Toemmel »

Hi Ludek,

super good! And it works! :D

May I kindly ask you for implementing this nice tradtional feature into MM as an standard equipment!? :wink:

Thomas
Rispondi