Add requested changes.

Co-authored-by: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com>
Add final.

Co-authored-by: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com>
This commit is contained in:
Kavin 2021-10-04 01:28:07 +01:00 committed by FireMaskterK
parent 94efe86c71
commit d1add05bc1
2 changed files with 6 additions and 4 deletions

View file

@ -293,11 +293,13 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
@Override
public String getShortDescription() throws ParsingException {
if(videoInfo.has("detailedMetadataSnippets"))
if (videoInfo.has("detailedMetadataSnippets")) {
return getTextFromObject(videoInfo.getArray("detailedMetadataSnippets").getObject(0).getObject("snippetText"));
}
if(videoInfo.has("descriptionSnippet"))
return getTextFromObject(videoInfo.getObject("descriptionSnippet"));
if (videoInfo.has("descriptionSnippet")) {
return getTextFromObject(videoInfo.getObject("descriptionSnippet"));
}
return null;
}

View file

@ -97,7 +97,7 @@ public class StreamInfoItem extends InfoItem {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
public void setShortDescription(final String shortDescription) {
this.shortDescription = shortDescription;
}