Commit Graph

176 Commits

Author SHA1 Message Date
Isira Seneviratne ff60e05c76 Use Collections.singletonMap(). 2022-07-27 07:35:57 +05:30
AudricV 301a795ed3
[SoundCloud] Remove completely workaround for HLS streams
SoundCloud is currently removing this workaround completely, so there is no need to keep it, because it impacts the loading time (a HLS playlist was downloaded and parsed).
2022-06-16 12:12:54 +02:00
TiA4f8R 287d1dfd63
[SoundCloud] Use the HLS delivery method for all streams and extract only a single stream URL from HLS manifest for MP3 streams
SoundCloud broke the workaround used to get a single file from HLS manifests for Opus manifests, but it still works for MP3 ones.

The code has been adapted to prevent an unneeded request (the one to the Opus HLS manifest) and the HLS delivery method is now used for SoundCloud MP3 and Opus streams, plus the progressive one (for tracks which have a progressive stream (MP3) and for the ones which doesn't have one, it is still used by trying to get a progressive stream, using the workaround).

Streams extraction has been also moved to Java 8 Stream's API and the relevant test has been also updated.
2022-05-29 19:08:18 +02:00
TiA4f8R aa4c10e751
Improve documentation and adress most of the requested changes
Also fix some issues in several places, in the code and the documentation.
2022-05-28 12:00:46 +02:00
TiA4f8R 881969f1da
Apply changes in all StreamExtractors except YouTube's one and fix extraction of PeerTube audio streams as video streams
Some code in these classes has been also refactored/improved/optimized.
Also fix the extraction of PeerTube audio streams as video streams, which are now returned as audio streams.
2022-05-28 12:00:43 +02:00
Stypox 9dc17cd1ca [Soundcloud] Fix checkstyle issues 2022-03-26 19:40:20 +01:00
Stypox 638da1756c
[Mix] Create MultiInfoItemsCollector
It is a collector that can handle many extractor types, to be used when a list contains items of different types (e.g. search). It was renamed from InfoItemsSearchCollector so that it can now be used not just for search but for any extractor needing it. It supports, streams, channels, playlists and *mixes*.
2022-03-19 10:44:06 +01:00
litetex cc2e4d7104
Merge pull request #815 from litetex/fix-soundcloud-id-once-and-for-all
Removed hardcoded soundcloud HARDCODED_CLIENT_ID
2022-03-17 13:54:08 +01:00
TiA4f8R c7757c0994
Apply requested changes 2022-03-16 20:14:08 +01:00
TiA4f8R 58a247907e
Apply changes in all playlist extractors except YoutubePlaylistExtractor
Also fix some issues in the extractors, remove uneeded overrides, use the Java 8 Stream API where possible and replace usages of Utils.UTF_8 with StandardCharsets.UTF_8 in these classes.
2022-03-16 19:18:57 +01:00
litetex ba56be8ef1 Removed hardcoded soundcloud id
It never works (long enough) so let's simply remove it...
2022-03-15 21:19:19 +01:00
Tobi 0d6aebce25
[SoundCloud] Update clientId (#798) 2022-02-11 17:16:32 +01:00
litetex a579ef2651 Fixed Soundcloud tests 2022-01-07 14:27:24 +01:00
litetex 4291a90251 Fixed SoundCloud's search(for tests) 2021-12-27 21:42:43 +01:00
litetex 4995709871 Fixed SoundCloud's search(for tests)
Getting the initial page was not returning initial page
2021-12-27 21:18:39 +01:00
litetex 1e2e0029fc [StreamExtractor] Deduplicated a ton of code by using default methods 2021-12-27 16:54:45 +01:00
litetex f735788a39 Fixed Soundcloud hardcoded client id 2021-12-08 21:00:53 +01:00
opusforlife2 cb80a646d9
Update hardcoded SoundCloud client_id
Hah! I got here first, @TobiGr!
2021-11-04 15:28:26 +00:00
TobiGr d8ec3ce370 [SoundCloud] Update client id 2021-10-01 02:51:38 +02:00
FireMasterK a0c1dcc8d8
Remove throws parsing exception. 2021-09-02 16:14:45 +05:30
FireMasterK b9fad4fcc8
Extract Uploader's Avatar on YouTube. 2021-09-02 00:19:00 +05:30
TobiGr b644f1d67b [SoundCloud] Update client id 2021-08-31 07:42:21 +02:00
TobiGr 785ff4aa32 [SoundCloud] Fix hardcoded client id 2021-07-28 17:02:56 +02:00
TobiGr 1f9a99c931 [SoundCloud] Update HARDCODED_CLIENT_ID 2021-06-18 15:30:54 +02:00
TobiGr b70c0f93c7 Add streamPosition for comments
SoundCloud is the only service which supports adding comments at a specific timestamp in the stream.
2021-06-08 10:27:52 +02:00
litetex 8c96545e57 Merge branch 'TeamNewPipe:dev' into fix-broken-yt-liked-comments 2021-05-24 18:06:45 +02:00
TiA4f8R a00fdcbd3d
Format the indentation of the definition of the apiUrl string in SoundcloudParsingHelper.resolveFor method
Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
2021-05-23 20:27:45 +02:00
TiA4f8R 6b607eb38d
Update the hardcoded client_id 2021-05-23 18:08:44 +02:00
TiA4f8R 4552ea9c9f
Use the SOUNDCLOUD_API_V2_URL constant in all the SoundCloud package 2021-05-23 18:08:44 +02:00
TiA4f8R 86308d0603
Use a lightweight request to check if the client_id is valid
Request the api-v2 host with the client_id instead of checking if the streams of a SoundCloud track are not empty: if it is valid, the API returns 404, otherwise it should return 401.
2021-05-23 18:08:43 +02:00
TiA4f8R c5c190500c
Format the SoundCloud package of the extractor and fix some warnings
Use final where possible in the package and format code to be in the 100 caracters per line limit.
Fix some warnings generated by Android Studio and do some code improvements
2021-05-23 18:08:42 +02:00
litetex c3b837fe3b
Deduped code; Using default values... 2021-05-20 20:22:40 +02:00
litetex 10cf081145
Removed likeCount and added textualVoteCount 2021-05-20 20:10:14 +02:00
TobiGr 9c12dc5609 [SoundCloud] Fix SoundCloud ID extraction
resolveIdWithEmbedPlayer() does not work anymore because the JSON data has been extracted to an API call. For this reason, replace resolveIdWithEmbedPlayer() with resolveIdWithWidgetApi)( which performs the API call.
2021-04-26 17:58:34 +02:00
TobiGr 8f023c1ec7 [SoundCloud] Update client id 2021-04-26 15:14:11 +02:00
XiangRongLin 1925dcf4dc
Merge pull request #597 from fynngodau/related-items
Rename getRelatedStreams to getRelatedItems and change return type
2021-04-02 19:54:22 +02:00
Fynn Godau 14f6f1b7c3 Generify related streams calls and rename method 2021-03-31 20:24:40 +02:00
TobiGr 22bd16fca3 Make vars private, final and static 2021-03-30 10:07:20 +02:00
TobiGr 46eab1ec17 Remove declarations of exceptions which are not thrown from method signatures 2021-03-30 10:07:20 +02:00
TobiGr e4c40ae6d1 Use List.isEmpty() 2021-03-30 10:07:20 +02:00
bopol c47cc54908
Extract metadata for YouTube, SoundCloud & MediaCCC 2021-03-19 10:14:43 +01:00
TiA4f8R 379d7312fa
Don't use a regular expression to find the last segment URL and do code improvements
Apply suggestions provided in the PR and remove a redundant import.
2021-03-14 17:54:22 +01:00
TiA4f8R 0e3e420a25
Fix tests 2021-03-14 17:54:21 +01:00
TiA4f8R d61d9d116d
Refactor getAudioStreams method of SoundcloudStreamExtractor
Split the method into private methods, in order to have a better reading.
2021-03-14 17:54:20 +01:00
TiA4f8R a7b15b51e6
Change t to transcodingJsonObject in SoundcloudStreamExtractor 2021-03-14 17:54:19 +01:00
TiA4f8R 3bd08a2880
Adress requested changes and use final where possible in SoundcloudStreamExtractor
This commit moved the HLS parsing task to a separate method, did little performance improvements and used final where possible in the SoundcloudStreamExtractor file.
2021-03-14 17:54:17 +01:00
TiA4f8R cbacd3c0a5
Add a check to don't show MP3 128kbps stream twice and catch IOException when fetching the HLS Manifest
If a progressive stream is present in the transcodings, it's unnecessary to show twice an MP3 128kbps stream so if this is the case, the MP3 HLS stream will be not added to the audioStreams, else it will.
This commit also catch fetching errors in HLS manifests parsing and don't add the corresponding stream if an error occurs.
2021-03-14 17:54:16 +01:00
TiA4f8R 26f1b4e7dc
Support SoundCloud HLS by using a workaround
This commit tries to support SoundCloud HLS streams by parsing M3U manifests, get the last segment URL (in order to get track length) and request a segment URL equals to track's duration so it's a single URL.
2021-03-14 17:54:14 +01:00
TiA4f8R 3925204658
Add tests and rename SoundcloudGoPlusException to SoundcloudGoPlusContentException 2021-03-05 16:38:40 +01:00
TiA4f8R 35325d980d
Add GeographicRestrictionException and SoundCloudGoPlusException in NewPipe Extractor to be able to display different error messages
This commit adds two new exceptions in NewPipe Extractor: GeographicRestrictionException and SoundCloudGoPlusException (which extend to ContentNotAvailableException). These exceptions allow showing different error messages to user when a content isn't available in his/her/its country (only used for now by SoundCloudStreamExtractor) or when the content is a SoundCloud Go+ track.
2021-03-05 16:38:37 +01:00