Skip to content

Commit

Permalink
Whitespace nitfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raptor399 committed Jan 9, 2012
1 parent 1bde3b0 commit 287fc7a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
30 changes: 15 additions & 15 deletions src/main/java/net/pms/network/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,21 +227,21 @@ public void answer(OutputStream output, StartStopListenerDelegate startStopListe

if (subtitleHttpHeader != null && !"".equals(subtitleHttpHeader)) {
// Device allows a custom subtitle HTTP header; construct it
List<DLNAMediaSubtitle> subs = dlna.getMedia().getSubtitlesCodes();
if (subs != null && !subs.isEmpty()) {
DLNAMediaSubtitle sub = subs.get(0);
int type = sub.getType();
if (type < DLNAMediaSubtitle.subExtensions.length) {
String strType = DLNAMediaSubtitle.subExtensions[type - 1];
String subtitleUrl = "http://" + PMS.get().getServer().getHost()
+ ':' + PMS.get().getServer().getPort() + "/get/"
+ id + "/subtitle0000." + strType;
output(output, subtitleHttpHeader + ": " + subtitleUrl);
}
}
List<DLNAMediaSubtitle> subs = dlna.getMedia().getSubtitlesCodes();

if (subs != null && !subs.isEmpty()) {
DLNAMediaSubtitle sub = subs.get(0);

int type = sub.getType();

if (type < DLNAMediaSubtitle.subExtensions.length) {
String strType = DLNAMediaSubtitle.subExtensions[type - 1];
String subtitleUrl = "http://" + PMS.get().getServer().getHost()
+ ':' + PMS.get().getServer().getPort() + "/get/"
+ id + "/subtitle0000." + strType;
output(output, subtitleHttpHeader + ": " + subtitleUrl);
}
}
}

final DLNAMediaInfo media = dlna.getMedia();
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/net/pms/network/RequestV2.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,24 +317,24 @@ public ChannelFuture answer(

if (subtitleHttpHeader != null && !"".equals(subtitleHttpHeader)) {
// Device allows a custom subtitle HTTP header; construct it
List<DLNAMediaSubtitle> subs = dlna.getMedia().getSubtitlesCodes();
if (subs != null && !subs.isEmpty()) {
DLNAMediaSubtitle sub = subs.get(0);
int type = sub.getType();
if (type < DLNAMediaSubtitle.subExtensions.length) {
String strType = DLNAMediaSubtitle.subExtensions[type - 1];
String subtitleUrl = "http://" + PMS.get().getServer().getHost()
+ ':' + PMS.get().getServer().getPort() + "/get/"
+ id + "/subtitle0000." + strType;
output.setHeader(subtitleHttpHeader, subtitleUrl);
}
}
List<DLNAMediaSubtitle> subs = dlna.getMedia().getSubtitlesCodes();

if (subs != null && !subs.isEmpty()) {
DLNAMediaSubtitle sub = subs.get(0);

int type = sub.getType();

if (type < DLNAMediaSubtitle.subExtensions.length) {
String strType = DLNAMediaSubtitle.subExtensions[type - 1];
String subtitleUrl = "http://" + PMS.get().getServer().getHost()
+ ':' + PMS.get().getServer().getPort() + "/get/"
+ id + "/subtitle0000." + strType;
output.setHeader(subtitleHttpHeader, subtitleUrl);
}
}
}

String name = dlna.getDisplayName(mediaRenderer);
String name = dlna.getDisplayName(mediaRenderer);

if (inputStream == null) {
// No inputStream indicates that transcoding / remuxing probably crashed.
Expand Down

0 comments on commit 287fc7a

Please sign in to comment.