banshee r4594 - in trunk/banshee: . src/Backends/Banshee.GStreamer/Banshee.GStreamer src/Extensions/Banshee.AudioCd/Banshee.AudioCd
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4594 - in trunk/banshee: . src/Backends/Banshee.GStreamer/Banshee.GStreamer src/Extensions/Banshee.AudioCd/Banshee.AudioCd
- Date: Tue, 23 Sep 2008 19:48:25 +0000 (UTC)
Author: abock
Date: Tue Sep 23 19:48:25 2008
New Revision: 4594
URL: http://svn.gnome.org/viewvc/banshee?rev=4594&view=rev
Log:
2008-09-23 Aaron Bockover <abock gnome org>
* src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs:
Add a method for raising the reloaded event, NotifyUpdated
* src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs:
Call NotifyUpdated on the model, not OnUpdated on the source; fixes the
redrawing when locking/unlocking tracks for playback during the rip
* src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs: Do not
show the rip speed factor (e.g. 15x) until it has settled to an appropriate
value, somewhere between 1x and 200x
* src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs: Load
either the Vorbis or FLAC audio profiles if there is no configured rip
profile and set the active profile in this case; this fixes the bug where
ripping a CD is not possible unless the user first chooses/changes the
ripping profile in the preferences dialog (BGO #528621)
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs
trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs
trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs
trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs
Modified: trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs
==============================================================================
--- trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs (original)
+++ trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs Tue Sep 23 19:48:25 2008
@@ -60,17 +60,30 @@
public void Begin (string device, bool enableErrorCorrection)
{
try {
+ Profile profile = null;
ProfileConfiguration config = ServiceManager.MediaProfileManager.GetActiveProfileConfiguration ("cd-importing");
+
if (config != null) {
- encoder_pipeline = config.Profile.Pipeline.GetProcessById ("gstreamer");
- output_extension = config.Profile.OutputFileExtension;
+ profile = config.Profile;
+ } else {
+ profile = ServiceManager.MediaProfileManager.GetProfileForMimeType ("audio/vorbis")
+ ?? ServiceManager.MediaProfileManager.GetProfileForMimeType ("audio/flac");
+ if (profile != null) {
+ Log.InformationFormat ("Using default/fallback encoding profile: {0}", profile.Name);
+ ProfileConfiguration.SaveActiveProfile (profile, "cd-importing");
+ }
+ }
+
+ if (profile != null) {
+ encoder_pipeline = profile.Pipeline.GetProcessById ("gstreamer");
+ output_extension = profile.OutputFileExtension;
}
if (String.IsNullOrEmpty (encoder_pipeline)) {
throw new ApplicationException ();
}
- Hyena.Log.InformationFormat ("Ripping using encoder profile `{0}' with pipeline: {1}", config.Profile.Name, encoder_pipeline);
+ Hyena.Log.InformationFormat ("Ripping using encoder profile `{0}' with pipeline: {1}", profile.Name, encoder_pipeline);
} catch (Exception e) {
throw new ApplicationException (Catalog.GetString ("Could not find an encoder for ripping."), e);
}
Modified: trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs Tue Sep 23 19:48:25 2008
@@ -76,6 +76,11 @@
disc_title = Catalog.GetString ("Audio CD");
}
+ public void NotifyUpdated ()
+ {
+ OnReloaded ();
+ }
+
public void LoadModelFromDisc ()
{
Clear ();
Modified: trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs Tue Sep 23 19:48:25 2008
@@ -229,8 +229,10 @@
last_speed_poll_factor = factor > 1 ? factor : 0;
}
- user_job.Status = last_speed_poll_factor > 1 ? String.Format ("{0} ({1:0.0}x)",
- status, last_speed_poll_factor) : status;
+ // Make sure the speed factor is between 1 and 200 to allow it to ramp and settle
+ user_job.Status = last_speed_poll_factor > 1 && last_speed_poll_factor <= 200
+ ? String.Format ("{0} ({1:0.0}x)", status, last_speed_poll_factor)
+ : status;
}
private void OnError (object o, AudioCdRipperErrorArgs args)
Modified: trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdSource.cs Tue Sep 23 19:48:25 2008
@@ -239,7 +239,7 @@
track.CanPlay = false;
}
- OnUpdated ();
+ disc_model.NotifyUpdated ();
}
internal void UnlockAllTracks ()
@@ -248,13 +248,13 @@
track.CanPlay = true;
}
- OnUpdated ();
+ disc_model.NotifyUpdated ();
}
internal void UnlockTrack (AudioCdTrackInfo track)
{
track.CanPlay = true;
- OnUpdated ();
+ disc_model.NotifyUpdated ();
}
#region Source Overrides
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]