asciidisco / plugin.video.netflix

Inputstream based Netflix plugin for Kodi
MIT License
1.24k stars 226 forks source link

Search partially works #633

Closed 7FM closed 5 years ago

7FM commented 5 years ago

I'm submitting a ...

General infomration

Prerequisites

Description

Search for certain strings not possible

Steps to Reproduce

  1. go to search
  2. enter "life"
  3. get an error msg

Expected behavior: list movies that match the entered string

Actual behavior: nothing but an exception

Context (Environment)

Installation

Operating System

Additional informatin on the environment

For ARM: LibreELEC For Windows official Kodi installation

Debug log

http://sprunge.us/nzgdlw

7FM commented 5 years ago

Funny adding a useless space: "life " does work

7FM commented 5 years ago

First of all: I do not have any knowledge of python but: According to the stacktrace the problem encounters in: resources/lib/KodiHelper.py starting at Line 440

            if video['type'] == 'movie':
                # it´s a movie, so we need no subfolder & a route to play it
                isFolder = False
                maturity = video.get('maturity', {}).get('level', 999)
                needs_pin = (True, False)[int() >= 100]
                url = build_url({
                    'action': 'play_video',
                    'video_id': video_list_id,
                    'infoLabels': infos,
                    'pin': needs_pin})
                view = VIEW_MOVIE
                content = CONTENT_MOVIE
            else:
                # it´s a show, so we need a subfolder & route (for seasons)
                isFolder = True
                params = {
                    'action': actions[video['type']],
                    'show_id': video_list_id
                }
                params['pin'] = (True, False)[int(video.get('maturity', {}).get('level', 1001)) >= 1000]

The first int() statement (line 5) seems to me incomplete and should probably be something like int(maturity) and the second int() statement is actually causing the stacktrace

7FM commented 5 years ago

Sorry Duplicate: https://github.com/asciidisco/plugin.video.netflix/issues/365 I will have a look at 0.14