Commit graph

350 commits

Author SHA1 Message Date
XiangRongLin
88e4c8667b Add comments to RecordingDownloader about usage 2021-01-17 19:53:20 +01:00
XiangRongLin
eecfe09f2c Check for non-existent folder in MockDownloader 2021-01-17 19:52:58 +01:00
XiangRongLin
6888e7773f Ignore all failing tests 2021-01-15 20:11:40 +01:00
Stypox
7c774c84ce
Merge pull request #505 from TeamNewPipe/meida.ccc.de_search_fix
[media.ccc.de] Fix NPE in search results if they contain a future talk
2021-01-15 14:16:59 +01:00
Stypox
c2c4d97efd
Merge pull request #482 from XiangRongLin/mock_mix_pl_test
Mock mix pl tests
2021-01-15 12:54:48 +01:00
Tobias Groza
cc51c5f6a3
Merge pull request #507 from vkay94/add-interval-to-stream-frames
Add durationPerFrame to Frameset
2021-01-14 20:27:40 +01:00
vkay94
11dcfe638b Add durationPerFrame to Frameset and getFrameBoundsAt method 2021-01-14 20:01:06 +01:00
Tobias Groza
c2ff6723d7
Merge pull request #511 from B0pol/errors
Fix PeerTube tests by changing instance
2021-01-14 19:15:22 +01:00
XiangRongLin
4af50c6870 Use @link for downloader 2021-01-12 09:41:57 +01:00
XiangRongLin
3455f0f23c Add documentation to testing with mocks 2021-01-12 09:37:48 +01:00
5292cc1636 [peertube] test: remove usage of peertube.mastodon.host
It's down for months
2021-01-11 19:46:27 +01:00
f3c22da618 comments: add heartedByCreator and extract it for youtube 2021-01-11 18:48:08 +01:00
XiangRongLin
63c237db41 Only create directories if they do not exist 2021-01-11 07:57:11 +01:00
XiangRongLin
e82cb1efea Remove dependency to commons-io 2021-01-10 20:50:38 +01:00
XiangRongLin
1ea6c6ce54 Prefix mock file from RecordingDownloader with "generated_mock_"
Only read those files in MockDownloader
2021-01-10 20:46:42 +01:00
XiangRongLin
f91916c017 Remove unnecessary file object creation 2021-01-10 20:39:22 +01:00
XiangRongLin
255c726f20 Add resource path base to DownloaderFactory 2021-01-10 20:27:34 +01:00
XiangRongLin
35e299759e Add method to allow resetting youtube client version and key
This is needed so that a request is made for each test class when running multiple at once. This way RecordingDownloader records all necessary requests.
This works as long as tests are run sequentially and not in parallel.
2021-01-10 20:24:50 +01:00
XiangRongLin
f447a7a450 fix import due to downloader package move 2021-01-10 19:49:14 +01:00
XiangRongLin
285c26eafa Adjust YoutubeMixPlaylistExtractorTest to use DownloaderFactory 2021-01-10 19:38:41 +01:00
XiangRongLin
e6e8e39def Add DownloaderFactory to return a specific downloader based on 2 variables.
If the system property 'downloader' is set that use that specific downloader. This is used from gradle by appending `-Ddownloader=ABCD to the command.
ABCD is one of DownloaderType.
The other variable is the static property `DEFAULT_DOWNLOADER` in DownloaderFactory, which can be easily changed as needed inside the IDE according to development needs`.

Normal workflow would be to first use the recording downloader and afterwards only use mocks, if the requests are always staying the same.
2021-01-10 19:36:24 +01:00
XiangRongLin
7c40fb8bf7 Add additional downloader implementations
RecordingDownloader relies on the real downloader and saves the request/response pair into a json file.
MockDownloader uses json files from above and mocks responses for specific requests.
2021-01-10 19:36:24 +01:00
XiangRongLin
4dad3d60d6 Move DownloaderTestImpl into downloader package 2021-01-10 19:36:21 +01:00
Tobias Groza
ab62464e86
Merge pull request #495 from B0pol/sepiasearch
[PeerTube] Implement sepia search
2021-01-06 11:06:36 +01:00
TobiGr
2cbc3ccb1a [media.ccc.de] Fix live stream test if there are no current live streams 2020-12-31 17:03:23 +01:00
TobiGr
80f4d42226 [Draft] Add live extractor 2020-12-27 11:01:22 +01:00
TobiGr
090dade5b3 [media.ccc.de] Add short test for recent kiosk 2020-12-27 01:03:08 +01:00
TobiGr
b2154c6e87 [media.ccc.de] Fix conferences kiosk test 2020-12-25 23:55:45 +01:00
3ae924a7f1 Implement sepia search 2020-12-23 15:07:55 +01:00
TobiGr
41a8ed625d Make some vars final and add annotations to methods 2020-12-22 18:19:26 +01:00
TobiGr
bc6de14952 Extract stream and search meta info for YouTube
Add method to extract Google webcache URLs.
2020-12-22 18:19:26 +01:00
Tobias Groza
22a415156f
Merge pull request #479 from vkay94/stream-segments
Extract stream segments for YouTube
2020-12-19 11:12:22 +01:00
XiangRongLin
cdcb66b93e Clean up stuff from mix pl
Coming from unclean merge and missing hints from IDE
2020-12-16 08:35:28 +01:00
Xiang Rong Lin
a338e4e08e [Youtube] Apply review suggestions and avoid channel mix edge case 2020-12-12 20:32:43 +01:00
Xiang Rong Lin
22d2f7e400 [Youtube] Add cookies to youtube mix request
This way youtube wont return duplicates when getting more items of the mix (but youtube can also track us)
2020-12-12 20:32:40 +01:00
Xiang Rong Lin
3ff8619bcc [Youtube] apply wb9688 suggestion (mix)
Channel mix adjusments and test
Don't accept youtube music mix urls as playlist
Don't override playlistData to keep getInitialPage()
Remove json constants
Indentation
2020-12-12 20:30:57 +01:00
Xiang Rong Lin
822cf307f7 [Youtube] Add _ITEMS constants and improve code style
Move thumbnail id exctraction code to getThumbnailUrlFromId
Add test for "My mix" detection to service tests
Use ITEM_COUNT_UNKNOWN everywhere instead of -1 and add some tests
2020-12-12 20:30:57 +01:00
Xiang Rong Lin
df38b1926c [Youtube] Add tests and take thumbnail image always from first video of mix
Also fix getThumbnailUrl for "My Mix"
2020-12-12 20:30:57 +01:00
vkay94
9a7a224a54 Add tests for stream segments 2020-12-12 10:24:55 +01:00
Tobias Groza
650f0920fe
Merge pull request #465 from XiangRongLin/playlist_continuation
[YouTube] Fix playlist continuations extraction
2020-11-20 20:48:20 +01:00
TobiGr
334e1e9b53 Fix YouTube comments test 2020-11-20 19:53:53 +01:00
XiangRongLin
5bceff0083 [YouTube] Fix extraction of next page url for the last page of playlist 2020-11-18 19:03:12 +01:00
XiangRongLin
8347e14952 [YouTube] Fix playlist continuations extraction 2020-11-17 21:04:53 +01:00
Stypox
89a77ae74a
[YouTube] Fix detection of ended livestreams and parse livestream upload date 2020-11-04 16:03:08 +01:00
Stypox
827f7bd137
[YouTube] Cache deobfuscation and improve requests made
Fix age restriction extraction
Automatically fixes more things
2020-11-04 16:02:12 +01:00
Tobias Groza
b13c7e1c1e
Merge pull request #452 from Stypox/yt-import
Implement YouTube subscription import from Google takeout
2020-11-03 20:32:17 +01:00
345e136f6c create YouTubeCommentsLinkHandlerFactoryTest
and remove invidious test from YouTubeCommentsExtractorTest, because it was just testing if the URL is accepted, then the extractor does the same thing, we don't need to test the same thing twice
2020-11-03 19:10:10 +01:00
Stypox
501ec30152
Implement youtube subscription import from Google takeout 2020-11-02 11:04:48 +01:00
Stypox
2f02c0e6a4
Merge pull request #450 from B0pol/fileutils
create FileUtils
2020-11-01 18:13:57 +01:00
f69b3ef05d create FileUtils 2020-11-01 17:15:34 +01:00