Commit Graph

1952 Commits

Author SHA1 Message Date
evermind 8280fd4a60
searchfilters: Test: adjust and extend YouTube tests 2023-12-30 10:31:14 +01:00
Stypox 019ef62760
searchfilters: Test: adjust Bandcamp tests 2023-12-30 10:31:14 +01:00
evermind 1fc0fc79cc
searchfilters: Test: adjust MediaCCC tests 2023-12-30 10:31:14 +01:00
Stypox 4a8b7f6103
Fix soundcloud tests 2023-12-30 10:31:13 +01:00
evermind 43479ab0ae
searchfilters: Test: adjust SoundCloud tests 2023-12-30 10:31:13 +01:00
Stypox c6b335c20f
Fix peertube tests 2023-12-30 10:31:13 +01:00
evermind e06fac6ef3
searchfilters: Test: adjust PeerTube tests 2023-12-30 10:31:13 +01:00
Stypox 49c354598e
Fix base tests 2023-12-30 10:31:13 +01:00
evermind d7b043059c
searchfilters: added common helper methods for .*SearchExtractorTest's 2023-12-30 10:31:13 +01:00
evermind af1f1de36d
bandcamp: remove limit page.size as statement seems no longer true
Without that code the search results will complete and the gui will not
spin forever.
2023-12-30 10:31:13 +01:00
Stypox ec19719641
[YouTube] 2023-12-30 10:31:13 +01:00
Stypox 0a4b88955a
searchfilters: convert youtube to new framework
Available content filters:
    Youtube
    - all
    - videos
    - channels
    - playlists
    Youtube Music
    - Songs
    - Videos
    - Albums
    - Playlists
    - Artists

    Available sort filters:
    - 'Sort by'
    - Upload Date
    - Duration
    - Features
2023-12-30 10:31:13 +01:00
Stypox 8568f196ec
[Bandcamp] 2023-12-30 09:09:42 +01:00
evermind debb7760cd
searchfilters: convert bandcamp to new framework
Available content filters:
- All
- artists & labels
- albums
- tracks
2023-12-30 09:09:13 +01:00
evermind e084338a0f
searchfilters: convert media_ccc to new framework
Available content filters:
- All
- Conferences
- Events
2023-12-30 09:07:40 +01:00
evermind d1bf446f1c
searchfilters: Make SoundcloudSearchQueryHandlerFactory singleton 2023-12-30 09:07:39 +01:00
evermind 17320ef44e
searchfilters: Soundcloud give empty page if no more results 2023-12-30 09:07:39 +01:00
Stypox a043cbdc49
[SoundCloud] 2023-12-30 09:07:39 +01:00
evermind f484f20100
searchfilters: convert Soundcloud to use new framework
Available content filters:
- All
- Tracks
- Users
- Playlists

Available sort filters:
- 'Sort by'
- Length
- license
2023-12-30 09:07:39 +01:00
Stypox c7ef8a9e68
[PeerTube] 2023-12-30 09:07:39 +01:00
evermind 9e75344611
searchfilters: convert Peertube to new framework
Available content filters:
- All
- Videos
- Channels
- Playlists
Sepia
- SepiaSearch

Available sort filters:
- 'Sort by'
- stream kind
- sensitive
- 'Date'
- 'Duration'
2023-12-30 09:07:35 +01:00
Stypox 1dc746a599
Changes due to channel tabs 2023-12-29 19:19:11 +01:00
evermind b8eb1212a8
searchfilters: convert core components to new framework 2023-12-29 19:08:26 +01:00
evermind 3956e22c8e
merge later ../extractor/src/main/java/org/schabi/newpipe/extractor/search/filter/FilterGroup.java 2023-12-29 19:08:26 +01:00
Stypox 8409215ce2
equals hashCode to FilterItem 2023-12-29 19:08:26 +01:00
evermind 3398a54908
searchfilters: a framework to create sort and content filter objects
FilterContainer.java:
=====================
This class is a container that keeps either content filters or sort filters organized.
Sort/content filters ({@link FilterItem}s) are organized within {@link FilterGroup}s.

FilterGroup.java:
=================
This class represents a filter category/group. For example 'Sort order'.

Its main purpose is to host a bunch of {@link FilterItem}s that belong to that
group. Eg. 'Relevance', 'Views', 'Rating'

FilterItem.java:
================
This class represents a single filter option.
*More in detail:*
For example youtube offers the filter group 'Sort order'. This group
consists of filter options like 'Relevance', 'Views', 'Rating' etc.
-> for each filter option a FilterItem has to be created.

BaseSearchFilters.java:
=======================
The base class for every service describing their {@link FilterItem}s,
{@link FilterGroup}s, the relation between content filters and sort filters.
2023-12-29 17:22:34 +01:00
TobiGr 9ab932e394 Rename testDoNotAcceptNonURLs() -> assertDoNotAcceptNonURLs() 2023-12-29 16:38:11 +01:00
TobiGr 61d237de02 [PeerTube] Test onAccept(String URL) in LinkHandlerFactories for non-URLs 2023-12-29 12:45:02 +01:00
petlyh 2b2c1546d1 Avoid PeerTube accepting non-URLs 2023-12-29 12:27:39 +01:00
Tobi 1e93b1dc20
Merge pull request #1135 from Stypox/yt-emergency-info
[YouTube] Implement emergency meta info
2023-12-29 12:01:40 +01:00
TobiGr 8f9ebdcb77 [PeerTube] Fix failing PeertubeTrendingLinkHandlerFactoryTest
The factory was updated in #1144
2023-12-29 11:52:19 +01:00
Stypox 1553931027
Merge pull request #1145 from TeamNewPipe/dependabot/gradle/org.jsoup-jsoup-1.17.2
Bump org.jsoup:jsoup from 1.16.2 to 1.17.2
2023-12-29 11:27:01 +01:00
dependabot[bot] 151ee99da3
Bump org.jsoup:jsoup from 1.16.2 to 1.17.2
Bumps [org.jsoup:jsoup](https://github.com/jhy/jsoup) from 1.16.2 to 1.17.2.
- [Release notes](https://github.com/jhy/jsoup/releases)
- [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES.md)
- [Commits](https://github.com/jhy/jsoup/compare/jsoup-1.16.2...jsoup-1.17.2)

---
updated-dependencies:
- dependency-name: org.jsoup:jsoup
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 09:47:00 +00:00
dragfyre 65e7bc5b95
Update PeertubeTrendingLinkHandlerFactory.java
correcting Peertube local trending api URL (per #10685 in main NewPipe repo); see https://docs.joinpeertube.org/api-rest-reference.html#tag/Video/operation/getVideos
2023-12-28 14:50:31 +07:00
Stypox fc54fb2fdb
Merge pull request #1140 from Stypox/yt-shorts-no-duration
[YouTube] Always return -1 as duration of Shorts returned inside reel items
2023-12-21 21:52:40 +01:00
Stypox 0518487d26
Fix SearchInfo's non-null MetaInfo being null when initialized or when an extraction error occurs (#1141)
The meta info might have been null either when SearchInfo is first initialized, or when extractor.getMetaInfo() throws an exception in getInfo().
This caused NewPipe to crash instead of showing a nice error in https://www.reddit.com/r/youtube/comments/184ttmw/what_exactly_about_blue_whales_has_youtube_so/.
2023-12-21 21:39:25 +01:00
Stypox 5b59a1a8c5
[YouTube] Move meta info extraction to separate file
YoutubeParsingHelper was longer than 2000 lines which caused checkstyle issues
2023-12-21 21:19:08 +01:00
Stypox b8e12dd76c
[YouTube] Implement emergency meta info
YouTube provides that meta info panel when users search for really sensitive content like suicide (e.g. "blue whale").

It contains:
- an encouragement as title (e.g. "We are with you")
- a phone number as action
- details about how to call the phone number (e.g. availability)
- an url pointing to the website of an association

Also add a test that just checks if a meta info is properly extracted
2023-12-21 21:19:08 +01:00
Stypox 83c1737f70
[YouTube] Update shorts channel tab mocks 2023-12-21 20:54:16 +01:00
Stypox 2938067c2c
[YouTube] Shorts don't provide a duration anymore 2023-12-21 20:41:01 +01:00
AudricV ec0194cfbf
[YouTube] Update mocks 2023-12-08 21:46:52 +01:00
AudricV 00a0f1a103
[YouTube] Add a blocking crisis resources bypass in search results test
This test only tests that search results are returned, when no content filters
are provided and crisis resources blocking search results should be returned.

Searches with blocking crisis resources and content filters should work too, as
the bypass has been implemented for them.
2023-12-08 21:46:49 +01:00
AudricV 06838d7245
[YouTube] Fix YoutubeSearchQHTest tests
As search parameters to bypass crisis resources blocking search results have
been implemented, they need to be added to search tests, in order to pass
them.
2023-12-08 21:46:49 +01:00
AudricV 642bb01388
[YouTube] Fix testSubscriberCount method of YoutubeChannelExtractorTest.CarouselHeader
The subscriber count is now lower than the expected count as some people
unsubscribed to the Sports system channel. The expected count has been so
lowered.
2023-12-08 21:46:49 +01:00
AudricV bedc9e5bc0
[YouTube] Remove Channels channel tab in tests 2023-12-08 21:46:48 +01:00
AudricV 5fa22ae25b
[YouTube] Enable and change testRelatedItems method of YoutubePlaylistExtractorTest.LearningPlaylist
This change makes the method test whether there is no more items instead of
being disabled.
2023-12-08 21:46:48 +01:00
AudricV 29dc7625f2
[YouTube] Fix YoutubeSearchExtractorTest.Suggestion
YouTube doesn't return anymore a suggestion for the query "algorythm", but does
for the query "on board ing" ("on boarding"). This search query is now used and
had to be URL-encoded.

URL encoding in the complete YoutubeSearchExtractorTest test class uses now
extractor's Util class instead of Java's URLDecoder class directly.
2023-12-08 21:46:48 +01:00
AudricV 56ab35423e
[YouTube] Fix potential NullPointerException in YoutubeSearchExtractor.getSearchSuggestion 2023-12-08 21:46:48 +01:00
AudricV 9dc1eab28c
[YouTube] Fix expected upload dates of StreamExtractor tests
YouTube is rolling out or A/B testing a new date format returned inside player
responses, which are precise to the second instead of the day.

This commit makes the StreamExtractor tests use these more precise dates.
2023-12-08 21:46:48 +01:00
AudricV ad3d187ac7
[YouTube] Fix testRelatedItems method of YoutubeStreamExtractorRelatedMixTest
This commit fixes the testRelatedItems test method by:
- accepting consent in the test class, in order to extract mixes in
recommendations;
- removing assertion of a music mix inside the recommendations, as YouTube
doesn't seem to return such mixes anymore, at least for the video used in the
test class.
2023-12-08 21:46:47 +01:00