GNOME Bugzilla – Bug 161315
should display track length, not file size, in overwrite dialog
Last modified: 2008-04-17 09:12:27 UTC
Currently, when asking if you want to overwrite a file with the same name, s-j gives you the file length, which unless it is very close to zero, isn't very useful. It would be nice if instead s-j queried the file and figured out the length of the track, giving that instead. Ideally it could even compare it to the length of the track on the CD :) I find I'm seeing the dialog a lot because of crashes/corrupt files, so this would help me figure out if I'm being prompted to overwrite a 'whole' file, or if I'm being prompted to overwrite a shortened/corrupted file.
I'm working on this.
Created attachment 106201 [details] sj-skip-overwrite-mockup.png I was working on this bug too, but I stop here, so you can go on. I'm attaching a mockup and tomorrow I will add the source code of the player widget I'm writing (I don't have the tarball here with me).
Hem, a typo in the image. "exixts" should be "exist" :)
Please don't stop working on this because I started. That looks very nice. I'll just find another bug. :)
Created attachment 106250 [details] egg-play-preview.tar.bz2 This is an alpha version of the widget in the mockup.
Ooh, cute!
Created attachment 107105 [details] egg-play-preview.tar.bz2 The widget is almost here (with some changes in the UI). I still have to add seeking capabilities and a timer to keep track of the time elapsing, plus the usual code clean-up and needed credits (I gave more than a look to Brasero, gakuraku and gst-player). However, I still have a problem: gst_element_query_duration always returns FALSE. I have found a very nice tutorial about gst programming and I'll try to solve the problem in the next few days, but any help will be much, much apreciated :) If you wish to test the widget remember to edit egg-play-preview-test.c and replace my URI with one pointing to one of your audio files.
Sweet, thanks for this.
Created attachment 107134 [details] Screenshot-egg-play-preview-test.png Thanks to Matthew Martin the query duration problem is now gone :)
Very nice. When you think its ready, I'll give it a go.
Created attachment 107177 [details] egg-play-preview.tar.bz2 The widget is now complete (still need some code cleanup). This is my first try with gstreamer, so comments and suggestions are even more appreciated than usual. In the next few days I will prepare a patch to add a dialog similar to the mockup attached to comment #2.
Created attachment 107325 [details] [review] sj-play-preview.patch First of all a big warning: With latest upgrade of my Ubuntu Hardy all gstreamer/audio related applications segfault when try to play something. This is my only PC, so I can't test the patch (the widget itself was already tested). As already reported this is my first gstreamer work, so double check the patch if you want to commit it :)
Created attachment 107758 [details] [review] sj-play-preview-2.patch Today Ubuntu upgraded gstreamer package and now all sound related applications work again, so I could test the patch and fix a little bug. > Very nice. When you think its ready, I'll give it a go. Ross, I think it is now ready for a first ride :)
Created attachment 107759 [details] sound-juicer-skip-overwrite.png Play preview widget live action! What do you think about final dialog layout?
I forgot to add src/egg-play-preview.c to po/POTFILES. I will add it when I'll update the patch next time.
Luca, I've just committed this. One problem remains though, when I tried skipping to near the end of the song it wouldn't play any more. This is probably because I'm writing VBR files with broken duration headers, thanks to a gnome-profiles bug, but if you could have a quick look that would be great.
thanks Ross :) Sure, I will give a look at the issue. Can you send me the gstreamer pipeline, so I can create a new audio profile entry similar to yours? Does playing those VBR files in a real media player like totem give you the same problem?
Yes, I'm seeing garbage duration headers everywhere with the standard MP3 pipeline in GNOME. I've just tried adding xingmux to the pipeline which apparently helps, I'll try later. That said, the widget should let me seek past the end and then back to the beginning, at the moment once I seek past the end I can't play it any more.