diff --git a/source/net/sourceforge/filebot/cli/CmdlineOperations.java b/source/net/sourceforge/filebot/cli/CmdlineOperations.java index 71852653..7205ad17 100644 --- a/source/net/sourceforge/filebot/cli/CmdlineOperations.java +++ b/source/net/sourceforge/filebot/cli/CmdlineOperations.java @@ -201,8 +201,10 @@ public class CmdlineOperations implements CmdlineInterface { if (selectedSearchResult != null) { CLILogger.fine(format("Fetching episode data for [%s]", selectedSearchResult.getName())); + List episodes = db.getEpisodeList(selectedSearchResult, locale); + Analytics.trackEvent(db.getName(), "FetchEpisodeList", selectedSearchResult.getName()); - return db.getEpisodeList(selectedSearchResult, locale); + return episodes; } } diff --git a/source/net/sourceforge/filebot/ui/episodelist/EpisodeListPanel.java b/source/net/sourceforge/filebot/ui/episodelist/EpisodeListPanel.java index 35b63afb..ceb5ca6f 100644 --- a/source/net/sourceforge/filebot/ui/episodelist/EpisodeListPanel.java +++ b/source/net/sourceforge/filebot/ui/episodelist/EpisodeListPanel.java @@ -15,6 +15,7 @@ import java.io.IOException; import java.net.URI; import java.util.Arrays; import java.util.Collection; +import java.util.List; import java.util.Locale; import javax.swing.AbstractAction; @@ -24,6 +25,7 @@ import javax.swing.JComponent; import javax.swing.JSpinner; import javax.swing.KeyStroke; +import net.sourceforge.filebot.Analytics; import net.sourceforge.filebot.Settings; import net.sourceforge.filebot.WebServices; import net.sourceforge.filebot.ui.AbstractSearchPanel; @@ -224,10 +226,15 @@ public class EpisodeListPanel extends AbstractSearchPanel fetch() throws Exception { + List episodes; + if (request.getSeason() != ALL_SEASONS) - return request.getProvider().getEpisodeList(getSearchResult(), request.getSeason(), request.getLanguage()); + episodes = request.getProvider().getEpisodeList(getSearchResult(), request.getSeason(), request.getLanguage()); else - return request.getProvider().getEpisodeList(getSearchResult(), request.getLanguage()); + episodes = request.getProvider().getEpisodeList(getSearchResult(), request.getLanguage()); + + Analytics.trackEvent(request.getProvider().getName(), "ViewEpisodeList", getSearchResult().getName()); + return episodes; } diff --git a/source/net/sourceforge/filebot/ui/rename/EpisodeListMatcher.java b/source/net/sourceforge/filebot/ui/rename/EpisodeListMatcher.java index ce31c271..6fe86a4f 100644 --- a/source/net/sourceforge/filebot/ui/rename/EpisodeListMatcher.java +++ b/source/net/sourceforge/filebot/ui/rename/EpisodeListMatcher.java @@ -130,8 +130,10 @@ class EpisodeListMatcher implements AutoCompleteMatcher { SearchResult selectedSearchResult = selectSearchResult(query, results); if (selectedSearchResult != null) { + List episodes = provider.getEpisodeList(selectedSearchResult, locale); Analytics.trackEvent(provider.getName(), "FetchEpisodeList", selectedSearchResult.getName()); - return provider.getEpisodeList(selectedSearchResult, locale); + + return episodes; } }