Closed MrRory closed 7 years ago
I'll change this line from false
to null
.
let's hope the android app isn't going to break 😅
I can hold back this issue if you want. I can also give you steps to setup your own API for development and testing purposes.
probably gulp build && node ./build/popcorn-api.js
?
I think it'll work, since it looks like the android code once depended on this being a youtube url, an empty string or null
.
However, I'm not sure just changing that line to null
will do it. Since the current response really gives false
as string, that confuses me
I think I implemented the false
value because of the 'old' YTS API, which was used by the android and desktop version, but I'm not sure. Either way I don't think I'll change this for 2.2.2 until the purposed change by you can work for the android version and the desktop version. I know Java is basically a wooden plank in terms of code flexibility compared to JavaScript. So I think it's good to test it out before changing the API (and database values).
@MrRory
A few things to install for the API are:
babel-cli
(npm module)The simplest way to run the API is to follow the [installation]() instructions and then run npm start
. I can give more personal details in if you contact me at chrisalderson@protonmail.com
Also maybe the false
value of 'trailer' gets converted to a String by Gson because the Movie.java
model has a trailer
property with a type of string
. https://github.com/popcorn-official/popcorn-android/blob/development/base/src/main/java/butter/droid/base/providers/media/models/Movie.java#L31
This change does not brake the Android codebase, and I am completely agree with the change, in order or preference, a null or empty value is better
The default value for trailer
will be null
: a89a1027436b76f3c671764d90b186518634b421
For example the trailer for Finding Dory: http://tv-v2.api-fetch.website/movies/1?keywords=dory
The value is
"false"
, it beingnull
or just""
would be beter.