mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 16:40:32 +00:00
refactored comments capability
This commit is contained in:
parent
77c6d3d576
commit
56cb8209b8
@ -57,7 +57,7 @@ dependencies {
|
||||
exclude module: 'support-annotations'
|
||||
})
|
||||
|
||||
implementation 'com.github.yausername:NewPipeExtractor:f97d5ab'
|
||||
implementation 'com.github.yausername:NewPipeExtractor:3dadf63'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.mockito:mockito-core:2.23.0'
|
||||
|
@ -100,6 +100,7 @@ import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.COMMENTS;
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
public class VideoDetailFragment
|
||||
@ -822,7 +823,10 @@ public class VideoDetailFragment
|
||||
|
||||
private boolean shouldShowComments() {
|
||||
try {
|
||||
return showComments && NewPipe.getService(serviceId).isCommentsSupported();
|
||||
return showComments && NewPipe.getService(serviceId)
|
||||
.getServiceInfo()
|
||||
.getMediaCapabilities()
|
||||
.contains(COMMENTS);
|
||||
} catch (ExtractionException e) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user