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

Post Reply
mekanix
Posts: 210
Joined: Wed Sep 29, 2010 11:20 pm

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

Post by mekanix » Wed Apr 27, 2011 10:19 pm

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.

User avatar
anonbeat
Posts: 1960
Joined: Thu Sep 16, 2010 9:47 pm

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

Post by anonbeat » Wed Apr 27, 2011 10:48 pm

The problem is when a track gets modified while its waiting for a tag change for example.

mekanix
Posts: 210
Joined: Wed Sep 29, 2010 11:20 pm

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

Post by mekanix » Wed Apr 27, 2011 11:49 pm

mh... sorry, but I don't understand what you mean

User avatar
anonbeat
Posts: 1960
Joined: Thu Sep 16, 2010 9:47 pm

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

Post by anonbeat » Thu Apr 28, 2011 12:31 am

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.

mekanix
Posts: 210
Joined: Wed Sep 29, 2010 11:20 pm

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

Post by mekanix » Thu Apr 28, 2011 1:20 am

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)?

lordofthelake
Posts: 2
Joined: Thu Apr 28, 2011 12:06 pm

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

Post by lordofthelake » Thu Apr 28, 2011 12:12 pm

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)

User avatar
anonbeat
Posts: 1960
Joined: Thu Sep 16, 2010 9:47 pm

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

Post by anonbeat » Thu Apr 28, 2011 1:03 pm

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

mekanix
Posts: 210
Joined: Wed Sep 29, 2010 11:20 pm

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

Post by mekanix » Thu Apr 28, 2011 10:02 pm

:D Ok I definitely support these ideas!

lordofthelake
Posts: 2
Joined: Thu Apr 28, 2011 12:06 pm

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

Post by lordofthelake » Sat Apr 30, 2011 7:51 am

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 ;)

Post Reply