[PeerTube] Use final when possible, ide refactorings

This commit is contained in:
Stypox 2020-04-11 17:17:47 +02:00
parent fcb9b6f855
commit 06430c4749
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
3 changed files with 5 additions and 7 deletions

View File

@ -27,8 +27,7 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor
@Override @Override
public String getThumbnailUrl() throws ParsingException { public String getThumbnailUrl() throws ParsingException {
final String value = JsonUtils.getString(item, "thumbnailPath"); return baseUrl + JsonUtils.getString(item, "thumbnailPath");
return baseUrl + value;
} }
@Override @Override
@ -51,7 +50,8 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor
final String name = JsonUtils.getString(item, "account.name"); final String name = JsonUtils.getString(item, "account.name");
final String host = JsonUtils.getString(item, "account.host"); 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 @Override

View File

@ -24,8 +24,7 @@ public class PeertubeChannelLinkHandlerFactory extends ListLinkHandlerFactory {
@Override @Override
public String getUrl(String id, List<String> contentFilters, String searchFilter) throws ParsingException { public String getUrl(String id, List<String> contentFilters, String searchFilter) throws ParsingException {
String baseUrl = ServiceList.PeerTube.getBaseUrl(); return getUrl(id, contentFilters, searchFilter, ServiceList.PeerTube.getBaseUrl());
return getUrl(id, contentFilters, searchFilter, baseUrl);
} }
@Override @Override

View File

@ -22,8 +22,7 @@ public class PeertubeStreamLinkHandlerFactory extends LinkHandlerFactory {
@Override @Override
public String getUrl(String id) { public String getUrl(String id) {
String baseUrl = ServiceList.PeerTube.getBaseUrl(); return getUrl(id, ServiceList.PeerTube.getBaseUrl());
return getUrl(id, baseUrl);
} }
@Override @Override