Skip to content

Commit ec3e837

Browse files
authored
Merge pull request #1171 from TeamNewPipe/fix/jdoc
Fix JavaDocs and add Checkstyle exception for line length in JavaDocs' links
2 parents 8d2a7a5 + 7c29dbc commit ec3e837

10 files changed

Lines changed: 79 additions & 86 deletions

File tree

checkstyle/checkstyle.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
<module name="LineLength">
3939
<property name="max" value="100"/>
4040
<property name="fileExtensions" value="java"/>
41+
<!-- Also allow links in javadocs to be longer (the default would just cover imports) -->
42+
<property name="ignorePattern" value="^((package|import) .*)|( *\* (@see )?&lt;a href ?\= ?&quot;.*&quot;&gt;)$"/>
4143
</module>
4244

4345
<!-- Checks for whitespace -->

extractor/src/main/java/org/schabi/newpipe/extractor/MediaFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public enum MediaFormat {
5151
WEBMA_OPUS(0x200, "WebM Opus", "webm", "audio/webm"),
5252
AIFF (0x600, "AIFF", "aiff", "audio/aiff"),
5353
/**
54-
* Same as {@link MediaFormat.AIFF}, just with the shorter suffix/file extension
54+
* Same as {@link MediaFormat#AIFF}, just with the shorter suffix/file extension
5555
*/
5656
AIF (0x600, "AIFF", "aif", "audio/aiff"),
5757
WAV (0x700, "WAV", "wav", "audio/wav"),

extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/ReadyChannelTabListLinkHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* return ((ReadyChannelTabListLinkHandler) linkHandler).getChannelTabExtractor(this);
2828
* }
2929
* </pre>
30-
* </p>
3130
*/
3231
public class ReadyChannelTabListLinkHandler extends ListLinkHandler {
3332

extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ public static String getStreamUrlFromIds(final long bandId,
111111

112112
/**
113113
* Fetch artist details from mobile endpoint.
114-
* <a href="https://notabug.org/fynngodau/bandcampDirect/wiki/
115-
* rewindBandcamp+%E2%80%93+Fetching+artist+details">
114+
* <a href="https://notabug.org/fynngodau/bandcampDirect/wiki/rewindBandcamp+%E2%80%93+Fetching+artist+details">
116115
* More technical info.</a>
117116
*/
118117
public static JsonObject getArtistDetails(final String id) throws ParsingException {

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/dashmanifestcreators/YoutubeDashManifestCreatorsUtils.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public static void setAttribute(final Element element,
119119
/**
120120
* Generate a {@link Document} with common manifest creator elements added to it.
121121
*
122-
* <p>
122+
* <br>
123123
* Those are:
124124
* <ul>
125125
* <li>{@code MPD} (using {@link #generateDocumentAndMpdElement(long)});</li>
@@ -132,7 +132,7 @@ public static void setAttribute(final Element element,
132132
* <li>and, for audio streams, {@code AudioChannelConfiguration} (using
133133
* {@link #generateAudioChannelConfigurationElement(Document, ItagItem)}).</li>
134134
* </ul>
135-
* </p>
135+
*
136136
*
137137
* @param itagItem the {@link ItagItem} associated to the stream, which must not be null
138138
* @param streamDuration the duration of the stream, in milliseconds
@@ -494,7 +494,6 @@ public static String buildAndCacheResult(
494494
* This method is only used when generating DASH manifests from OTF and post-live-DVR streams.
495495
* </p>
496496
*
497-
* <p>
498497
* It will produce a {@code <SegmentTemplate>} element with the following attributes:
499498
* <ul>
500499
* <li>{@code startNumber}, which takes the value {@code 0} for post-live-DVR streams and
@@ -505,7 +504,6 @@ public static String buildAndCacheResult(
505504
* <li>{@code initialization} (only for OTF streams), which is the base URL of the stream
506505
* on which is appended {@link #SQ_0}.</li>
507506
* </ul>
508-
* </p>
509507
*
510508
* <p>
511509
* The {@code <Representation>} element needs to be generated before this element with
@@ -578,8 +576,8 @@ public static void generateSegmentTimelineElement(@Nonnull final Document doc)
578576

579577
/**
580578
* Get the "initialization" {@link Response response} of a stream.
581-
*
582-
* <p>This method fetches, for OTF streams and for post-live-DVR streams:
579+
* <br>
580+
* This method fetches, for OTF streams and for post-live-DVR streams:
583581
* <ul>
584582
* <li>the base URL of the stream, to which are appended {@link #SQ_0} and
585583
* {@link #RN_0} parameters, with a {@code GET} request for streaming URLs from HTML5
@@ -588,7 +586,6 @@ public static void generateSegmentTimelineElement(@Nonnull final Document doc)
588586
* <li>for streaming URLs from HTML5 clients, the {@link #ALR_YES} param is also added.
589587
* </li>
590588
* </ul>
591-
* </p>
592589
*
593590
* @param baseStreamingUrl the base URL of the stream, which must not be null
594591
* @param itagItem the {@link ItagItem} of stream, which must not be null

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/dashmanifestcreators/YoutubeOtfDashManifestCreator.java

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -53,38 +53,37 @@ private YoutubeOtfDashManifestCreator() {
5353
* livestreams which have just been re-encoded as normal videos.
5454
* </p>
5555
*
56-
* <p>This method needs:
57-
* <ul>
58-
* <li>the base URL of the stream (which, if you try to access to it, returns HTTP
59-
* status code 404 after redirects, and if the URL is valid);</li>
60-
* <li>an {@link ItagItem}, which needs to contain the following information:
61-
* <ul>
62-
* <li>its type (see {@link ItagItem.ItagType}), to identify if the content is
63-
* an audio or a video stream;</li>
64-
* <li>its bitrate;</li>
65-
* <li>its mime type;</li>
66-
* <li>its codec(s);</li>
67-
* <li>for an audio stream: its audio channels;</li>
68-
* <li>for a video stream: its width and height.</li>
69-
* </ul>
70-
* </li>
71-
* <li>the duration of the video, which will be used if the duration could not be
72-
* parsed from the first sequence of the stream.</li>
73-
* </ul>
74-
* </p>
56+
* This method needs:
57+
* <ul>
58+
* <li>the base URL of the stream (which, if you try to access to it, returns HTTP
59+
* status code 404 after redirects, and if the URL is valid);</li>
60+
* <li>an {@link ItagItem}, which needs to contain the following information:
61+
* <ul>
62+
* <li>its type (see {@link ItagItem.ItagType}), to identify if the content is
63+
* an audio or a video stream;</li>
64+
* <li>its bitrate;</li>
65+
* <li>its mime type;</li>
66+
* <li>its codec(s);</li>
67+
* <li>for an audio stream: its audio channels;</li>
68+
* <li>for a video stream: its width and height.</li>
69+
* </ul>
70+
* </li>
71+
* <li>the duration of the video, which will be used if the duration could not be
72+
* parsed from the first sequence of the stream.</li>
73+
* </ul>
74+
*
75+
* In order to generate the DASH manifest, this method will:
76+
* <ul>
77+
* <li>request the first sequence of the stream (the base URL on which the first
78+
* sequence parameter is appended (see {@link YoutubeDashManifestCreatorsUtils#SQ_0}))
79+
* with a {@code POST} or {@code GET} request (depending of the client on which the
80+
* streaming URL comes from is a mobile one ({@code POST}) or not ({@code GET}));</li>
81+
* <li>follow its redirection(s), if any;</li>
82+
* <li>save the last URL, remove the first sequence parameter;</li>
83+
* <li>use the information provided in the {@link ItagItem} to generate all
84+
* elements of the DASH manifest.</li>
85+
* </ul>
7586
*
76-
* <p>In order to generate the DASH manifest, this method will:
77-
* <ul>
78-
* <li>request the first sequence of the stream (the base URL on which the first
79-
* sequence parameter is appended (see {@link YoutubeDashManifestCreatorsUtils#SQ_0}))
80-
* with a {@code POST} or {@code GET} request (depending of the client on which the
81-
* streaming URL comes from is a mobile one ({@code POST}) or not ({@code GET}));</li>
82-
* <li>follow its redirection(s), if any;</li>
83-
* <li>save the last URL, remove the first sequence parameter;</li>
84-
* <li>use the information provided in the {@link ItagItem} to generate all
85-
* elements of the DASH manifest.</li>
86-
* </ul>
87-
* </p>
8887
*
8988
* <p>
9089
* If the duration cannot be extracted, the {@code durationSecondsFallback} value will be used

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/dashmanifestcreators/YoutubePostLiveStreamDvrDashManifestCreator.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@ private YoutubePostLiveStreamDvrDashManifestCreator() {
5656
* the time)
5757
* </p>
5858
*
59-
* <p>This method needs:
60-
* <ul>
61-
* <li>the base URL of the stream (which, if you try to access to it, returns HTTP
62-
* status code 404 after redirects, and if the URL is valid);</li>
63-
* <li>an {@link ItagItem}, which needs to contain the following information:
64-
* <ul>
65-
* <li>its type (see {@link ItagItem.ItagType}), to identify if the content is
66-
* an audio or a video stream;</li>
67-
* <li>its bitrate;</li>
68-
* <li>its mime type;</li>
69-
* <li>its codec(s);</li>
70-
* <li>for an audio stream: its audio channels;</li>
71-
* <li>for a video stream: its width and height.</li>
72-
* </ul>
73-
* </li>
74-
* <li>the duration of the video, which will be used if the duration could not be
75-
* parsed from the first sequence of the stream.</li>
76-
* </ul>
77-
* </p>
59+
* This method needs:
60+
* <ul>
61+
* <li>the base URL of the stream (which, if you try to access to it, returns HTTP
62+
* status code 404 after redirects, and if the URL is valid);</li>
63+
* <li>an {@link ItagItem}, which needs to contain the following information:
64+
* <ul>
65+
* <li>its type (see {@link ItagItem.ItagType}), to identify if the content is
66+
* an audio or a video stream;</li>
67+
* <li>its bitrate;</li>
68+
* <li>its mime type;</li>
69+
* <li>its codec(s);</li>
70+
* <li>for an audio stream: its audio channels;</li>
71+
* <li>for a video stream: its width and height.</li>
72+
* </ul>
73+
* </li>
74+
* <li>the duration of the video, which will be used if the duration could not be
75+
* parsed from the first sequence of the stream.</li>
76+
* </ul>
77+
*
7878
*
7979
* <p>In order to generate the DASH manifest, this method will:
8080
* <ul>

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/dashmanifestcreators/YoutubeProgressiveDashManifestCreator.java

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,25 @@ private YoutubeProgressiveDashManifestCreator() {
4747
* YouTube partner, and on videos with a large number of views.
4848
* </p>
4949
*
50-
* <p>This method needs:
51-
* <ul>
52-
* <li>the base URL of the stream (which, if you try to access to it, returns the whole
53-
* stream, after redirects, and if the URL is valid);</li>
54-
* <li>an {@link ItagItem}, which needs to contain the following information:
55-
* <ul>
56-
* <li>its type (see {@link ItagItem.ItagType}), to identify if the content is
57-
* an audio or a video stream;</li>
58-
* <li>its bitrate;</li>
59-
* <li>its mime type;</li>
60-
* <li>its codec(s);</li>
61-
* <li>for an audio stream: its audio channels;</li>
62-
* <li>for a video stream: its width and height.</li>
63-
* </ul>
64-
* </li>
65-
* <li>the duration of the video (parameter {@code durationSecondsFallback}), which
66-
* will be used as the stream duration if the duration could not be parsed from the
67-
* {@link ItagItem}.</li>
68-
* </ul>
69-
* </p>
50+
* This method needs:
51+
* <ul>
52+
* <li>the base URL of the stream (which, if you try to access to it, returns the whole
53+
* stream, after redirects, and if the URL is valid);</li>
54+
* <li>an {@link ItagItem}, which needs to contain the following information:
55+
* <ul>
56+
* <li>its type (see {@link ItagItem.ItagType}), to identify if the content is
57+
* an audio or a video stream;</li>
58+
* <li>its bitrate;</li>
59+
* <li>its mime type;</li>
60+
* <li>its codec(s);</li>
61+
* <li>for an audio stream: its audio channels;</li>
62+
* <li>for a video stream: its width and height.</li>
63+
* </ul>
64+
* </li>
65+
* <li>the duration of the video (parameter {@code durationSecondsFallback}), which
66+
* will be used as the stream duration if the duration could not be parsed from the
67+
* {@link ItagItem}.</li>
68+
* </ul>
7069
*
7170
* @param progressiveStreamingBaseUrl the base URL of the progressive stream, which must not be
7271
* null

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/ItagInfo.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
/**
99
* Class to build easier {@link org.schabi.newpipe.extractor.stream.Stream}s for
1010
* {@link YoutubeStreamExtractor}.
11-
*
12-
* <p>
11+
* <br>
1312
* It stores, per stream:
1413
* <ul>
1514
* <li>its content (the URL/the base URL of streams);</li>
1615
* <li>whether its content is the URL the content itself or the base URL;</li>
1716
* <li>its associated {@link ItagItem}.</li>
1817
* </ul>
19-
* </p>
2018
*/
2119
final class ItagInfo implements Serializable {
2220
@Nonnull

extractor/src/main/java/org/schabi/newpipe/extractor/stream/DeliveryMethod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public enum DeliveryMethod {
3434
/**
3535
* Used for {@link Stream}s served using the SmoothStreaming adaptive streaming method.
3636
*
37-
* @see <a href="https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming
38-
* #Microsoft_Smooth_Streaming_(MSS)">Wikipedia's page about adaptive bitrate streaming,
37+
* @see <a href="https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming#Microsoft_Smooth_Streaming_(MSS)">
38+
* Wikipedia's page about adaptive bitrate streaming,
3939
* section <i>Microsoft Smooth Streaming (MSS)</i></a> for more information about the
4040
* SmoothStreaming delivery method
4141
*/

0 commit comments

Comments
 (0)