public void Duplicate(IDiscVolume disc) { if (!RunBrasero (disc.DeviceNode) && !RunNcb (disc.DeviceNode)) { throw new ApplicationException (Catalog.GetString ( "Neither Brasero nor Nautilus CD Burner could be found to duplicate this disc.")); } }
public AudioCdDiscModel (IDiscVolume volume) { this.volume = volume; disc_title = Catalog.GetString ("Audio CD"); MusicBrainzService.UserAgent = Banshee.Web.Browser.UserAgent; }
public AudioCdDiscModel(IDiscVolume volume) : base(volume) { disc_title = Catalog.GetString("Audio CD"); MusicBrainzService.UserAgent = Banshee.Web.Browser.UserAgent; }
public void Duplicate(IDiscVolume disc) { if (!RunBrasero(disc.DeviceNode) && !RunNcb(disc.DeviceNode)) { throw new ApplicationException(Catalog.GetString( "Neither Brasero nor Nautilus CD Burner could be found to duplicate this disc.")); } }
protected override DiscSource GetDiscSource(IDiscVolume volume) { if (volume.HasVideo) { Log.Debug("Mapping dvd"); return(new DvdSource(this, new DvdModel(volume))); } else { Log.Debug("Can not map to dvd source."); return(null); } }
protected override DiscSource GetDiscSource(IDiscVolume volume) { if (volume.HasAudio) { Log.Debug("Mapping audio cd"); return(new AudioCdSource(this, new AudioCdDiscModel(volume))); } else { Log.Debug("Can not map to audio cd source."); return(null); } }
protected virtual void MapDiscVolume(IDiscVolume volume) { DiscSource source = null; lock (this) { if (Sources.ContainsKey(volume.Uuid)) { Log.Debug("Already mapped"); return; } source = GetDiscSource(volume); if (source == null) { return; } Sources.Add(volume.Uuid, source); ServiceManager.SourceManager.AddSource(source); // If there are any queued device commands, see if they are to be // handled by this new volume (e.g. --device-activate-play=cdda://sr0/) try { if (unhandled_device_commands != null) { foreach (DeviceCommand command in unhandled_device_commands) { if (DeviceCommandMatchesSource(source, command)) { HandleDeviceCommand(source, command.Action); unhandled_device_commands.Remove(command); if (unhandled_device_commands.Count == 0) { unhandled_device_commands = null; } break; } } } } catch (Exception e) { Log.Exception(e); } Log.DebugFormat("Mapping disc ({0})", volume.Uuid); } }
private void MapDiscVolume(IDiscVolume volume) { lock (this) { if (!sources.ContainsKey(volume.Uuid) && volume.HasAudio) { AudioCdSource source = new AudioCdSource(this, new AudioCdDiscModel(volume)); sources.Add(volume.Uuid, source); ServiceManager.SourceManager.AddSource(source); // If there are any queued device commands, see if they are to be // handled by this new volume (e.g. --device-activate-play=cdda://sr0/) try { if (unhandled_device_commands != null) { foreach (DeviceCommand command in unhandled_device_commands) { if (DeviceCommandMatchesSource(source, command)) { HandleDeviceCommand(source, command.Action); unhandled_device_commands.Remove(command); if (unhandled_device_commands.Count == 0) { unhandled_device_commands = null; } break; } } } } catch (Exception e) { Log.Exception(e); } Log.DebugFormat("Mapping audio CD ({0})", volume.Uuid); } } }
public DvdModel(IDiscVolume volume) : base(volume) { }
protected override DiscSource GetDiscSource(IDiscVolume volume) { if (volume.HasVideo) { Log.Debug ("Mapping dvd"); return new DvdSource (this, new DvdModel (volume)); } else { Log.Debug ("Can not map to dvd source."); return null; } }
protected virtual void MapDiscVolume(IDiscVolume volume) { DiscSource source = null; lock (this) { if (Sources.ContainsKey (volume.Uuid)) { Log.Debug ("Already mapped"); return; } source = GetDiscSource (volume); if (source == null) return; Sources.Add (volume.Uuid, source); ServiceManager.SourceManager.AddSource (source); // If there are any queued device commands, see if they are to be // handled by this new volume (e.g. --device-activate-play=cdda://sr0/) try { if (unhandled_device_commands != null) { foreach (DeviceCommand command in unhandled_device_commands) { if (DeviceCommandMatchesSource (source, command)) { HandleDeviceCommand (source, command.Action); unhandled_device_commands.Remove (command); if (unhandled_device_commands.Count == 0) { unhandled_device_commands = null; } break; } } } } catch (Exception e) { Log.Error (e); } Log.DebugFormat ("Mapping disc ({0})", volume.Uuid); } }
protected abstract DiscSource GetDiscSource(IDiscVolume volume);
protected override DiscSource GetDiscSource(IDiscVolume volume) { if (volume.HasAudio) { Log.Debug ("Mapping audio cd"); return new AudioCdSource (this, new AudioCdDiscModel (volume)); } else { Log.Debug ("Can not map to audio cd source."); return null; } }
public AudioCdDiscModel (IDiscVolume volume) { this.volume = volume; disc_title = Catalog.GetString ("Audio CD"); }
public AudioCdDiscModel(IDiscVolume volume) { this.volume = volume; disc_title = Catalog.GetString("Audio CD"); }
public DiscModel(IDiscVolume volume) { Volume = volume; }
private void MapDiscVolume (IDiscVolume volume) { lock (this) { if (!sources.ContainsKey (volume.Uuid) && volume.HasAudio) { AudioCdSource source = new AudioCdSource (this, new AudioCdDiscModel (volume)); sources.Add (volume.Uuid, source); ServiceManager.SourceManager.AddSource (source); // If there are any queued device commands, see if they are to be // handled by this new volume (e.g. --device-activate-play=cdda://sr0/) try { if (unhandled_device_commands != null) { foreach (DeviceCommand command in unhandled_device_commands) { if (DeviceCommandMatchesSource (source, command)) { HandleDeviceCommand (source, command.Action); unhandled_device_commands.Remove (command); if (unhandled_device_commands.Count == 0) { unhandled_device_commands = null; } break; } } } } catch (Exception e) { Log.Exception (e); } Log.DebugFormat ("Mapping audio CD ({0})", volume.Uuid); } } }