From 6919cb8806db7d69a10beccfd2bec2246ebe712d Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 29 Mar 2012 05:28:09 +0000 Subject: [PATCH] * use XMBC compatible S00=special naming scheme by default --- .../filebot/web/EpisodeFormat.java | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/source/net/sourceforge/filebot/web/EpisodeFormat.java b/source/net/sourceforge/filebot/web/EpisodeFormat.java index 1b21e005..34120372 100644 --- a/source/net/sourceforge/filebot/web/EpisodeFormat.java +++ b/source/net/sourceforge/filebot/web/EpisodeFormat.java @@ -74,14 +74,12 @@ public class EpisodeFormat extends Format { StringBuilder sb = new StringBuilder(); - if (episode.getSeason() != null) { - sb.append(episode.getSeason()).append('x'); + if (episode.getSeason() != null || episode.getSpecial() != null) { + sb.append(episode.getSpecial() == null ? episode.getSeason() : 0).append('x'); } - if (episode.getEpisode() != null) { - sb.append(String.format("%02d", episode.getEpisode())); - } else if (includeSpecial && episode.getSpecial() != null) { - sb.append("Special " + episode.getSpecial()); + if (episode.getEpisode() != null || episode.getSpecial() != null) { + sb.append(String.format("%02d", episode.getSpecial() == null ? episode.getEpisode() : episode.getSpecial())); } return sb.toString(); @@ -95,15 +93,12 @@ public class EpisodeFormat extends Format { StringBuilder sb = new StringBuilder(); - if (episode.getSeason() != null) { - sb.append(String.format("S%02d", episode.getSeason())); + if (episode.getSeason() != null || episode.getSpecial() != null) { + sb.append(String.format("S%02d", episode.getSpecial() == null ? episode.getSeason() : 0)); } - if (episode.getEpisode() != null) { - sb.append(String.format("E%02d", episode.getEpisode())); - } else if (includeSpecial && episode.getSpecial() != null) { - sb.append(episode.getSeason() != null ? " - " : ""); - sb.append("Special " + episode.getSpecial()); + if (episode.getEpisode() != null || episode.getSpecial() != null) { + sb.append(String.format("E%02d", episode.getSpecial() == null ? episode.getEpisode() : episode.getSpecial())); } return sb.toString();