Fix Peertube PlayList
This commit is contained in:
parent
5cc5c361ce
commit
47744900dd
|
@ -477,7 +477,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
||||||
if (currentCursorPosition - (searchLength - 1) < 0 || currentCursorPosition == 0 || currentCursorPosition > s.toString().length())
|
if (currentCursorPosition - (searchLength - 1) < 0 || currentCursorPosition == 0 || currentCursorPosition > s.toString().length())
|
||||||
return;
|
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];
|
String searchIn = searchInArray[searchInArray.length-1];
|
||||||
Matcher m, mt;
|
Matcher m, mt;
|
||||||
m = sPattern.matcher(searchIn);
|
m = sPattern.matcher(searchIn);
|
||||||
|
|
|
@ -1693,6 +1693,13 @@ public class PeertubeAPI {
|
||||||
*/
|
*/
|
||||||
public static Peertube parsePeertube(Context context, JSONObject resobj) {
|
public static Peertube parsePeertube(Context context, JSONObject resobj) {
|
||||||
Peertube peertube = new Peertube();
|
Peertube peertube = new Peertube();
|
||||||
|
if( resobj.has("video")){
|
||||||
|
try {
|
||||||
|
resobj = resobj.getJSONObject("video");
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
peertube.setId(resobj.get("id").toString());
|
peertube.setId(resobj.get("id").toString());
|
||||||
peertube.setCache(resobj);
|
peertube.setCache(resobj);
|
||||||
|
|
Loading…
Reference in New Issue