[PeerTube] Use final when possible, ide refactorings
This commit is contained in:
parent
fcb9b6f855
commit
06430c4749
|
@ -27,8 +27,7 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor
|
|||
|
||||
@Override
|
||||
public String getThumbnailUrl() throws ParsingException {
|
||||
final String value = JsonUtils.getString(item, "thumbnailPath");
|
||||
return baseUrl + value;
|
||||
return baseUrl + JsonUtils.getString(item, "thumbnailPath");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,7 +50,8 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor
|
|||
final String name = JsonUtils.getString(item, "account.name");
|
||||
final String host = JsonUtils.getString(item, "account.host");
|
||||
|
||||
return ServiceList.PeerTube.getChannelLHFactory().fromId("accounts/" + name + "@" + host, baseUrl).getUrl();
|
||||
return ServiceList.PeerTube.getChannelLHFactory()
|
||||
.fromId("accounts/" + name + "@" + host, baseUrl).getUrl();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,8 +24,7 @@ public class PeertubeChannelLinkHandlerFactory extends ListLinkHandlerFactory {
|
|||
|
||||
@Override
|
||||
public String getUrl(String id, List<String> contentFilters, String searchFilter) throws ParsingException {
|
||||
String baseUrl = ServiceList.PeerTube.getBaseUrl();
|
||||
return getUrl(id, contentFilters, searchFilter, baseUrl);
|
||||
return getUrl(id, contentFilters, searchFilter, ServiceList.PeerTube.getBaseUrl());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,8 +22,7 @@ public class PeertubeStreamLinkHandlerFactory extends LinkHandlerFactory {
|
|||
|
||||
@Override
|
||||
public String getUrl(String id) {
|
||||
String baseUrl = ServiceList.PeerTube.getBaseUrl();
|
||||
return getUrl(id, baseUrl);
|
||||
return getUrl(id, ServiceList.PeerTube.getBaseUrl());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue