Skip to content

Instantly share code, notes, and snippets.

@PatrickKalkman
Created January 24, 2022 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatrickKalkman/78311800c0be1c4d1746b8b1cd6c4ea1 to your computer and use it in GitHub Desktop.
Save PatrickKalkman/78311800c0be1c4d1746b8b1cd6c4ea1 to your computer and use it in GitHub Desktop.
public List<ContentValues> parseMovies(JSONArray videoArray) throws JSONException {
List<ContentValues> videosToInsert = new ArrayList<>();
String title = video.optString(TAG_TITLE);
String description = video.optString(TAG_DESCRIPTION);
String short_description = video.optString(TAG_SHORT_DESCRIPTION);
if (description.isEmpty()) {
description = short_description;
}
String bgImageUrl = mContext.getResources().getString(R.string.catalog_images_url) + video.optString(TAG_BACKGROUND);
String cardImageUrl = mContext.getResources().getString(R.string.catalog_images_url) + video.optString(TAG_CARD_THUMB);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment