1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Refactor Datasource.getName() / Datasource.getIdentifier()

This commit is contained in:
Reinhard Pointner 2017-02-12 01:54:40 +08:00
parent db33cf4536
commit f8da07a171
13 changed files with 25 additions and 25 deletions

View File

@ -40,7 +40,7 @@ public class AcoustIDClient implements MusicIdentificationService {
}
@Override
public String getName() {
public String getIdentifier() {
return "AcoustID";
}

View File

@ -50,7 +50,7 @@ public class AnidbClient extends AbstractEpisodeListProvider {
}
@Override
public String getName() {
public String getIdentifier() {
return "AniDB";
}

View File

@ -4,12 +4,12 @@ import javax.swing.Icon;
public interface Datasource {
String getName();
String getIdentifier();
Icon getIcon();
default String getIdentifier() {
return getName();
default String getName() {
return getIdentifier();
}
}

View File

@ -25,7 +25,7 @@ public class FanartTVClient implements Datasource, ArtworkProvider {
}
@Override
public String getName() {
public String getIdentifier() {
return "FanartTV";
}

View File

@ -21,13 +21,13 @@ import net.filebot.mediainfo.MediaInfo.StreamKind;
public class ID3Lookup implements MusicIdentificationService {
@Override
public String getName() {
return "ID3 Tags";
public String getIdentifier() {
return "ID3";
}
@Override
public String getIdentifier() {
return "ID3";
public String getName() {
return "ID3 Tags";
}
@Override

View File

@ -37,7 +37,7 @@ public class OMDbClient implements MovieIdentificationService {
private static final FloodLimit REQUEST_LIMIT = new FloodLimit(20, 10, TimeUnit.SECONDS);
@Override
public String getName() {
public String getIdentifier() {
return "OMDb";
}

View File

@ -55,7 +55,7 @@ public class OpenSubtitlesClient implements SubtitleProvider, VideoHashSubtitleS
}
@Override
public String getName() {
public String getIdentifier() {
return "OpenSubtitles";
}

View File

@ -33,6 +33,11 @@ import net.filebot.ResourceManager;
public class ShooterSubtitles implements VideoHashSubtitleService {
@Override
public String getIdentifier() {
return "Shooter";
}
@Override
public String getName() {
return "射手网";
@ -43,11 +48,6 @@ public class ShooterSubtitles implements VideoHashSubtitleService {
return ResourceManager.getIcon("search.shooter");
}
@Override
public String getIdentifier() {
return "Shooter";
}
@Override
public URI getLink() {
return URI.create("http://shooter.cn");

View File

@ -51,7 +51,7 @@ public class TMDbClient implements MovieIdentificationService, ArtworkProvider {
}
@Override
public String getName() {
public String getIdentifier() {
return "TheMovieDB";
}

View File

@ -26,13 +26,13 @@ public class TMDbTVClient extends AbstractEpisodeListProvider {
}
@Override
public String getName() {
return tmdb.getName();
public String getIdentifier() {
return "TheMovieDB::TV";
}
@Override
public String getIdentifier() {
return "TheMovieDB::TV";
public String getName() {
return tmdb.getName();
}
@Override

View File

@ -20,7 +20,7 @@ import net.filebot.ResourceManager;
public class TVMazeClient extends AbstractEpisodeListProvider {
@Override
public String getName() {
public String getIdentifier() {
return "TVmaze";
}

View File

@ -39,7 +39,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider implements Artwor
}
@Override
public String getName() {
public String getIdentifier() {
return "TheTVDBv2";
}

View File

@ -49,7 +49,7 @@ public class TheTVDBClientV1 extends AbstractEpisodeListProvider implements Artw
}
@Override
public String getName() {
public String getIdentifier() {
return "TheTVDB";
}