EventGhost/EventGhost

View on GitHub
plugins/MediaMonkey/__init__.py

Summary

Maintainability
F
1 mo
Test Coverage

File __init__.py has 4015 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
#
# plugins/MediaMonkey/__init__.py
#
# Copyright (C)  2009-2011 Pako  <lubos.ruckl@quick.cz>
Severity: Major
Found in plugins/MediaMonkey/__init__.py - About 1 wk to fix

    Function Configure has a Cognitive Complexity of 166 (exceeds 5 allowed). Consider refactoring.
    Open

        def Configure(
            self,
            plName="",
            mode=0,
            listRules=[[-1,-1,u""]],
    Severity: Minor
    Found in plugins/MediaMonkey/__init__.py - About 3 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function LoadFilterPlaylist has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
    Open

        def LoadFilterPlaylist(
            self,
            plName,
            mode,
            listRules,
    Severity: Minor
    Found in plugins/MediaMonkey/__init__.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function LoadPlaylist has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

        def LoadPlaylist(self,sql,repeat,crossfade,shuffle,clear,Total,plName):
            MyTracks = self.MM.Database.QuerySongs(sql)
            tmpSongList = self.MM.NewSongList
            n=0
            while not MyTracks.EOF:
    Severity: Minor
    Found in plugins/MediaMonkey/__init__.py - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function Jubox has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
    Open

        def Jubox(self,ID,clear,repeat,shuffle,crossfade,stop):
            if self.isRunning():
                sql = 'IDAlbum="%s"' % ID
                Total=self.MM.Database.OpenSQL("SELECT COUNT(*) FROM Songs WHERE "+sql).ValueByIndex(0)
                tmpSongList = self.MM.NewSongList
    Severity: Minor
    Found in plugins/MediaMonkey/__init__.py - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function Configure has 108 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def Configure(
            self,
            plName="",
            mode=0,
            listRules=[[-1,-1,u""]],
    Severity: Major
    Found in plugins/MediaMonkey/__init__.py - About 4 hrs to fix

      Function RemoveSongFromPlaylist has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          def RemoveSongFromPlaylist(self, plString, skip, now_pl):
              if self.isRunning():
                  Player = self.MM.Player
                  idSong=Player.CurrentSong.ID
                  IDPlaylist=self.MM.PlaylistByTitle(plString).ID
      Severity: Minor
      Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function GetSongData has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
      Open

          def GetSongData(self,index):
              if self.isRunning():
                  repeat = self.MM.Player.isRepeat
                  SongDataDict = dict([(item[2],None) for item in SONG_TABLE_FIELDS if item[2] != ""])
                  curIndx = self.MM.Player.CurrentSongIndex
      Severity: Minor
      Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function __call__ has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
      Open

          def __call__(self, arrayInfo, sep = '', res = True):
              shuffle = self.plugin.GetValue('isShuffle')
              if not shuffle or self.value == 0:
                  try:
                      SongData, ix = self.plugin.GetSongData(self.value)
      Severity: Minor
      Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      EventHandler has 28 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class EventHandler:
      
          def GetSongInfo(self):
              currSong = self.MM.Player.CurrentSong
              sql = ' FROM Covers WHERE IDSong="%i"' % currSong.ID
      Severity: Minor
      Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

        Function Configure has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def Configure(
                self,
                arrayInfo=[False]*17,
                sep='',
                res = True
        Severity: Major
        Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

          Function LoadPlaylistByTitle has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
          Open

              def LoadPlaylistByTitle(self, plString,repeat,shuffle,crossfade,clear):
                  if self.isRunning():
                      plItems = self.MM.PlaylistByTitle(plString).Tracks
                      Total = plItems.Count
                      if Total > 0:
          Severity: Minor
          Found in plugins/MediaMonkey/__init__.py - About 3 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          MediaMonkeyWorkerThread has 25 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class MediaMonkeyWorkerThread(eg.ThreadWorker):
              """
              Handles the COM interface in a thread of its own.
              """
              def Setup(self, plugin, events = False):
          Severity: Minor
          Found in plugins/MediaMonkey/__init__.py - About 2 hrs to fix

            Cyclomatic complexity is too high in method LoadFilterPlaylist. (26)
            Open

            
                def LoadFilterPlaylist(
                    self,
                    plName,
                    mode,
            Severity: Minor
            Found in plugins/MediaMonkey/__init__.py by radon

            Cyclomatic Complexity

            Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

            Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

            Construct Effect on CC Reasoning
            if +1 An if statement is a single decision.
            elif +1 The elif statement adds another decision.
            else +0 The else statement does not cause a new decision. The decision is at the if.
            for +1 There is a decision at the start of the loop.
            while +1 There is a decision at the while statement.
            except +1 Each except branch adds a new conditional path of execution.
            finally +0 The finally block is unconditionally executed.
            with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
            assert +1 The assert statement internally roughly equals a conditional statement.
            Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
            Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

            Source: http://radon.readthedocs.org/en/latest/intro.html

            Function Configure has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def Configure(
                    self,
                    arrayInfo=[False]*10,
                    sep='',
                    res = True
            Severity: Major
            Found in plugins/MediaMonkey/__init__.py - About 2 hrs to fix

              Function GetPlaylists has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  def GetPlaylists(self,flag1 = True, flag2 = True):
                      if self.isRunning():
                          sql = 'SELECT PlaylistName FROM Playlists'
                          if flag1 or flag2:
                              sql += ' WHERE '
              Severity: Minor
              Found in plugins/MediaMonkey/__init__.py - About 2 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function Configure has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def Configure(
                      self,
                      arrayInfo=[False]*9,
                      sep='',
                      res = True
              Severity: Major
              Found in plugins/MediaMonkey/__init__.py - About 2 hrs to fix

                Function Configure has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def Configure(
                        self,
                        arrayInfo=[False]*9,
                        sep='',
                        res = True
                Severity: Major
                Found in plugins/MediaMonkey/__init__.py - About 2 hrs to fix

                  Function LoadFilterPlaylist has 16 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def LoadFilterPlaylist(
                  Severity: Major
                  Found in plugins/MediaMonkey/__init__.py - About 2 hrs to fix

                    Function __init__ has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def __init__(self):
                            group = self.AddGroup(
                                self.text.mainGrpName,
                                self.text.mainGrpDescr
                            )
                    Severity: Minor
                    Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                      Function onDeleteButton has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def onDeleteButton(self, evt):
                              item = self.itemListCtrl.GetFirstSelected()
                              tmpList=[]
                              while item != -1:
                                  ID = self.itemListCtrl.GetItemText(item)
                      Severity: Minor
                      Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function SongJubox has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def SongJubox(self,ID,clear,stop):
                              if self.isRunning():
                                  sql = 'ID="%s"' % ID
                                  res = None
                                  Total=self.MM.Database.OpenSQL("SELECT COUNT(*) FROM Songs WHERE "+sql).ValueByIndex(0)
                      Severity: Minor
                      Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function Configure has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def Configure(
                              self,
                              plName="",
                              query="",
                              repeat=2,
                      Severity: Minor
                      Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                        Function ShowJukeboxFrame has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def ShowJukeboxFrame(
                                self,
                                case,
                                clear,
                                filePath,
                        Severity: Minor
                        Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                          Function ShowUnaccessibleTracksFrame has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def ShowUnaccessibleTracksFrame(
                                  self,
                                  filePath,
                                  mode=True
                              ):
                          Severity: Minor
                          Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                            Function __call__ has 13 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __call__(
                            Severity: Major
                            Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                              Function Configure has 13 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def Configure(
                              Severity: Major
                              Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                Function Configure has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def Configure(self,repeat=2,shuffle=2,crossfade=2,clear = True, filePath='', stop = True):
                                        txt = self.text
                                        self.filePath = filePath
                                        panel = eg.ConfigPanel(self)
                                        label1Text = wx.StaticText(panel, -1, self.text.label1)
                                Severity: Minor
                                Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                  Function ExportAlbumList has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def ExportAlbumList(self,filePath):
                                          if self.isRunning():
                                              count = 0
                                              try:
                                                  albums=self.MM.Database.OpenSQL("SELECT ID,Artist,Album FROM Albums")
                                  Severity: Minor
                                  Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function AddSongToPlaylist has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def AddSongToPlaylist(self, plString, skip):
                                          if self.isRunning():
                                              idSong=self.MM.Player.CurrentSong.ID
                                              IDPlaylist=self.MM.PlaylistByTitle(plString).ID
                                              if IDPlaylist <> 0:
                                  Severity: Minor
                                  Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function RemoveSongFromNowPlaying has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def RemoveSongFromNowPlaying(self, skip):
                                          if self.isRunning():
                                              Player = self.MM.Player
                                              res = 1
                                              idSong=Player.CurrentSong.ID
                                  Severity: Minor
                                  Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function Configure has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      def Configure(self,clear=False,filePath='',stop = True):
                                          self.filePath = filePath
                                          txt = self.text
                                          panel = eg.ConfigPanel(self)
                                          label1Text = wx.StaticText(panel, -1, self.text.label1)
                                  Severity: Minor
                                  Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                    Function ExportSongList has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def ExportSongList(self,filePath):
                                            if self.isRunning():
                                                count = 0
                                                try:
                                                    songs=self.MM.Database.QuerySongs("")
                                    Severity: Minor
                                    Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function ShowJukeboxFrame has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def ShowJukeboxFrame(
                                    Severity: Major
                                    Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                      Function LoadPlaylist has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def LoadPlaylist(self,sql,repeat,crossfade,shuffle,clear,Total,plName):
                                      Severity: Major
                                      Found in plugins/MediaMonkey/__init__.py - About 1 hr to fix

                                        Function __init__ has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            def __init__(self):
                                                group = self.AddGroup(
                                                    self.text.mainGrpName,
                                                    self.text.mainGrpDescr
                                                )
                                        Severity: Minor
                                        Found in plugins/MediaMonkey/__init__.py - About 55 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Function Configure has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            def Configure(
                                                self,
                                                i=-1,
                                                arrayValue0=[
                                                    "",
                                        Severity: Minor
                                        Found in plugins/MediaMonkey/__init__.py - About 55 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Function Jubox has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            def Jubox(self,ID,clear,repeat,shuffle,crossfade,stop):
                                        Severity: Major
                                        Found in plugins/MediaMonkey/__init__.py - About 50 mins to fix

                                          Function LoadSqlPlaylist has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                              def LoadSqlPlaylist(
                                          Severity: Major
                                          Found in plugins/MediaMonkey/__init__.py - About 50 mins to fix

                                            Function Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                def Configure(
                                            Severity: Minor
                                            Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                              Function LoadPlaylistByTitle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  def LoadPlaylistByTitle(self, plString,repeat,shuffle,crossfade,clear):
                                              Severity: Minor
                                              Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                Function Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    def Configure(self,repeat=2,shuffle=2,crossfade=2,clear = True, filePath='', stop = True):
                                                Severity: Minor
                                                Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                  Function GetLabel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      def GetLabel(self,repeat,shuffle,crossfade,clear,filePath,stop):
                                                  Severity: Minor
                                                  Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                    Function __call__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        def __call__(self, step=10.0, direction=0):
                                                            length=self.plugin.GetValue('CurrentSongLength')
                                                            pos=self.plugin.GetValue('PlaybackTime')
                                                            if direction: #Backward
                                                                if pos>length*step/100:
                                                    Severity: Minor
                                                    Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                    Cognitive Complexity

                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                    A method's cognitive complexity is based on a few simple rules:

                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                    Further reading

                                                    Function RefreshList has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        def RefreshList(self):
                                                            self.patientFrame = None
                                                            if not self.create:
                                                                self.CompleteForm()
                                                            else:
                                                    Severity: Minor
                                                    Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                    Cognitive Complexity

                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                    A method's cognitive complexity is based on a few simple rules:

                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                    Further reading

                                                    Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        def __call__(self,repeat=2,shuffle=2,crossfade=2,clear=True,filePath='',stop=True):
                                                    Severity: Minor
                                                    Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                      Function GetNotAccessibleTracks has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          def GetNotAccessibleTracks(self, filePath):
                                                              if self.isRunning():
                                                                  count = 0
                                                                  try:
                                                                      MyTracks = self.MM.Database.QuerySongs("")
                                                      Severity: Minor
                                                      Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function Configure has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          def Configure(self, events = 4 * [True] + 23 * [False], events2 = 8*[True]):
                                                              if isinstance(events, bool): # For compatibility with old version !!!
                                                                  events = 4 * [True] + 23 * [False]
                                                                  events2 = 8 * [True]
                                                              panel = eg.ConfigPanel(self)
                                                      Severity: Minor
                                                      Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function Jubox has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          def Jubox(self, ID, clear=True,repeat=2,shuffle=2,crossfade=2,stop = True):
                                                      Severity: Minor
                                                      Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                        Function __call__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            def __call__(
                                                        Severity: Minor
                                                        Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                  if rule[1]==6:
                                                                                      sql+="%s(%s+2415018.5)>julianday('now','-%s %s','localtime')" % substValues
                                                                                  if rule[1]==7:
                                                          Severity: Major
                                                          Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                    if rule[1]==ix:
                                                                                        substValues=(op,propertiesList[rule[0]][0],tuplOper[ix],rule_2)
                                                                                        sql+='%s%s%s"%s"' % substValues
                                                                                        break
                                                                                if rule[1]==6:
                                                            Severity: Major
                                                            Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                      for ix in range(0,6):
                                                                                          if rule[1]==ix:
                                                                                              substValues=(op,propertiesList[rule[0]][0],tuplOper[ix],rule_2)
                                                                                              sql+="%sstrftime('%%Y-%%m-%%d %%H:%%M:%%S',%s+2415018.5)%s'%s'" % substValues
                                                                                              break
                                                              Severity: Major
                                                              Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                            if choice1 < 12 and listRules2[i][2]==u"":
                                                                                                flag=False
                                                                                                break
                                                                                        else:
                                                                Severity: Major
                                                                Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                          if idSong==Player.PlaylistItems(indx).ID:
                                                                                              if now_pl:
                                                                                                  Player.PlaylistDelete(indx)
                                                                                          res = 0
                                                                  Severity: Major
                                                                  Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                            if rule[1]==7:
                                                                                                sql+="%s(%s+2415018.5)<julianday('now','-%s %s','localtime')" % substValues
                                                                                    else: # (No "DateType")
                                                                    Severity: Major
                                                                    Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                                  if choice1>5 and int(listRules2 [i][2][:-1])<1:
                                                                                                      flag=False
                                                                                                      break
                                                                                      if not self.myDirty:
                                                                      Severity: Major
                                                                      Found in plugins/MediaMonkey/__init__.py - About 45 mins to fix

                                                                        Function __call__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                            def __call__(self, plString, repeat, shuffle, crossfade, clear):
                                                                        Severity: Minor
                                                                        Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                          Function Configure has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                              def Configure(self, plString="",repeat=2,shuffle=2,crossfade=2, clear = True):
                                                                          Severity: Minor
                                                                          Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                            Function Configure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def Configure(self,repeat=2,shuffle=2,crossfade=2,clear = True, filePath='', stop = True):
                                                                                    txt = self.text
                                                                                    self.filePath = filePath
                                                                                    panel = eg.ConfigPanel(self)
                                                                                    label1Text = wx.StaticText(panel, -1, self.text.label1)
                                                                            Severity: Minor
                                                                            Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                            Cognitive Complexity

                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                            Further reading

                                                                            Function __call__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def __call__(self, step=10.0):
                                                                                    if step>0:
                                                                                        balance=self.plugin.GetValue('Panning')
                                                                                        if balance>-1:
                                                                                            if balance<(step/100-1):
                                                                            Severity: Minor
                                                                            Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                            Cognitive Complexity

                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                            Further reading

                                                                            Function __call__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def __call__(self, step=10.0):
                                                                                    if step>0:
                                                                                        balance=self.plugin.GetValue('Panning')
                                                                                        if balance<1:
                                                                                            if balance>(1-step/100):
                                                                            Severity: Minor
                                                                            Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                            Cognitive Complexity

                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                            Further reading

                                                                            Function __call__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def __call__(self, step=10.0):
                                                                                    if step>0:
                                                                                        self.plugin.muted=False
                                                                                        volume=self.plugin.GetValue('Volume')
                                                                                        if volume<1:
                                                                            Severity: Minor
                                                                            Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                            Cognitive Complexity

                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                            Further reading

                                                                            Function Configure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def Configure(self,clear=False,filePath='',stop = True):
                                                                                    self.filePath = filePath
                                                                                    txt = self.text
                                                                                    panel = eg.ConfigPanel(self)
                                                                                    label1Text = wx.StaticText(panel, -1, self.text.label1)
                                                                            Severity: Minor
                                                                            Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                            Cognitive Complexity

                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                            Further reading

                                                                            Function Setup has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                                def Setup(self, plugin, events = False):
                                                                                    """
                                                                                    This will be called inside the thread at the beginning.
                                                                                    """
                                                                                    self.plugin = plugin
                                                                            Severity: Minor
                                                                            Found in plugins/MediaMonkey/__init__.py - About 35 mins to fix

                                                                            Cognitive Complexity

                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                            Further reading

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                        return self.text.shuffleON
                                                                            Severity: Major
                                                                            Found in plugins/MediaMonkey/__init__.py - About 30 mins to fix

                                                                              Function GetSongInfo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                                  def GetSongInfo(self):
                                                                                      currSong = self.MM.Player.CurrentSong
                                                                                      sql = ' FROM Covers WHERE IDSong="%i"' % currSong.ID
                                                                                      count = 0
                                                                                      Covers = []
                                                                              Severity: Minor
                                                                              Found in plugins/MediaMonkey/__init__.py - About 25 mins to fix

                                                                              Cognitive Complexity

                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                              Further reading

                                                                              Function checkIsRunning has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                                  def checkIsRunning(self):
                                                                                      self.checkTask = eg.scheduler.AddTask(2, self.checkIsRunning) # must run continuously !
                                                                                      if not self.isRunning():
                                                                                              if self.stopFlg:
                                                                                                  self.manFlg = False
                                                                              Severity: Minor
                                                                              Found in plugins/MediaMonkey/__init__.py - About 25 mins to fix

                                                                              Cognitive Complexity

                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                              Further reading

                                                                              Function onRefreshButton has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                                  def onRefreshButton(self,evt=None):
                                                                                      self.patientFrame = None
                                                                                      if not evt and not self.mode and isfile(self.filePath):
                                                                                          self.CompleteForm()
                                                                                      else:
                                                                              Severity: Minor
                                                                              Found in plugins/MediaMonkey/__init__.py - About 25 mins to fix

                                                                              Cognitive Complexity

                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                              Further reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              class SetRepeat(eg.ActionBase):
                                                                                  name = "Set continous playback"
                                                                                  description = "Turn continuous mode on or off"
                                                                              
                                                                                  def __call__(self, switch=0):
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 2 other locations - About 1 day to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1851..1879
                                                                              plugins/MediaMonkey/__init__.py on lines 1882..1910

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 195.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              class SetAutoDJ(eg.ActionBase):
                                                                                  name = "Set AutoDJ"
                                                                                  description = "Turn the AutoDJ on or off."
                                                                              
                                                                                  def __call__(self, switch=0):
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 2 other locations - About 1 day to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1820..1848
                                                                              plugins/MediaMonkey/__init__.py on lines 1882..1910

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 195.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              class SetCrossfade(eg.ActionBase):
                                                                                  name = "Set Crossfade"
                                                                                  description = "Sets the crossfade to on or off."
                                                                              
                                                                                  def __call__(self, switch=0):
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 2 other locations - About 1 day to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1820..1848
                                                                              plugins/MediaMonkey/__init__.py on lines 1851..1879

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 195.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                  class text:
                                                                                      radioboxMode = "Select songs ..."
                                                                                      modeAnd = "Matches all rules (AND)"
                                                                                      modeOr = "Matches at least one rule (OR)"
                                                                                      equal = "is equal to"
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 1 day to fix
                                                                              plugins/Window/SendKeys.py on lines 90..123

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 167.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                  def __call__(self, arrayInfo, sep='',res = True):
                                                                                      SongData,ix = self.plugin.GetSongData(0)
                                                                                      listPropert=(
                                                                                          "SongLength",
                                                                                          "FileLength",
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 5 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 2550..2568

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 119.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                  def __call__(self, arrayInfo, sep='', res = True):
                                                                                      SongData,ix = self.plugin.GetSongData(0)
                                                                                      listPropert=(
                                                                                          "Tempo",
                                                                                          "Mood",
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 5 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 2671..2689

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 119.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                  def OnRightClick(self, event):
                                                                                      if not hasattr(self, "popupID1"):
                                                                                          self.popupID1 = wx.NewId()
                                                                              
                                                                                          self.Bind(wx.EVT_MENU, self.onDeleteButton, id=self.popupID1)
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 3 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 4361..4376

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 98.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                  def OnRightClick(self, event):
                                                                                      if not hasattr(self, "popupID1"):
                                                                                          self.popupID1 = wx.NewId()
                                                                              
                                                                                          self.Bind(wx.EVT_MENU, self.onPlayButton, id=self.popupID1)
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 3 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 4533..4548

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 98.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                  def Configure(self, step=-10.0):
                                                                                      panel = eg.ConfigPanel(self)
                                                                                      volumeCtrl = eg.SpinNumCtrl(
                                                                                          panel,
                                                                                          -1,
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1764..1777

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 86.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                      for album in albums:
                                                                                          item = album.split('\t')
                                                                                          self.itemListCtrl.InsertStringItem(row,item[0])
                                                                                          self.itemListCtrl.SetStringItem(row, 1,item[1])
                                                                                          self.itemListCtrl.SetStringItem(row, 2, item[2][:-1])
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 4521..4526

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 86.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          for track in tracks:
                                                                                              item = track.split('\t')
                                                                                              self.itemListCtrl.InsertStringItem(row,item[0])
                                                                                              self.itemListCtrl.SetStringItem(row, 1,item[1])
                                                                                              self.itemListCtrl.SetStringItem(row, 2,item[2][:-1])
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 4323..4328

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 86.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                  def Configure(self, balance=0.0):
                                                                                      panel = eg.ConfigPanel(self)
                                                                                      balanceCtrl = eg.SpinNumCtrl(
                                                                                          panel,
                                                                                          -1,
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1734..1747

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 86.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 4 locations. Consider refactoring.
                                                                              Open

                                                                                  def Configure(self, volume=50.0):
                                                                                      panel = eg.ConfigPanel(self)
                                                                                      volumeCtrl = eg.SpinNumCtrl(
                                                                                          panel,
                                                                                          -1,
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 3 other locations - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1705..1711
                                                                              plugins/MediaMonkey/__init__.py on lines 1930..1942
                                                                              plugins/MediaMonkey/__init__.py on lines 1966..1978

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 83.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 4 locations. Consider refactoring.
                                                                              Open

                                                                                  def Configure(self, step=10.0):
                                                                                      panel = eg.ConfigPanel(self)
                                                                                      balanceCtrl = eg.SpinNumCtrl(
                                                                                          panel,
                                                                                          -1,
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 3 other locations - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1668..1680
                                                                              plugins/MediaMonkey/__init__.py on lines 1705..1711
                                                                              plugins/MediaMonkey/__init__.py on lines 1930..1942

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 83.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 4 locations. Consider refactoring.
                                                                              Open

                                                                                  def Configure(self, step=10.0):
                                                                                      panel = eg.ConfigPanel(self)
                                                                                      volumeCtrl = eg.SpinNumCtrl(panel, -1, step, max=100.0,fractionWidth=1)
                                                                                      panel.AddLabel(self.text.label_conf)
                                                                                      panel.AddCtrl(volumeCtrl)
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 3 other locations - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1668..1680
                                                                              plugins/MediaMonkey/__init__.py on lines 1930..1942
                                                                              plugins/MediaMonkey/__init__.py on lines 1966..1978

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 83.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 4 locations. Consider refactoring.
                                                                              Open

                                                                                  def Configure(self, step=10.0):
                                                                                      panel = eg.ConfigPanel(self)
                                                                                      balanceCtrl = eg.SpinNumCtrl(
                                                                                          panel,
                                                                                          -1,
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 3 other locations - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1668..1680
                                                                              plugins/MediaMonkey/__init__.py on lines 1705..1711
                                                                              plugins/MediaMonkey/__init__.py on lines 1966..1978

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 83.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                      while panel.Affirmed():
                                                                                          arrayInfo=[
                                                                                              tempoCtrl.GetValue(),
                                                                                              moodCtrl.GetValue(),
                                                                                              occasionCtrl.GetValue(),
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 2776..2794

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 78.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                      while panel.Affirmed():
                                                                                          arrayInfo=[
                                                                                              lengthCtrl.GetValue(),
                                                                                              filesizeCtrl.GetValue(),
                                                                                              bitrateCtrl.GetValue(),
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 2 hrs to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 2648..2663

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 78.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                                  if rule[1]<6:
                                                                                                      for ix in range(0,6):
                                                                                                          if rule[1]==ix:
                                                                                                              substValues=(op,propertiesList[rule[0]][0],tuplOper[ix],rule_2)
                                                                                                              sql+="%sstrftime('%%Y-%%m-%%d %%H:%%M:%%S',%s+2415018.5)%s'%s'" % substValues
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 1 hr to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 820..824

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 75.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                                  for ix in range(0,6):
                                                                                                      if rule[1]==ix:
                                                                                                          substValues=(op,propertiesList[rule[0]][0],tuplOper[ix],rule_2)
                                                                                                          sql+='%s%s%s"%s"' % substValues
                                                                                                          break
                                                                              Severity: Major
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 1 hr to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 807..812

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 75.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          if volume<1:
                                                                                              if volume>(1-step/100):
                                                                                                  volume=1
                                                                                              else:
                                                                                                  volume+=step/100
                                                                              Severity: Minor
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 45 mins to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1920..1925

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 63.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          if balance<1:
                                                                                              if balance>(1-step/100):
                                                                                                  balance=1
                                                                                              else:
                                                                                                  balance+=step/100
                                                                              Severity: Minor
                                                                              Found in plugins/MediaMonkey/__init__.py and 1 other location - About 45 mins to fix
                                                                              plugins/MediaMonkey/__init__.py on lines 1695..1700

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 63.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              There are no issues that match your filters.

                                                                              Category
                                                                              Status