Bug 255325

Summary: Remember 'organise files' settings for copying to local collection
Product: [Applications] amarok Reporter: emphyrio
Component: Collections/LocalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: wishlist CC: 123kash, anbugge, matej, nhn, philschmidt, ralf-engels, thierry
Priority: NOR    
Version: 2.3.90   
Target Milestone: 2.4.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.4
Sentry Crash Report:

Description emphyrio 2010-10-26 16:45:34 UTC
Version:           2.3.0 (using KDE 4.5.0) 
OS:                Linux

Every time one wants to copy an album to the local collection you get a dialog box for setting how the files are going to be saved. After a few times this is very annoying. 

Reproducible: Always



Expected Results:  
Setting things one time, after which files get organised as set.
Move these settings to the settings for magnatunes in the amarok configuration.
Comment 1 Myriam Schweingruber 2010-12-12 12:14:21 UTC
*** Bug 259568 has been marked as a duplicate of this bug. ***
Comment 2 Philipp Schmidt 2010-12-25 19:06:49 UTC
Can confirm this here as well. As stated in the duplicate 259568, only the Advanced Dialog is affected.

What we're doing and actual behavior:

Switching between presets in the advanced organize files dialog with different settings for the file names. On switching the preset the saved schema for the filenames is not loaded. Only manual editing is possible.

Expected behavior:

On switching the preset the saved schema for the file names should be loaded.

Ways to reproduce:

Switch to Advanced Mode, create a new preset (if no second exists), else switch to an existing one and notice that the schema doesn't change.
Comment 3 Myriam Schweingruber 2010-12-26 19:50:04 UTC
bumping version and setting to confirmed by duplicate.
Comment 4 Sergey Ivanov 2010-12-28 21:20:12 UTC
commit 2c2eebae79fef852bf7883e2e7108d4959c07d12
branch master
Author: Sergey Ivanov <123kash@gmail.com>
Date:   Tue Dec 28 23:18:37 2010 +0300

    Fixed issue with the Organize Files Dialog that prevented presets from being
    loaded when in advanced mode. Patch by Philipp Schmidt <philschmidt@gmx.net>
    BUG: 255325

diff --git a/ChangeLog b/ChangeLog
index 7343431..d1813d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@ VERSION 2.4-Beta 2
   BUGFIXES:
     * Fixed issue with Audio CDs that do not provide CDDB information. Patch by
       Andriy Gapon <avg@icyb.net.ua>. (BR 257818)
+    * Fixed issue with the Organize Files Dialog that prevented presets from being
+      loaded when in advanced mode. Patch by Philipp Schmidt <philschmidt@gmx.net>
+      (BR 255325)
 
 
 
diff --git a/src/dialogs/FilenameLayoutDialog.cpp b/src/dialogs/FilenameLayoutDialog.cpp
index 97b9253..0efd23d 100644
--- a/src/dialogs/FilenameLayoutDialog.cpp
+++ b/src/dialogs/FilenameLayoutDialog.cpp
@@ -346,7 +346,10 @@ FilenameLayoutDialog::setFileName( QString FileName )
 // attempts to set the scheme
 void FilenameLayoutDialog::setScheme(const QString& scheme)
 {
-    inferScheme( scheme );
+    if( m_advancedMode )
+        filenameLayoutEdit->setText( scheme );
+    else
+        inferScheme( scheme );
 }
Comment 5 Sergey Ivanov 2011-01-06 13:53:57 UTC
Seems not to be solved.
Comment 6 Philipp Schmidt 2011-01-06 14:19:44 UTC
Yes, I can see what is not Fixed. Seems now that we do indeed have two different Bugs (If you mean something different please state what exactly):

First: The Bug mentioned in 259568 which Myriam has marked as a Duplicate which I now believe is not, which I also described in Comment 2 and which is fixed by the Patch I supplied.
Second: The Bug mentioned by the OP which regards the Dialog as a whole where the settings are not saved, but ONLY when the Dialog is aborted using the Cancel Button. I just switched Presets and moved a few files and then started the Dialog again: The Preset and Textedit had indeed saved the state I had used before.

That is what I have noticed and the Question is what should be the correct Behaviour: I believe that pressing Cancel should not save the Dialog state (The selected Collection directory however is saved -> should not be). The Presets however are also not saved when pressing Cancel which is in my eyes wrong behaviour. 

The Bugreport by the OP is also (in my eyes) very inconclusive as vital Information is missing, for example I do not understand the "Magnatune"-Reference and also can't comment on it as I do not use it.
Comment 7 Philipp Schmidt 2011-01-08 13:46:58 UTC
Checked my IRC Logs regarding the reopening:

rotzbouw and I couldn't reproduce his mentioned behaviour but then found out that the config is only written on a clean exit. As he had crashes in between his changes were not saved.

So I believe that this bug is indeed resolved.
Comment 8 Sergey Ivanov 2011-01-08 13:53:45 UTC
Still trying to summon him to comment this bug. But If you say that now he can not reproduce It, then problem is really resolved.
Comment 9 Sergey Ivanov 2011-01-11 20:51:57 UTC
*** Bug 262238 has been marked as a duplicate of this bug. ***