Bug 341092 - Preselection for files are not saved
Summary: Preselection for files are not saved
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Organize Files Dialog (show other bugs)
Version: 2.8.90 (2.9 beta)
Platform: OpenSUSE Linux
: NOR normal (vote)
Target Milestone: 2.9
Assignee: Amarok Developers
URL:
Keywords:
: 356267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-19 08:50 UTC by Joao Cardoso
Modified: 2016-08-20 10:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.9


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joao Cardoso 2014-11-19 08:50:52 UTC
1) If I add a new preset scheme, it will not be saved.
2) If I modify an existing scheme it will not be saved either.
3) Removing a preset is also ignored.

Button "Update Preset" is always disabled, no matter what modifications I make.

Despite that, the file reorganization is done correctly. But it is very annoying to have to specify the same naming scheme every time i need to perform the operation.

Reproducible: Always

Steps to Reproduce:
CASE 1)
1. Enter the dialog
2. Add a new preset and specify the scheme
3. Check button "Update Preset"

CASE 2)
1. Enter the dialog
2. Select an existing preset and specify the scheme.
3. Check button "Update Preset"

CASE 3)
1. Enter the dialog
2. Select an existing preset and hit "Remove Preset".


Actual Results:  
CASE 1)
The added preset is added to the list.
After performing the reorganization, when entering the dialog, the added preset does not appear. 

CASE 2)
The button "Update Preset" is always disabled, not allowing to save the preset.

CASE 3)
The preset is removed from the list.
After performing the reorganization, when entering the dialog, the added is still there. 

Expected Results:  
CASE 1)
The added present should still be there.

CASE 2)
The "Update Preset" button should be enabled.

CASE 3)
The removed preset should be deleted.
Comment 1 Myriam Schweingruber 2015-12-04 11:15:58 UTC
*** Bug 356267 has been marked as a duplicate of this bug. ***
Comment 2 Myriam Schweingruber 2016-06-20 09:29:47 UTC
Confirmed, still valid in current git master
Comment 3 Myriam Schweingruber 2016-06-20 20:46:39 UTC
Some more information: apparently, running Amarok in debug mode, there is no saving action at all, what I get as an output when clicking on the "Update preset" button, is this:

BEGIN: QList<Token*> TokenDropTarget::tokensAtRow(int) 
  Row: 1 items: 13 
END__: QList<Token*> TokenDropTarget::tokensAtRow(int) [Took: 0s] 

There appears to be no target for saving a preset ...
Comment 4 Matěj Laitl 2016-08-20 10:47:18 UTC
I think this may be resolved by work done on bug 226144:

> Git commit 0e760e5f8d06d00e084c14b64875f58bb42bd8f1 by Matěj Laitl, on
> behalf of Stefano Pettini.
> Committed on 20/08/2016 at 10:37.
> Pushed by laitl into branch 'master'.
> 
> Organize tracks / Guess tags presets persisted properly.
> 
> FilenameLayoutWidget is reworked to fix an old bug regarding the presets
> not being saved properly, that I was also able to reproduce.
> 
> Logic is not a bit more "linear". Presets are shared between "Organize
> tracks"
> and "Guess tags" dialog. If this is not what is wanted, it can be easily
> changed,
> just let me know. Presets are saved as soon as they are added, updated or
> deleted.
> It is not anymore necessary to accept the dialog to save eventual changes.
> 
> The preset used is not saved with the marker "#DELIM#selected" anymore.
> Presets are just presets. The one used is matched on the fly using the custom
> preset field. If a preset matches the custom preset field, it's considered
> selected. Users can of course create custom presets as before.
> While presets are shared between the two dialogs, custom presets are not.
> 
> Add/Update/Remove work properly. Clicking on a preset name in the combobox
> resets the custom pattern to the preset value, this is a new feature,
> before it was not possible.
> 
> It's a bit difficult to explain, but UX is more natural, just give it a try.
> 
> A lot of testing was done (by Stefano), like:
> - adding/updating/removing presets.
> - if settings are persisted and shared when dialogs are cancelled or
> accepted.
> - if custom patterns are persisted and not shared.
> - resetting a modified pattern to its defualt.
> - cancelling dialogs, modified presets are kept but custom patterns are not.
> 
> REVIEW: 128565
> 
> M  +3    -1    ChangeLog
> M  +1    -1    src/amarokconfig.kcfg
> M  +0    -5    src/dialogs/OrganizeCollectionDialog.cpp
> M  +0    -2    src/dialogs/OrganizeCollectionDialog.h
> M  +53   -49   src/widgets/FilenameLayoutWidget.cpp
> M  +4    -6    src/widgets/FilenameLayoutWidget.h
> 
> http://commits.kde.org/amarok/0e760e5f8d06d00e084c14b64875f58bb42bd8f1

Please re-test with current git master and reopen if it is not the case.