Opened 15 years ago

Closed 15 years ago

#6428 closed patch (fixed)

tmdb.pl - Check for response before parsing

Reported by: sphery <mtdean@…> Owned by: Anduin Withers
Priority: minor Milestone: unknown
Component: Plugin - MythVideo Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The attached patch checks the response before parsing it, providing a much more sensible error message when network (or server) errors occur.

Before the patch, the message is something like:

File does not exist: at ./tmdb.pl line 302

After the patch:

Unable to contact themoviedb.org while retrieving movie list, stopped at ./tmdb.pl line 328.

(or similar). I tested the patch with an /etc/hosts entry:

127.0.0.1 api.themoviedb.org

but haven't yet tested the patch with a real, live network/server issue. Still waiting for (another) one to occur.

Attachments (3)

mythplugins-6428-mythvideo-tmdb-check_response.patch (2.6 KB) - added by sphery <mtdean@…> 15 years ago.
mythplugins-6428-mythvideo-tmdb-check_response.2.patch (2.6 KB) - added by sphery <mtdean@…> 15 years ago.
Slightly prettier patch. Can check for !defined since MythVideoCommon?.pm's myth_url_get(), used by TMDBAPIRequest(), returns undef response for unsuccessful requests
mythplugins-6428-mythvideo-tmdb-check_response.3.patch (2.6 KB) - added by sphery <mtdean@…> 15 years ago.
Updated for recent changes to trunk.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by sphery <mtdean@…>

Changed 15 years ago by sphery <mtdean@…>

Slightly prettier patch. Can check for !defined since MythVideoCommon?.pm's myth_url_get(), used by TMDBAPIRequest(), returns undef response for unsuccessful requests

Changed 15 years ago by sphery <mtdean@…>

Updated for recent changes to trunk.

comment:1 Changed 15 years ago by Rob Smith

Resolution: fixed
Status: newclosed

(In [21188]) Fixes #6428, gracefully handle tmdb networking issues

Note: See TracTickets for help on using tickets.