Same settings of colums in all views [#17594]

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Same settings of colums in all views [#17594]

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

by Toemmel » Wed Jan 19, 2022 1:34 am

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

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

by Ludek » Mon Jan 17, 2022 1:13 pm

Hi Thomas,
I see, the addon hasn't been updated, here is the new version: https://www.dropbox.com/s/drw57fd27zc4y ... .mmip?dl=0

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

by Toemmel » Sun Jan 16, 2022 1:25 am

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:

Code: Select all

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

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

by felixkasza » Sun Mar 07, 2021 9:28 pm

Ludek wrote: Tue 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.

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

by Ludek » Wed Feb 24, 2021 12:25 pm

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.

Re: Same settings of colums in all views

by Barry4679 » Wed Feb 24, 2021 3:38 am

Ludek wrote: Mon 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

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

by sonymaster » Wed Feb 24, 2021 2:40 am

@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!

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

by drakinite » Tue Feb 23, 2021 5:52 pm

sonymaster wrote: Tue 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 :)

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

by Ludek » Tue Feb 23, 2021 1:15 pm

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

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

by sonymaster » Tue Feb 23, 2021 3:44 am

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!

Re: Same settings of colums in all views

by Ludek » Mon Feb 22, 2021 1:17 pm

Ludek wrote: Mon 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?

Re: Same settings of colums in all views

by Ludek » Mon 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)

Same settings of colums in all views [#17594]

by sonymaster » Sat Feb 20, 2021 6:32 am

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?

Top