Page 1 of 1

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Wed Apr 27, 2011 10:19 pm
by mekanix
Hi! I think that this thing is really important:

When editing tags, including covers, editing labels (if the option to save them in the tags is enabled) and so on, guayadeque remain blocked with no indication about the progress. This is really annoying, expecially if you are tagging lot of songs.

I want to propose to move all this actions in background, in the same way as the scan&update of the library, with a progress indication in the status bar.

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Wed Apr 27, 2011 10:48 pm
by anonbeat
The problem is when a track gets modified while its waiting for a tag change for example.

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Wed Apr 27, 2011 11:49 pm
by mekanix
mh... sorry, but I don't understand what you mean

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Thu Apr 28, 2011 12:31 am
by anonbeat
For example you do a change of a genre to 1000 tracks. That goes to background and start the job
You then reedit some of that albums and so other changes like ratings. This should go to background too and start the job.

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Thu Apr 28, 2011 1:20 am
by mekanix
Ok I see your point! And what about not putting it in buckground but simply display a dialog with a progress bar and something like "Applying the changes, please wait..." avoiding guayadeque windows to "become dark" (to block, in other words)?

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Thu Apr 28, 2011 12:12 pm
by lordofthelake
I think that the concurrency problem could be resolved implementing a job queue: you change a genre to 1000 tracks, this gets added to the job queue. A background thread starts processing the task. Then I change the author for other 100 tracks. The job gets queued in background. When the first task is finished, the new is processed, and so on. Does it make sense to you?

(Another, more fine grained but complex approach would be to use a thread per job and use a two-phase lock -- like the filesystem or the dbms do)

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Thu Apr 28, 2011 1:03 pm
by anonbeat
lordofthelake wrote:I think that the concurrency problem could be resolved implementing a job queue: you change a genre to 1000 tracks, this gets added to the job queue. A background thread starts processing the task. Then I change the author for other 100 tracks. The job gets queued in background. When the first task is finished, the new is processed, and so on. Does it make sense to you?

(Another, more fine grained but complex approach would be to use a thread per job and use a two-phase lock -- like the filesystem or the dbms do)
Yes and this is something I want to add in the future. Well my ideas is a litle different as for example I want to do is the way as the 2nd job will seach for pending modifications and merge it in the job queue and only add to the 2nd job the ones already was saved in the 1st job.
Dont forget this is at version 0.3.0 right now :) There are a lot of things I want to add in the future but time is very limited.

Thanks for your help

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Thu Apr 28, 2011 10:02 pm
by mekanix
:D Ok I definitely support these ideas!

Editing Tracks, Including Covers and so on: make it backgrou

Posted: Sat Apr 30, 2011 7:51 am
by lordofthelake
anonbeat wrote:
Yes and this is something I want to add in the future. Well my ideas is a litle different as for example I want to do is the way as the 2nd job will seach for pending modifications and merge it in the job queue and only add to the 2nd job the ones already was saved in the 1st job.
Dont forget this is at version 0.3.0 right now :) There are a lot of things I want to add in the future but time is very limited.

Thanks for your help
It could be implemented like this: the job queue could be an hashmap, with key/value mapping 'file/path' -> list of the operations for that file. The producer will append the operations for each file to the appropriate entry, the consumer will iterate over the set, applying the changes and removing the completed entries. Guayadeque may be just v0.3, but it rocks ;)