View Issue Details

IDProjectCategoryView StatusLast Update
0017548MMW 5Skinning frameworkpublic2021-09-22 15:11
Reporterdrakinite Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status closedResolutionreopened 
Product Version5.0 
Target Version5.0.1Fixed in Version5.0.1 
Summary0017548: Switching skins on one install causes all other installs to also change skin
DescriptionIf you change skins on a Portable install, then reload a non-portable install, the non-portable one will have switched to the new skin as well.

I believe it is caused by something in the LESS compilation, and is not actually switching the selected skin, as I explain below.
Steps To Reproduce1) Install the "Material Design Compact" addon (attached) on your non-portable install. Switch to Material Design (Dark). [I'll explain why in a bit.]
2) Open a non-portable install.
3) On non-portable, switch from Material Design Dark to Material Design.
4) After complete, go to your non-portable install, and close + reopen.

- Non-portable has now switched to the appearance of Material Design.
- The "compact" appearance has now gone away, even though the addon is still installed. (This hints to me that the portable install, which doesn't have the addon installed, is somehow giving the non-portable install its compiled LESS.)
- When you open the Skin options panel, it will say that Material Design (Dark) is still selected.
Additional InformationSide note: My screenshot that I attached shows the opposite of what I described in the steps to reproduce (MD selected but has MDD appearance). Don't worry about it. XD
TagsNo tags attached.
Attached Files
image.png (92,256 bytes)   
image.png (92,256 bytes)   
Fixed in build2405

Relationships

related to 0016914 closedLudek Portable: Portable install should ignore Temp Setting 
related to 0018315 closedpetr Enable configurable options for Skins 

Activities

petr

2021-02-15 19:16

developer   ~0061945

Based on tests with Jordan we've found that the issue is on INI's TempDir pointing to system temp folder (wasn't ignored on MM4 data import).

Ludek

2021-02-15 19:46

developer   ~0061946

Last edited: 2021-02-15 20:01

The similar issue been solved in course of 0016914

We could simply ignore temporary directory location when importing MM4 non-portable --> MM5 portable, but this would need to be probably well tested.
By setting up the default /portable/Temp/ directory user would loose also thumbs/pre-converted files from MM4, so the question is how risky change it is in this 5.0 RC state.
On the other hand in the temporary directory always should be only temporary files (so probably not so high risk).

Nevertheless majority of users that already imported non-portable MM4 settings have the system temp dir configured in MM5 portable so the original issue isn't solved anyway.
SOLUTION: use precompiledLess per skin? like precompiledLess_BlackMonkey.css ? Or maybe rather precompiledLess_portable variant?

drakinite

2021-02-15 20:23

developer   ~0061948

Re "majority of users that already imported non-portable MM4 settings have the system temp dir configured in MM5 portable":
I'd say the solution to this is simple. If users report issues related to this bug (Skins changing between non-portable and portable), we can tell them to either reinstall portable and edit Portable/MediaMonkey.ini and change TempDir to Portable\Temp\. The number of users who will keep a portable install from before MM5.0.0 release will be very small compared to the number of new users post-release.

Re "By setting up the default /portable/Temp/ directory user would loose also thumbs/pre-converted files":
This is true, but as you said it's just temporary files. Additionally, Portable mode really should be portable and not depend on any other system folders, so that it could be run on a flash drive without issues.

Note: There are four items that I found were copied from MM4: TempDir, CacheDir, PreviewDir, and UPNP_CacheDir.

Re "use precompiledLess per skin":
I don't really think this is necessary, and it may lead to other issues such as a lot of garbage files and MM reading the wrong css file. Plus I think a lot of code would have to be changed to make it work. I'd argue that the other solution is much better.

peke

2021-02-15 23:18

developer   ~0061949

Last edited: 2021-02-15 23:22

As @Ludek pointed I have found that like in 0016914 problem is only showing if there is Normal Install of MM5 where you imported MM4 settings and where there is Portable Install of MM5 where you also imported MM4 settings in which case both installs point to same folders.

In case you install MM5 portable and say NO to MM4 install or you only have MM5 installed (MM$ was never installed) then portable Installation of MM5 do not share settings and uses Portable\Temp that do not overlap with current settings and changes to one do not reflect changes to other.

Based on that if I manually copy Cached folders and MM.DB -> MM5.DB I get same effect like I was imported MM4 library and no overlaps because on first start of MM5 Portable I said NO to import.

That conclude that in case of solving 0016914 we have not counted that Temp folder could contained cached data. Which would drastically increase import time (temp folders would need to be copied to Portable Temp Folder) which is as @Drakinite pointed at 0017548:0061948 is resolved simple by making small script (Simple BAT File can do that) that would do purpose of migrating MM4 folders -> MM5 portable folders.

Also I just asked one user with Portable MM5 moved from PC to PC that Album arts are not migrated and we could not find why, well it appears that CacheDir was pointing to "%TEMP%" instead of "Portable\Temp" and as soon as it connects external HDD with Portable MM5 it mixes Temp folders.

@Ludek/@Petr Is it possible that in Case of Importing MM4 library and upgrading it to latest version we can also check that in case of Portable install also those cached/Temp folders are also migrated? eg. using that BAT file?

drakinite

2021-05-18 20:56

developer   ~0063277

The issue is still present in 2405. Running the 2405 installer, and clicking "Yes" to importing MM4 database & settings, still results in the TempDir being copied into MediaMonkey.ini (as well as CacheDir and PreviewDir).

Ludek

2021-05-19 09:00

developer   ~0063279

Last edited: 2021-05-19 09:05

When you import MM4 non-portable settings to MM5 portable then it is expected that also the TempDir, CacheDir, PreviewDir, UPNP_CacheDir are imported.
e.g. CacheDir is directory where MM4's virtual CD tracks resides and are converted to "normal" tracks in MM5 library.
Importing MM4 non-portable to MM5 portable breaks the portability in many ways -- so I don't think that it is a good solution to import just something and not to import something else etc. There is hard to find a "rule".

As for the original issue: the most easy/low risk solution is using precompiledLess per skin (like precompiledLess_BlackMonkey.css) - or precompiledLess_portable variant (to prevent this issue from happening when running both MM5 portable/non-portable instances within the same temp dir).

petr

2021-05-19 09:40

developer   ~0063282

Fixed (changed precompiledLess to precompiledLess_<skin name>_<layout name>.css).

peke

2021-06-20 12:54

developer   ~0064024

Verified 2418

Unable to replicate with 2418 and also I tested combining it with older versions fix at 0017548:0063282 works.