asciidisco/plugin.video.netflix

View on GitHub

Showing 673 of 673 total issues

Cyclomatic complexity is too high in method build_main_menu_listing. (17)
Open

return xbmcplugin.endOfDirectory(handle=self.plugin_handle)
 
def build_main_menu_listing(self, video_list_ids, user_list_order, actions,
build_url, widget_display=False):
"""
Severity: Minor
Found in resources/lib/KodiHelper.py by radon

File NetflixHttpSubRessourceHandler.py has 318 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# pylint: skip-file
# -*- coding: utf-8 -*-
# Module: NetflixHttpSubRessourceHandler
# Created on: 07.03.2017
 
 
Severity: Minor
Found in resources/lib/NetflixHttpSubRessourceHandler.py - About 3 hrs to fix

    Library has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Library(object):
    """Exports Netflix shows & movies to a local library folder"""
     
    series_label = 'shows'
    """str: Label to identify shows"""
    Severity: Minor
    Found in resources/lib/Library.py - About 3 hrs to fix

      Cyclomatic complexity is too high in method _generate_art_info. (16)
      Open

      listitem=play_item)
       
      def _generate_art_info(self, entry):
      """Adds the art info from an entry to a Kodi list item
       
       
      Severity: Minor
      Found in resources/lib/KodiHelper.py by radon

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

      def is_logged_in(self, account):
      """
      Determines if a user is already logged in (with a valid cookie)
       
      Parameters
      Severity: Minor
      Found in resources/lib/NetflixSession.py - About 3 hrs to fix

      Cyclomatic complexity is too high in method get_movie_content_by_id. (15)
      Open

      return False
       
      def get_movie_content_by_id(self, movieid):
      query = {
      "jsonrpc": "2.0",
      Severity: Minor
      Found in resources/lib/KodiHelper.py by radon

      Function get_show_content_by_id has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

      def get_show_content_by_id(self, showid, showseason, showepisode):
      showseason = int(showseason)
      showepisode = int(showepisode)
      props = ["title", "showtitle", "season", "episode", "plot", "fanart",
      "art", "resume", "playcount"]
      Severity: Minor
      Found in resources/lib/KodiHelper.py - About 3 hrs to fix

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

      try:
      response = self.session.get(
      url=url,
      verify=self.verify_ssl,
      params=params)
      Severity: Major
      Found in resources/lib/NetflixSession.py and 1 other location - About 3 hrs to fix
      resources/lib/NetflixSession.py on lines 2012..2025

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

      try:
      response = self.session.post(
      url=url,
      data=data,
      params=params,
      Severity: Major
      Found in resources/lib/NetflixSession.py and 1 other location - About 3 hrs to fix
      resources/lib/NetflixSession.py on lines 2056..2067

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

      def show_db_updated_notify(self):
      """
      Shows notification that local db was updated
       
      :returns: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 108..120
      resources/lib/ui/Dialogs.py on lines 122..134
      resources/lib/ui/Dialogs.py on lines 136..148
      resources/lib/ui/Dialogs.py on lines 150..162
      resources/lib/ui/Dialogs.py on lines 164..176
      resources/lib/ui/Dialogs.py on lines 192..204
      resources/lib/ui/Dialogs.py on lines 221..233

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

      def show_no_metadata_notify(self):
      """
      Shows notification that no metadata is available
       
      :returns: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 108..120
      resources/lib/ui/Dialogs.py on lines 122..134
      resources/lib/ui/Dialogs.py on lines 136..148
      resources/lib/ui/Dialogs.py on lines 150..162
      resources/lib/ui/Dialogs.py on lines 164..176
      resources/lib/ui/Dialogs.py on lines 178..190
      resources/lib/ui/Dialogs.py on lines 221..233

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

      def show_request_error_notify(self):
      """
      Shows notification that a request error occured
       
      :returns: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 108..120
      resources/lib/ui/Dialogs.py on lines 136..148
      resources/lib/ui/Dialogs.py on lines 150..162
      resources/lib/ui/Dialogs.py on lines 164..176
      resources/lib/ui/Dialogs.py on lines 178..190
      resources/lib/ui/Dialogs.py on lines 192..204
      resources/lib/ui/Dialogs.py on lines 221..233

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

      def show_no_search_results_notify(self):
      """
      Shows notification that no search results could be found
       
      :return: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 108..120
      resources/lib/ui/Dialogs.py on lines 122..134
      resources/lib/ui/Dialogs.py on lines 136..148
      resources/lib/ui/Dialogs.py on lines 164..176
      resources/lib/ui/Dialogs.py on lines 178..190
      resources/lib/ui/Dialogs.py on lines 192..204
      resources/lib/ui/Dialogs.py on lines 221..233

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

      def show_login_failed_notify(self):
      """
      Shows notification that the login failed
       
      :returns: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 122..134
      resources/lib/ui/Dialogs.py on lines 136..148
      resources/lib/ui/Dialogs.py on lines 150..162
      resources/lib/ui/Dialogs.py on lines 164..176
      resources/lib/ui/Dialogs.py on lines 178..190
      resources/lib/ui/Dialogs.py on lines 192..204
      resources/lib/ui/Dialogs.py on lines 221..233

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

      def show_no_seasons_notify(self):
      """
      Shows notification that no seasons be found
       
      :returns: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 108..120
      resources/lib/ui/Dialogs.py on lines 122..134
      resources/lib/ui/Dialogs.py on lines 136..148
      resources/lib/ui/Dialogs.py on lines 150..162
      resources/lib/ui/Dialogs.py on lines 178..190
      resources/lib/ui/Dialogs.py on lines 192..204
      resources/lib/ui/Dialogs.py on lines 221..233

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

      def show_autologin_enabled_notify(self):
      """
      Shows notification that auto login is enabled
       
      :returns: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 108..120
      resources/lib/ui/Dialogs.py on lines 122..134
      resources/lib/ui/Dialogs.py on lines 136..148
      resources/lib/ui/Dialogs.py on lines 150..162
      resources/lib/ui/Dialogs.py on lines 164..176
      resources/lib/ui/Dialogs.py on lines 178..190
      resources/lib/ui/Dialogs.py on lines 192..204

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

      def show_invalid_pin_notify(self):
      """
      Shows notification that a wrong adult pin was given
       
      :returns: bool - Dialog shown
      Severity: Major
      Found in resources/lib/ui/Dialogs.py and 7 other locations - About 3 hrs to fix
      resources/lib/ui/Dialogs.py on lines 108..120
      resources/lib/ui/Dialogs.py on lines 122..134
      resources/lib/ui/Dialogs.py on lines 150..162
      resources/lib/ui/Dialogs.py on lines 164..176
      resources/lib/ui/Dialogs.py on lines 178..190
      resources/lib/ui/Dialogs.py on lines 192..204
      resources/lib/ui/Dialogs.py on lines 221..233

      Function updatedb_from_exported has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

      def updatedb_from_exported(self):
      """Adds movies and shows from exported media to the local db
       
      Returns
      -------
      Severity: Minor
      Found in resources/lib/Library.py - About 2 hrs to fix

      Cyclomatic complexity is too high in method load_manifest. (12)
      Open

      self.__perform_key_handshake()
       
      def load_manifest(self, viewable_id, dolby, hevc, hdr, dolbyvision, vp9):
      """
      Loads the manifets for the given viewable_id and
      Severity: Minor
      Found in resources/lib/MSLv2.py by radon

      Cyclomatic complexity is too high in method load_manifest. (12)
      Open

      self.__perform_key_handshake()
       
      def load_manifest(self, viewable_id, dolby, hevc, hdr, dolbyvision, vp9):
      """
      Loads the manifets for the given viewable_id and
      Severity: Minor
      Found in resources/lib/MSL.py by radon
      Severity
      Category
      Status
      Source
      Language