-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -c flag to count the track number in a 3digit wide playlist order #13
Conversation
Hi, thanks for your contribution! 1.) 2.)
|
… to preserve playlist order
Forgot this last night, but now that I think of it: |
a253bd5
to
0c481c6
Compare
My changes:
Works now with e.g.: Cool. ;-) The playlist numbering suffered from having too many on_playing_uri_changed() events. Strange. Therefore I put the playlist counter increasing into stop_blocking(). But even here I get sometimes very small files (10-30kB) and then spotrec starts again by a file that sometimes is already completely downloaded. Then the playlist counter jumps of course. I couldn't find the bug here this time, e.g. |
0c481c6
to
feb2324
Compare
This comment has been minimized.
This comment has been minimized.
I like the new implementation of the playlist track counter and the fact that if enabled it just replaces the existing trackNumber in the metadata/filename pattern, which is otherwise gotten from the album. Description of the command line option should be changed to reflect that. Also, what do you think about renaming it to "internal track counter" since it does exactly this? |
This comment has been minimized.
This comment has been minimized.
Thank you, looks good now! |
Found one problem left: the internal_track_counter increment happens too late. So for example the first two songs recorded are prefixed with "001". This is because stopping the recording does not happen immediately, it happens in this order:
For now I put the increment code here: Which is not optimal as it counts every track change (also the ones not recorded), but at least it reliably increments at time and puts the output files in order. |
|
Yes, because of getting triggered many times I put it in stop_blocking(). But you are right at least it counts up, I got really big jumps in the counter like e.g. 001 and the next was 016 etc. having it in on_playing_uri_changed(). Do you know why there are so many (irrelevant) track changes? When using dbus-monitor I can not see them. |
@thescooby Your changes are now released! :) FYI I made some more changes, for your feature: improved stability of the track counter (bdd1c2a) and added example in the command line option help text |
Wanted to have the following features:
This way the files are stored in the same order on disk as they are in the playlist.