From 0ab13c65f1fc96148b707c9eb906d11acbf51b97 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 29 Jan 2019 17:14:36 +0100 Subject: [PATCH] add node about empty content filter --- docs/02_Concept_of_LinkHandler.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/02_Concept_of_LinkHandler.md b/docs/02_Concept_of_LinkHandler.md index dba0a1a..75cf915 100644 --- a/docs/02_Concept_of_LinkHandler.md +++ b/docs/02_Concept_of_LinkHandler.md @@ -61,6 +61,8 @@ which is used to filter by resource type like stream or playlist, and [SortFilter](https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/linkhandler/ListLinkHandler.html#sortFilter) which is used to sort by name, date or view count. +__!!ATENTION!!__ Be careful when you implement content filter: No selected filter equals all filters selected. So if your get an empty content filter list in your extractor make sure you return everything. By means use if statements like this `contentFilter.contains("video") || contentFilter.isEmpty()`. + ListLinkHandler are also created by overriding the [ListLinkHandlerFactory](https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/linkhandler/ListLinkHandlerFactory.html) additionally to the abstract methods this factory inherits from the LinkHandlerFactory you can override [getAvailableContentFilter()](https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/linkhandler/ListLinkHandlerFactory.html#getAvailableContentFilter--)