Opened 17 years ago
Closed 17 years ago
#5917 closed enhancement (fixed)
themoviedb.org grabber for mythvideo
| Reported by: | Owned by: | stuartm | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | mythvideo | Version: | head |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Script to grab movie data from themoviedb.org.
At this point, this is a prototype script. It has been tested to the point that it produces output like the imdb.pl script. I have not tested it directly with mythvideo.
It does not provide writer, country or rating information as so far this not available from the database.
Fetching director and cast information may give warnings as some movies a person may have several roles. Code needs to be changed to account for this.
At this point I am posting it so the effort is not lost and there is no duplication of effort. The script is not quite ready for incorporation to svn.
Attachments (7)
Change History (21)
comment:1 by , 17 years ago
| Milestone: | unknown → 0.22 |
|---|---|
| Version: | unknown → head |
I've attached an updated script with all the bugs I ran into now fixed. I've removed the fallback to IMDB posters, but as a small compensation it will download the 'fan art' instead if no posters are available.
The poster/artwork download stuff could be smarter, returning the mid sized images rather than the largest if available. In future the fan art should probably have it's own path (-A/-F?) so that mythvideo can download both, leaving the theme to decide which is displayed. Since each has a very different aspect ratio I can't see themes handling posters/art interchangeably.
comment:2 by , 17 years ago
Thanks Stuart!! The issue of warnings on director and cast remains. If a person has multiple roles, it will give a warning, not sure how mythvideo will react to a little extra text in the script output. The warning is the nature of how XML::Simple parses the xml and provides the results.
I`ll look at adding a separate option for the fan art, I believe in other media software the fan art is used as a background. Would be cool if mythvideo would in the future support dynamic backgrounds based on this.
comment:3 by , 17 years ago
Attached a third version which fixes the cast warnings.
Hit one more bug along the way, but I've forgotten what I was searching at the time so I can't fix it yet.
There is an API bug in the form of unescaped, illegal XML characters which I've reported, but it prevents us from obtaining an results containing an ampersand character. This might be films with an ampersand in their title, or any search which returns matches including an ampersand. Can't be fixed on our end.
comment:4 by , 17 years ago
updated script.
- Add Stuart as an author (hope I got your last name right).
- Fix a bug when searching for movie (-M option) that returns an error if there are no search results. Now nothing is printed if there are no search results
- Pick the mid size poster first
- Add -B option to display the backdrop(s). Should give list if there is more than one.
comment:5 by , 17 years ago
I've posted in the themoviedb forum if the country, writer and rating (ie. PG, R) will be available.
comment:6 by , 17 years ago
Version 4 introduces new errors, but I haven't had time to fix them yet.
comment:7 by , 17 years ago
what are the errors? Could only be in the poster generation I guess.
I plan another version tonight to remove the "options" for the -M search command since they are not used and can be used, and update to add the writers.
Country and rating (PG, R), I am told will be added to tmdb later.
comment:8 by , 17 years ago
Search for "Crimson Tide"
Use of uninitialized value in string eq at tmdb.pl line 189
Search for "Gerry"
Not an ARRAY reference at tmdb.pl line 123.
Country and rating (PG, R), I am told will be added to tmdb later.
Country has been added according to the forum.
comment:9 by , 17 years ago
Updated, I think I fixed the two errors. Added country, although I guess it should be treated as a list, may give error if there is a list.
Fixed backdrop cause I wanted it to return a list of the backdrops.
Removed options for search -M.
comment:10 by , 17 years ago
Use of uninitialized value $country in concatenation (.) or string at /usr/local/share/mythtv/mythvideo/scripts/tmdb.pl line 166.
by , 17 years ago
Fix for country error message when there is no country
comment:11 by , 17 years ago
Should fix the country problem. Question on how mythvideo with handle the country if missing. Should we print "countries:" when there are none, or just omit it in the output as I am now?
Need to update if there are more than one country. Technically the way the XML is there could be several. I consider one only now, may give error if there is more than one.
by , 17 years ago
Fix more errors when various pieces of data are missing from the reply
comment:13 by , 17 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → accepted |
comment:14 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
(In [19251]) Replaces IMDB grabber with themoviedb.org grabber as the default in trunk. This commit doesn't change existing settings or remove the IMDB script yet, I'll do that in a few days once any kinks with the TMDB script have been worked out. If you have an existing install and wish to switch to tmdb.pl then edit the grabber commands accordingly.
Closes #5917

Prototype script