Example #1
0
 public override void SetTrack(Banshee.Collection.TrackInfo track)
 {
     // Prevent the reloading of the context pane when we play a video
     if (!track.Uri.AbsoluteUri.Contains ("youtube.com")) {
         yt_videos.Query = track.TrackTitle + " by " + track.ArtistName;
     }
 }
Example #2
0
        public MuinsheeActions(Banshee.Playlist.PlaylistSource queue)
            : base("muinshee")
        {
            this.queue = queue;
            AddImportant (
                new ActionEntry (
                    "PlaySongAction", null,
                     Catalog.GetString ("Play _Song"), "S",
                     Catalog.GetString ("Add a song to the playlist"), OnPlaySong
                ),
                new ActionEntry (
                    "PlayAlbumAction", null,
                     Catalog.GetString ("Play _Album"), "A",
                     Catalog.GetString ("Add an album to the playlist"), OnPlayAlbum
                )
            );

            this["PlaySongAction"].IconName = "audio-x-generic";
            this["PlayAlbumAction"].IconName = "media-optical";

            // TODO disable certain actions
            // Actions.TrackActions.UpdateActions (false, false, "SearchMenu");

            AddUiFromFile ("GlobalUI.xml");
        }
Example #3
0
        static void Main()
        {
            Dictionary<string, int> locationDecoder;
            Banshee[] banshees;
            string[] separators = new string[] { " " };

            string communicationDistanceLine = Console.ReadLine();
            double communicationDistance = double.Parse(communicationDistanceLine);

            int codewordsCount = int.Parse(Console.ReadLine());

            locationDecoder = new Dictionary<string, int>(codewordsCount);
            for (int i = 0; i < codewordsCount; i++)
            {
                string codewordAndValueLine = Console.ReadLine();
                string[] codewordAndValue = codewordAndValueLine.Split(separators, StringSplitOptions.RemoveEmptyEntries);
                string codeword = codewordAndValue[0];
                int codewordValue = int.Parse(codewordAndValue[1]);
                locationDecoder.Add(codeword, codewordValue);
            }

            int bansheesCount = int.Parse(Console.ReadLine());
            banshees = new Banshee[bansheesCount];
            for (int i = 0; i < bansheesCount; i++)
            {
                string codedBansheeIDLine = Console.ReadLine();
                banshees[i] = Banshee.Parse(codedBansheeIDLine, locationDecoder, separators);
            }

            BansheeGraph bansheeGroups = new BansheeGraph(banshees, communicationDistance);

            Console.WriteLine(bansheeGroups.GetConnectedComponentsCount());
        }
Example #4
0
        public List <Build> ZergBuilds(Bot bot)
        {
            List <Build> options = new List <Build>();

            if (bot.EnemyRace == Race.Protoss)
            {
                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
            }
            else if (bot.EnemyRace == Race.Terran)
            {
                if (ProxyDetected.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Hellion.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    Banshee.Get().DetectedPreviously)
                {
                    options.Add(new Muukzor());
                    return(options);
                }
                if (BattlecruiserRush.Get().DetectedPreviously)
                {
                    options.Add(new MacroHydra());
                    return(options);
                }

                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
                options.Add(new Muukzor());
            }
            else if (bot.EnemyRace == Race.Zerg)
            {
                options.Add(new RoachRavager());
                options.Add(new MacroHydra());
                options.Add(new RushDefense());
            }
            else
            {
                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
                options.Add(new RushDefense());
            }

            return(options);
        }
Example #5
0
    public static Monster CreateMonster(MonsterList monster, Game game, int level)
    {
        Monster newMonster = null;

        switch (monster)
        {
        case MonsterList.Bat:
            newMonster          = Bat.Create(level, game);
            newMonster.Behavior = new StandardMoveAndAttack();
            break;

        case MonsterList.Banshee:
            newMonster          = Banshee.Create(level, game);
            newMonster.Behavior = new TeleportAroundPlayer();
            break;

        case MonsterList.Demon:
            newMonster          = Demon.Create(level, game);
            newMonster.Behavior = new StandardMoveAndAttack();
            break;

        case MonsterList.Doll:
            newMonster          = Doll.Create(level, game);
            newMonster.Behavior = new DontLookAway();
            break;

        case MonsterList.Ghoul:
            newMonster          = Ghoul.Create(level, game);
            newMonster.Behavior = new StandardMoveAndAttack();
            break;

        case MonsterList.LivingArmor:
            newMonster          = LivingArmor.Create(level, game);
            newMonster.Behavior = new DontLookAway();
            break;

        case MonsterList.Spider:
            newMonster          = Spider.Create(level, game);
            newMonster.Behavior = new StandardMoveAndAttack();
            break;

        case MonsterList.Wraith:
            newMonster          = Wraith.Create(level, game);
            newMonster.Behavior = new TeleportAroundPlayer();
            break;
        }

        newMonster.Health = newMonster.Health + (level - 1);
        newMonster.Attack = newMonster.Attack + (level - 1);

        return(newMonster);
    }
        public DatabaseTrackListModel (BansheeDbConnection connection, IDatabaseTrackModelProvider provider, Banshee.Sources.DatabaseSource source)
        {
            this.connection = connection;
            this.provider = provider;
            this.source = source;

            SelectAggregates = "SUM(CoreTracks.Duration), SUM(CoreTracks.FileSize)";

            Selection.Changed += delegate {
                if (SelectionAggregatesHandler != null) {
                    cache.UpdateSelectionAggregates (SelectionAggregatesHandler);
                }
            };
        }
        internal Activity(Contact c,  Banshee.Telepathy.API.Channels.ITube tube)
            : base(c, tube)
        {
            string service = tube.Service;
            Key = service;

            //            if (c.HasService (service)) {
            //                ContactService s = c.GetService (service);
            //                this.service = s;
            //            } else {
            //                throw new InvalidOperationException (String.Format ("Contact does not support service {0}",
            //                                                                    service));
            //            }

            this.tube = tube;
        }
Example #8
0
        protected override string GetSecondLineText(Banshee.Collection.TrackInfo track)
        {
            if (line_three_split == null) {
                line_three_split = new Regex (@"size=""small"">", RegexOptions.Compiled);
            }

            var text = base.GetSecondLineText (track);
            var splits = line_three_split.Split (text);
            string new_text = String.Empty;

            for (int i = 0; i < splits.Length; i++) {
                if (i == 2) {
                    new_text += "\n";
                }

                new_text += splits[i];

                if (i < 2) {
                    new_text += @"size=""small"">";
                }
            }

            return new_text;
        }
        public DatabaseTrackListModel(BansheeDbConnection connection, IDatabaseTrackModelProvider provider, Banshee.Sources.DatabaseSource source)
        {
            this.connection = connection;
            this.provider = provider;
            this.source = source;

            SelectAggregates = String.Format ("SUM({0}), SUM({1})",
                                              BansheeQuery.DurationField.Column, BansheeQuery.FileSizeField.Column);

            Selection.Changed += delegate {
                if (SelectionAggregatesHandler != null) {
                    cache.UpdateSelectionAggregates (SelectionAggregatesHandler);
                }
            };
        }
Example #10
0
 public override void SetTrack (Banshee.Collection.TrackInfo track)
 {
     if (view.SetArtist (track.ArtistName) && State != ContextState.Loaded) {
         State = ContextState.Loading;
     }
 }
 public bool SetSource(Banshee.Sources.ISource source)
 {
     if (source == null) {
         return false;
     } else {
         this.source = source as SongKickSource;
         return true;
     }
 }
Example #12
0
        public List <Build> ProtossBuilds(Bot bot)
        {
            List <Build> options = new List <Build>();

            if (Bot.Debug)
            {
                foreach (Strategy strategy in bot.EnemyStrategyAnalyzer.Strategies)
                {
                    if (strategy.DetectedPreviously)
                    {
                        System.Console.WriteLine("Detected previous strategy: " + strategy.Name());
                    }
                }
            }

            if (bot.EnemyRace == Race.Terran)
            {
                if (Marine.Get().DetectedPreviously &&
                    !Reaper.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    !SiegeTank.Get().DetectedPreviously &&
                    !Medivac.Get().DetectedPreviously &&
                    !Viking.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    !Battlecruiser.Get().DetectedPreviously &&
                    !WidowMine.Get().DetectedPreviously &&
                    !Hellion.Get().DetectedPreviously &&
                    !Thor.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously)
                {
                    // ValinMarineBot
                    options.Add(new NinjaTurtles());
                    return(options);
                }
                if (BattlecruiserRush.Get().DetectedPreviously &&
                    Thor.Get().DetectedPreviously &&
                    WidowMine.Get().DetectedPreviously)
                {
                    // BenBotBC
                    options.Add(new OneBaseStalkerImmortal());
                    return(options);
                }
                if (Battlecruiser.Get().DetectedPreviously &&
                    !BattlecruiserRush.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    !Reaper.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Medivac.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously)
                {
                    options.Add(new MassVoidray()
                    {
                        SkipDefenses = true
                    });
                    return(options);
                }

                /*
                 * if (ProxyDetected.Get().DetectedPreviously
                 *  && !Marauder.Get().DetectedPreviously
                 *  && Banshee.Get().DetectedPreviously)
                 * {
                 *  options.Add(new AntiMicro());
                 *  return options;
                 * }
                 */
                if (ProxyDetected.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    Banshee.Get().DetectedPreviously)
                {
                    // MicroMachine
                    options.Add(new AntiMicro()
                    {
                        HuntProxies = true, CounterProxyMarauder = false
                    });
                    //options.Add(new NinjaTurtles() { Expand = true });
                    //options.Add(new OneBaseTempest() { DefendingStalker = true });
                    return(options);
                }
                if (ProxyDetected.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Strelok
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, SendScout = true, MassTanksDetected = MassTank.Get().DetectedPreviously });
                    options.Add(new OneBaseStalkerImmortal()
                    {
                        UseSentry = true
                    });
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Raven.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    options.Add(new OneBaseStalkerImmortal());
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = false, ProxyPylon = false, DelayObserver = true, SendScout = false, MassTanksDetected = true });
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Jensiiibot
                    //options.Add(new PvTStalkerTempest());
                    //options.Add(new Builds.Protoss.WorkerRush() { CounterJensiii = true, BuildStalkers = true });
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, MassTanksDetected = MassTank.Get().DetectedPreviously, UseColosus = false });
                    options.Add(new PvTZealotImmortal());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Rusty
                    options.Add(new OneBaseStalkerImmortal());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    Thor.Get().DetectedPreviously &&
                    SiegeTank.Get().DetectedPreviously &&
                    MassTank.Get().DetectedPreviously &&
                    Hellbat.Get().DetectedPreviously)
                {
                    // MechSweep
                    options.Add(new OneBaseTempest()
                    {
                        RequiredSize = 3
                    });
                    return(options);
                }

                options.Add(new PvTStalkerImmortal()
                {
                    BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, MassTanksDetected = MassTank.Get().DetectedPreviously, UseColosus = false
                });
            }
            else if (bot.EnemyRace == Race.Zerg)
            {
                if (Bot.Main.OpponentID == "eed44128-f488-4e31-b457-8e55f8a95628")
                {
                    options.Add(new PvZHjax()
                    {
                        CounterRoaches = false, DefendNydus = false
                    });
                    return(options);
                }
                options.Add(new PvZHjax());
                return(options);

                /*
                 * if (Lurker.Get().DetectedPreviously)
                 * {
                 *  //Kagamine
                 *  //options.Add(new PvZAdeptIntoVoidray());
                 *  //options.Add(new WorkerRush());
                 *  options.Add(new PvZHjax());
                 *  return options;
                 * }
                 * if (Mutalisk.Get().DetectedPreviously
                 *  && !Lurker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseStalkerImmortal() { StartZealots = true });
                 *  return options;
                 * }
                 * if (Hydralisk.Get().DetectedPreviously && StrategyAnalysis.ZerglingRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  return options;
                 * }
                 * if (RoachRush.Get().DetectedPreviously || StrategyAnalysis.ZerglingRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new PvZRushDefense());
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Roach.Get().DetectedPreviously
                 *  && Zergling.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new PvZRushDefense());
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Queen.Get().DetectedPreviously
                 *  && Zergling.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && !Roach.Get().DetectedPreviously)
                 * {
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (bot.PreviousEnemyStrategies.MassHydra
                 *  && MassRoach.Get().DetectedPreviously
                 *  && !Lurker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Zergling.Get().DetectedPreviously
                 *  && !Roach.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && !Queen.Get().DetectedPreviously
                 *  && !Mutalisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Zergling.Get().DetectedPreviously
                 *  && Roach.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && Queen.Get().DetectedPreviously
                 *  && !Mutalisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * options.Add(new OneBaseStalkerImmortal() { StartZealots = true });
                 */
            }
            else if (bot.EnemyRace == Race.Protoss)
            {
                if (Zealot.Get().DetectedPreviously &&
                    VoidRay.Get().DetectedPreviously &&
                    !Carrier.Get().DetectedPreviously &&
                    !Tempest.Get().DetectedPreviously &&
                    !Stalker.Get().DetectedPreviously &&
                    !Adept.Get().DetectedPreviously &&
                    !Immortal.Get().DetectedPreviously &&
                    !StrategyAnalysis.CannonRush.Get().DetectedPreviously)
                {
                    // MavBot3
                    options.Add(new ZealotRush());
                    return(options);
                }
                if (SkippedNatural.Get().DetectedPreviously &&
                    !AdeptHarass.Get().DetectedPreviously &&
                    VoidRay.Get().DetectedPreviously &&
                    Immortal.Get().DetectedPreviously)
                {
                    // AdditionalPylons
                    options.Add(new DoubleRoboProxy());
                    return(options);
                }
                if (Oracle.Get().DetectedPreviously &&
                    ThreeGate.Get().DetectedPreviously &&
                    Zealot.Get().DetectedPreviously &&
                    !Stalker.Get().DetectedPreviously &&
                    !VoidRay.Get().DetectedPreviously &&
                    !Immortal.Get().DetectedPreviously)
                {
                    // LuckyBot
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                if (Carrier.Get().DetectedPreviously &&
                    Collosus.Get().DetectedPreviously &&
                    SkyToss.Get().DetectedPreviously &&
                    Tempest.Get().DetectedPreviously &&
                    !Archon.Get().DetectedPreviously &&
                    !HighTemplar.Get().DetectedPreviously)
                {
                    // TheGoldenArmada
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                options.Add(new OneBaseStalkerImmortal()
                {
                    DoubleRobo = true, EarlySentry = true, AggressiveMicro = true
                });
                return(options);

                /*
                 * if (AdeptHarass.Get().DetectedPreviously
                 *  && SkyToss.Get().DetectedPreviously
                 *  && Carrier.Get().DetectedPreviously
                 *  && HighTemplar.Get().DetectedPreviously
                 *  && VoidRay.Get().DetectedPreviously
                 *  && !StrategyAnalysis.CannonRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  options.Add(new OneBaseStalkerImmortal());
                 *  return options;
                 * }
                 * if (AdeptHarass.Get().DetectedPreviously)
                 * {
                 *  // SharpenedEdge
                 *  options.Add(new OneBaseTempest());
                 *  options.Add(new Dishwasher());
                 *  return options;
                 * }
                 * if (StrategyAnalysis.CannonRush.Get().DetectedPreviously
                 *  && Tempest.Get().DetectedPreviously)
                 * {
                 *  // ThreeWayLover
                 *  //options.Add(new MassVoidray() { SkipDefenses = true });
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (Sentry.Get().DetectedPreviously
                 *  && Archon.Get().DetectedPreviously
                 *  && !Stalker.Get().DetectedPreviously
                 *  && !Zealot.Get().DetectedPreviously)
                 * {
                 *  options.Add(new TempestProxy());
                 *  return options;
                 * }
                 * if (Zealot.Get().DetectedPreviously
                 *  && StrategyAnalysis.CannonRush.Get().DetectedPreviously
                 *  && Oracle.Get().DetectedPreviously
                 *  && Phoenix.Get().DetectedPreviously
                 *  && Stalker.Get().DetectedPreviously
                 *  && !Immortal.Get().DetectedPreviously)
                 * {
                 *  //Gumby
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Oracle.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Stalker.Get().DetectedPreviously
                 *  && !Zealot.Get().DetectedPreviously
                 *  && !Sentry.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  return options;
                 * }
                 * if (Zealot.Get().DetectedPreviously
                 *  && !Stalker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 *
                 * options.Add(new NinjaTurtles());
                 * options.Add(new PvPMothershipSiege());
                 */
            }

            return(options);
        }
Example #13
0
 private void OnPlayerEvent(Banshee.MediaEngine.PlayerEventArgs args)
 {
     // TODO: check if we can assign last_track before returning the track inside GetRandom(), to avoid subscribing
     //       to an event (if yes, the field should probably be renamed to last_random_track)
     last_track = ServiceManager.PlayerEngine.CurrentTrack;
 }
Example #14
0
 private void OnPlayerEvent (Banshee.MediaEngine.PlayerEventArgs args)
 {
     last_track = ServiceManager.PlayerEngine.CurrentTrack;
 }
 // ---- Player Event Handlers ----
 private void OnPlayerEngineStateChanged(object o, Banshee.MediaEngine.PlayerEngineStateArgs args)
 {
     switch(args.State) {
         case PlayerEngineState.Loaded:
             seek_slider.Duration = PlayerEngineCore.CurrentTrack.Duration.TotalSeconds;
             UpdateMetaDisplay();
             break;
         case PlayerEngineState.Idle:
             seek_slider.SetIdle();
             InfoBox.Visible = false;
             UpdateMetaDisplay();
             break;
     }
 }
 public override void SetTrack(Banshee.Collection.TrackInfo track)
 {
     pane.Track = track;
 }
 public override void SetTrack(Banshee.Collection.TrackInfo track)
 {
     lyrics_pane.UpdateLabel (track.DisplayTrackTitle);
 }
Example #18
0
            public BansheeGraph(Banshee[] banshees, double communicationDistance)
            {
                this.banshees = new Banshee[banshees.Length];
                Array.Copy(banshees, this.banshees, banshees.Length);
                this.maxConnectionDistance = communicationDistance;

                this.bansheeNeighbours = new List<int>[banshees.Length];
                for (int bansheeInd = 0; bansheeInd < this.bansheeNeighbours.Length; bansheeInd++)
                {
                    this.bansheeNeighbours[bansheeInd] = new List<int>();
                }

                BuildGraph();
            }
Example #19
0
        private void bunifuImageButton12_Click(object sender, EventArgs e)
        {
            Banshee popup = new Banshee();

            popup.Show();
        }
 private bool OnTrackIntercept (Banshee.Collection.TrackInfo track)
 {
     transitioning = true;
     return false;
 }
Example #21
0
 public override void SetTrack(Banshee.Collection.TrackInfo track)
 {
     recs.Artist = track.ArtistName;
 }
 private void OnUpdateActions(Banshee.Sources.Source source)
 {
     UpdateAction ("PurchasedMusicImportAction", source is IPurchasedMusicSource);
 }
 public DatabaseTrackListModel (BansheeDbConnection connection, IDatabaseTrackModelProvider provider, Banshee.Sources.DatabaseSource source)
 {
     this.connection = connection;
     this.provider = provider;
     this.source = source;
 }
Example #24
0
 public bool SetSource(Banshee.Sources.ISource source)
 {
     return this.source == source;
 }
 private void OnNetworkStateChanged(object o, Banshee.Networking.NetworkStateChangedArgs args)
 {
     if (!args.Connected && job != null) {
         network_failed = true;
         job.Dispose ();
     } else {
         network_failed = false;
         FetchArtistImages ();
     }
 }