Fix Peertube PlayList

This commit is contained in:
tom79 2019-09-14 18:08:16 +02:00
parent 5cc5c361ce
commit 47744900dd
2 changed files with 8 additions and 1 deletions

View File

@ -477,7 +477,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
if (currentCursorPosition - (searchLength - 1) < 0 || currentCursorPosition == 0 || currentCursorPosition > s.toString().length())
return;
String[] searchInArray =(s.toString().substring(currentCursorPosition[ - searchLength, currentCursorPosition)).split("\\s");
String[] searchInArray =(s.toString().substring(currentCursorPosition - searchLength, currentCursorPosition)).split("\\s");
String searchIn = searchInArray[searchInArray.length-1];
Matcher m, mt;
m = sPattern.matcher(searchIn);

View File

@ -1693,6 +1693,13 @@ public class PeertubeAPI {
*/
public static Peertube parsePeertube(Context context, JSONObject resobj) {
Peertube peertube = new Peertube();
if( resobj.has("video")){
try {
resobj = resobj.getJSONObject("video");
} catch (JSONException e) {
e.printStackTrace();
}
}
try {
peertube.setId(resobj.get("id").toString());
peertube.setCache(resobj);