IMDb Details not working

  • Ich denke, dass bestimmte Suchbegriffe (hier wohl 'from') bei der erweiterten Suche nicht einfach so zugelassen sind.

    Wenn man diese Suchanfrage per Browser aufruft, kommt ein Captcha, wo man Bilder auswählen muss, um zu zeigen, dass man ein Mensch ist. Dieses Captcha kommt natürlich bei der Suche im Plugin nicht, wo dann ein http-Error "405 not allowed" angezeigt wird.

    https://www.imdb.com/search/title/?title=from+3+-+1&count=10

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One + Two mit DP AIO - OE2.6

  • Hi,


    I found some errors that need to be reviewed:

    Code
    TypeError: float() argument must be a string or a number
    Insufficient memory (case 4)

    I’ve attached the links where these errors occurred while using the standard search:

    Code
    [IMDB] downloading poster https://m.media-amazon.com/images/M/MV5BZWZlNGE3MjgtNTg4MS00M2NjLTg3NzYtMDNlOWUxNGUxNDhkXkEyXkFqcGc@._V1_.jpg to /tmp/poster.jpg
    [IMDB] showDetails() downloading query https://www.imdb.com/title/tt15000156/

    I’ve fixed it for now, but I’m sure you might have a better way to handle it. :winking_face:

  • Which version of imdb-plugin you use?

    What ist the searchtext and the found title for this links?

    Please post a full (error)logfile.


    I have tested with searchtext "firebrand" with standard parsing method and alternativ parsing method in internal version 0.1-r14 and have no problems.


    But i don't know at this moment, what i have changed since last posted version 0.1-r13 :winking_face:

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One + Two mit DP AIO - OE2.6

  • In version 0.1-r13, rating retrieval was added for both standard and advanced search methods.

    1. Error: TypeError: float() argument must be a string or a number

    When using JSON parsing in the IMDBquery function (config.plugins.imdb.parsingmethod.value == "json"), the following occurs:


    • Standard Search ("titleResults":{"results":):
    Code
    self.resultlist.append((str(result_txt), str(result['id']), posterurl, None))
    • Here, the rating (cur[3]) is set to None, causing the error in menuSelectionChanged because float(None) is invalid.


    • Advanced Search ("titleResults":{"titleListItems":):
    Code
    rating_txt = getJsonValues(result, ['ratingSummary', 'aggregateRating'], 0)
    self.resultlist.append((str(result_txt), str(imdb_id), posterurl, rating_txt))
    • In this case, the rating is retrieved correctly (as a number or defaults to 0), avoiding any issues.


    • Cause: The error arises because the rating in self.resultlist can be None during standard search, which is not a valid input for float().
    • Solution: To fix this, the rating in self.resultlist must always have a valid value (a string or number) instead of None. For the standard search, a temporary fix was implemented by assigning a default value of "0":
    Code
    rating_txt = getJsonValues(result, ['ratingSummary', 'aggregateRating'], "0")
    self.resultlist.append((str(result_txt), str(result['id']), posterurl, rating_txt))

    This ensures compatibility with float() and prevents the error. Note that this is a temporary solution until a method to accurately retrieve ratings in standard search is developed.

    2. Error: Insufficient memory (case 4)

    • Issue: This problem affects devices with limited memory (e.g., Dreambox 520). Large poster images (10 MB or more) exceed the device’s capacity, causing Enigma2 to restart without generating a log file.
    • Solution: A new option was added to allow users to select poster sizes:

      • 600px: Ideal for devices with very limited memory.
      • 1200px: A balanced choice for moderate-memory devices.
      • Original: Retained for high-capacity devices.

      This feature enables users to adjust poster resolution based on their device’s capabilities, effectively preventing memory-related crashes.

    Additional Notes

    • The attached plugin (version 0.1-r14) includes these fixes along with minor enhancements.
  • Thanks, i will look at your code on next weekend.


    On Standard-Json-Search you can use this code, because the result-list has no value for rating:

    self.resultlist.append((str(result_txt), str(result['id']), posterurl, 0))


    If you post a bug, please show the full error like this, because the developer can better understand the problem:

    Code
    dreamTwo enigma2[3743]: Traceback (most recent call last):
    dreamTwo enigma2[3743]:   File "/usr/lib/enigma2/python/Plugins/Extensions/IMDb/plugin.py", line 291, in menuSelectionChanged
    dreamTwo enigma2[3743]:     self.ratingstars = int(10*round(float(cur[3]),1))
    dreamTwo enigma2[3743]: [IMDB] downloading poster https://...
    dreamTwo enigma2[3743]: TypeError: float() argument must be a string or a number

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One + Two mit DP AIO - OE2.6

  • It's great that you're adding new stuff here.
    But it's absolutely rude that you completely ignored the changes from my last r15.
    After all, I went to the extra effort to merge your changes and my changes in the last r15.

    Then I would have at least expected you to integrate your additions to the trailer into my last r15.


    I won't bother to combine my version and yours again.

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One + Two mit DP AIO - OE2.6

  • Andro1 Please stop messing up the source formatting by adding line breaks where none should be and replacing tabulators by spaces. This code cannot be added to Github, please restore original formatting before doing any further changes.

    Edited once, last by dhwz ().

  • alpha

    The trailer videos are from IMDb, not YouTube.


    Andro1

    As you can see, there are currently no active developers. If you would like to continue supporting the plugin in your own way, we would be grateful. Otherwise, it will no longer receive any updates or support.

  • Hallo an Sven, Andro1 und andere,


    wollte nur anmerken, dass bei IMDB seit geraumer Zeit die Darstellerliste nicht mehr gefüllt ist. Bis vor Kurzem lief alles tadellos. Ich habe die r-17 zuletzt genutzt. Die müsste ja auf Svens r-15 aufsetzen...


  • Hier mal Version 0.1-r18, wo die Darstellerliste wieder angezeigt wird.


    Hinweis zum Zip-Dateianhang:

    Beide Dateien aus der Zip im Anhang in folgenden Ordner auf die Box kopieren (vorhandene Dateien ersetzen):

    usr/lib/enigma2/python/Plugins/Extensions/IMDb/

    Danach einen GUI-Neustart machen und testen.