private fun isInResults(results: ArrayList<Media>, id: String): Int { var i = 0 for (item in results) { if (item.videoId.equals(id)) return i i++ } return -1 }
Test if there is an item that already exists