Omertron / api-omdb

API for the Open Movie Database
GNU General Public License v3.0
27 stars 20 forks source link

Long Plot bug #6

Closed syfantid closed 7 years ago

syfantid commented 7 years ago

Hey,

Thanks for the awesome work with the API. However, I think there might be a bug upon requesting long plots from OMDb. For instance, if I request the movie with IMDb ID tt0000628 with a long plot OmdbVideoFull result = omdb.getInfo(new OmdbBuilder().setImdbId(imdbID).setPlot(PlotType.LONG).setTomatoesOn().build());

I get the following JSON response: {"Title":"The Adventures of Dollie","Year":"1908","Rated":"NOT RATED","Released":"14 Jul 1908","Runtime":"12 min","Genre":"Action, Short","Director":"D.W. Griffith, G.W. Bitzer","Writer":"Stanner E.V. Taylor","Actors":"Arthur V. Johnson, Linda Arvidson, Gladys Egan, Charles Inslee","Plot":"On a warm and sunny summer's day, a mother and father take their young daughter Dollie on a riverside outing. A gypsy basket peddler happens along, and is angered when the mother refuses to...","Language":"English","Country":"USA","Awards":"N/A","Poster":"http://ia.media-imdb.com/images/M/MV5BMDlmYzgwZmItNzdlMS00ZmE5LThkYmUtYmNhNjAyY2FlMmFiXkEyXkFqcGdeQXVyMTYxNjkxOQ@@._V1_SX300.jpg","Metascore":"N/A","imdbRating":"5.7","imdbVotes":"443","imdbID":"tt0000628","Type":"movie","Response":"True"}

Note the "..." in the end of the plot result. This is the short version of the plot according to OMDb. The long version result should have been: {"Title":"The Adventures of Dollie","Year":"1908","Rated":"NOT RATED","Released":"14 Jul 1908","Runtime":"12 min","Genre":"Action, Short","Director":"D.W. Griffith, G.W. Bitzer","Writer":"Stanner E.V. Taylor","Actors":"Arthur V. Johnson, Linda Arvidson, Gladys Egan, Charles Inslee","Plot":"On a warm and sunny summer's day, a mother and father take their young daughter Dollie on a riverside outing. A gypsy basket peddler happens along, and is angered when the mother refuses to...","Language":"English","Country":"USA","Awards":"N/A","Poster":"http://ia.media-imdb.com/images/M/MV5BMDlmYzgwZmItNzdlMS00ZmE5LThkYmUtYmNhNjAyY2FlMmFiXkEyXkFqcGdeQXVyMTYxNjkxOQ@@._V1_SX300.jpg","Metascore":"N/A","imdbRating":"5.7","imdbVotes":"443","imdbID":"tt0000628","Type":"movie","Response":"True"}

Could you please check it?

Omertron commented 7 years ago

Seems that the plot is now FULL and not LONG.

You are better using the setPlotFull() rather than setting the parameter directly.

syfantid commented 7 years ago

Thanks for the quick fix! ;)