Beispiel #1
0
 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;
        }
Beispiel #3
0
        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."));
     }
 }
Beispiel #5
0
 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);
     }
 }
Beispiel #6
0
 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);
     }
 }
Beispiel #7
0
        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);
            }
        }
Beispiel #8
0
        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);
                }
            }
        }
Beispiel #9
0
 public DvdModel(IDiscVolume volume) : base(volume)
 {
 }
Beispiel #10
0
 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;
     }
 }
Beispiel #11
0
        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);
            }
        }
Beispiel #12
0
 protected abstract DiscSource GetDiscSource(IDiscVolume volume);
Beispiel #13
0
 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");
 }
Beispiel #15
0
 public AudioCdDiscModel(IDiscVolume volume)
 {
     this.volume = volume;
     disc_title  = Catalog.GetString("Audio CD");
 }
Beispiel #16
0
 protected abstract DiscSource GetDiscSource(IDiscVolume volume);
Beispiel #17
0
 public DiscModel(IDiscVolume volume)
 {
     Volume = volume;
 }
Beispiel #18
0
        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);
                }
            }
        }
Beispiel #19
0
 public DiscModel(IDiscVolume volume)
 {
     Volume = volume;
 }