View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0017548||MediaMonkey 5||Skinning framework||public||2021-02-14 02:59||2021-05-19 09:40|
|Target Version||5.0.1||Fixed in Version||5.0.1|
|Summary||0017548: Switching skins on one install causes all other installs to also change skin|
|Description||If 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 Reproduce||1) 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 Information||Side 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|
|Tags||No tags attached.|
|Fixed in build||2405|
Material Design Compact.mmip (780 bytes)
||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).|
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?
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.
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?
||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).|
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).
||Fixed (changed precompiledLess to precompiledLess_<skin name>_<layout name>.css).|