Skip to content

Commit 14748bd

Browse files
author
Chris Bellew
committed
Fixed detection of whether a video was a tv show or not. Show current default client in main settings screen, directing user to select one via cast icon. When creating a shortcut, include chromecast clients when figuring out if a scan has already been done.
1 parent 55045d6 commit 14748bd

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

Voice Control For Plex/src/main/java/com/atomjack/vcfp/activities/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private void initMainWithServer() {
268268
clientName = getString(R.string.this_device);
269269
MainSetting setting_data[] = new MainSetting[] {
270270
new MainSetting(MainListAdapter.SettingHolder.TAG_SERVER, getResources().getString(R.string.stream_video_from_server), server.owned ? server.name : server.sourceTitle),
271-
// new MainSetting(MainListAdapter.SettingHolder.TAG_CLIENT, getResources().getString(R.string.to_the_client), clientName),
271+
new MainSetting(MainListAdapter.SettingHolder.TAG_CLIENT, String.format(getResources().getString(R.string.your_current_default_client_is), clientName), getString(R.string.tap_cast_icon_to_change_default_client)),
272272
new MainSetting(MainListAdapter.SettingHolder.TAG_FEEDBACK, getResources().getString(R.string.feedback), VoiceControlForPlexApplication.getInstance().prefs.get(Preferences.FEEDBACK, FEEDBACK_TOAST) == FEEDBACK_VOICE ? getResources().getString(R.string.voice) : getResources().getString(R.string.toast)),
273273
new MainSetting(MainListAdapter.SettingHolder.TAG_ERRORS, getResources().getString(R.string.errors), VoiceControlForPlexApplication.getInstance().prefs.get(Preferences.ERRORS, FEEDBACK_TOAST) == FEEDBACK_VOICE ? getResources().getString(R.string.voice) : getResources().getString(R.string.toast))
274274
};

Voice Control For Plex/src/main/java/com/atomjack/vcfp/activities/ShortcutProviderActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void onDeviceSelected(PlexDevice device, boolean _resume) {
7070

7171
Logger.d("server: %s", servers);
7272
boolean didScan = false;
73-
if(servers != null && servers.size() > 0 && clients != null && clients.size() > 0)
73+
if(servers != null && servers.size() > 0 && VoiceControlForPlexApplication.getAllClients().size() > 0)
7474
didScan = true;
7575

7676
AlertDialog.Builder chooserDialog = new AlertDialog.Builder(ShortcutProviderActivity.this);

Voice Control For Plex/src/main/java/com/atomjack/vcfp/model/PlexVideo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public boolean isMovie() {
4949

5050
@Override
5151
public boolean isShow() {
52-
return type.equals("show");
52+
return type.equals("episode");
5353
}
5454

5555
@Override
@@ -64,7 +64,7 @@ public String getTitle() {
6464

6565
@Override
6666
public String getEpisodeTitle() {
67-
return type.equals("show") ? title : "";
67+
return type.equals("episode") ? title : "";
6868
}
6969

7070
@Override

Voice Control For Plex/src/main/res/values-es/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<string name="voice">Voz</string>
2727
<string name="toast">Toast</string>
2828
<string name="scan_all">Escanear Todo</string>
29-
<string name="not_set">No configurado</string>
29+
<string name="not_set">no configurado</string>
3030
<string name="feedback">Feedback</string>
3131
<string name="errors">Errores</string>
3232
<string name="help_server">Selecciona un Servidor de Plex desde el que enviar los contenidos. Si tienes más de un servido, selecciona &quot;Escanear todo&quot; para buscar los servidores disponibles. Si solo tienes uno deberías seleccionarlo aquí ya que escanear todos los servidores cada vez ralentiza el activar la reproducción.</string>

Voice Control For Plex/src/main/res/values-fr/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<string name="voice">Voix</string>
2727
<string name="toast">Toast</string>
2828
<string name="scan_all">Tout scanner</string>
29-
<string name="not_set">Non défini</string>
29+
<string name="not_set">non défini</string>
3030
<string name="feedback">Feedback</string>
3131
<string name="errors">Erreurs</string>
3232
<string name="help_server">Sélectionnez un Serveur Media Plex source. Si vous avez plus d\'un serveur, sélectionnez &quot;Tout scanner&quot; pour chercher tous les serveurs media disponibles. Si vous n\'en avez qu\'un, sélectionnez le ici pour éviter le temps de scan à chaque demande de lecture.</string>

Voice Control For Plex/src/main/res/values/strings.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<string name="voice">Voice</string>
2727
<string name="toast">Toast</string>
2828
<string name="scan_all">Scan All</string>
29-
<string name="not_set">Not Set</string>
29+
<string name="not_set">not set</string>
3030
<string name="feedback">Feedback</string>
3131
<string name="errors">Errors</string>
3232
<string name="help_server">Select a Plex Media Server to stream from. If you have more than one media server, select &quot;Scan All&quot; to search all available servers for media. If you only have one, you should select it here as scanning all servers each time will take longer to trigger playback.</string>
@@ -120,4 +120,6 @@
120120
<string name="searching_for_the_album">Searching for the album %s.</string>
121121
<string name="connecting">Connecting</string>
122122
<string name="client_lost_connection">I lost the connection with %s.</string>
123+
<string name="your_current_default_client_is">Your current default client is %s.</string>
124+
<string name="tap_cast_icon_to_change_default_client">Tap the cast icon to change the default client.</string>
123125
</resources>

0 commit comments

Comments
 (0)