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:
parent
db33cf4536
commit
f8da07a171
@ -40,7 +40,7 @@ public class AcoustIDClient implements MusicIdentificationService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "AcoustID";
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class AnidbClient extends AbstractEpisodeListProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "AniDB";
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public class FanartTVClient implements Datasource, ArtworkProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "FanartTV";
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class OpenSubtitlesClient implements SubtitleProvider, VideoHashSubtitleS
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "OpenSubtitles";
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -51,7 +51,7 @@ public class TMDbClient implements MovieIdentificationService, ArtworkProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "TheMovieDB";
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -20,7 +20,7 @@ import net.filebot.ResourceManager;
|
||||
public class TVMazeClient extends AbstractEpisodeListProvider {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "TVmaze";
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider implements Artwor
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "TheTVDBv2";
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class TheTVDBClientV1 extends AbstractEpisodeListProvider implements Artw
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String getIdentifier() {
|
||||
return "TheTVDB";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user