sync model

This commit is contained in:
Luke Pulverenti 2015-02-26 22:59:45 -05:00
parent b684d72e5e
commit 880e87d2cd
12 changed files with 161 additions and 141 deletions

178
.idea/workspace.xml generated
View File

@ -7,10 +7,17 @@
</component>
<component name="ChangeListManager">
<list default="true" id="ded6c251-ca93-4546-8a98-be60c6d1fbb2" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/AfterConnectValidatedResponse.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/AuthenticatedObserver.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/ApiClient.java" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/ApiClient.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/artifacts/MediaBrowser_ApiClient_Java_jar/MediaBrowser.ApiClient.Java.jar" afterPath="$PROJECT_DIR$/out/artifacts/MediaBrowser_ApiClient_Java_jar/MediaBrowser.ApiClient.Java.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/session/ClientCapabilities.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/session/ClientCapabilities.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/ConnectionManager.java" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/ConnectionManager.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/apiclient/ConnectionOptions.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/apiclient/ConnectionOptions.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/dto/ImageOptions.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/dto/ImageOptions.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/querying/ItemSortBy.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/querying/ItemSortBy.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/apiclient/NetworkStatus.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/apiclient/NetworkStatus.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSync.java" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSync.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamInfo.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamInfo.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/model/sync/SyncDialogOptions.java" afterPath="$PROJECT_DIR$/src/mediabrowser/model/sync/SyncDialogOptions.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="MediaBrowser.ApiClient.Java.iws" />
@ -35,26 +42,56 @@
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="ConnectionManager.java" pinned="false" current-in-tab="true">
<file leaf-file-name="ConnectionManager.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/ConnectionManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="3.96251" vertical-offset="0" max-vertical-offset="12954">
<caret line="290" column="45" selection-start-line="290" selection-start-column="45" selection-end-line="290" selection-end-column="45" />
<state vertical-scroll-proportion="-8.068966" vertical-offset="5325" max-vertical-offset="12988">
<caret line="335" column="57" selection-start-line="335" selection-start-column="57" selection-end-line="335" selection-end-column="57" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#3116#3292#0" expanded="true" />
<element signature="e#3291#3292#0" expanded="true" />
<element signature="e#10608#10839#0" expanded="true" />
<element signature="e#10838#10839#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ServerSync.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSync.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.34357762" vertical-offset="6" max-vertical-offset="1275">
<caret line="33" column="47" selection-start-line="33" selection-start-column="47" selection-end-line="33" selection-end-column="47" />
<folding>
<element signature="e#2414#2433#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="StreamBuilder.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="9141" max-vertical-offset="14603">
<caret line="550" column="31" selection-start-line="550" selection-start-column="31" selection-end-line="550" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="StreamInfo.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamInfo.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="4585" max-vertical-offset="9588">
<caret line="483" column="115" selection-start-line="483" selection-start-column="115" selection-end-line="483" selection-end-column="115" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="AfterConnectValidatedResponse.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/AfterConnectValidatedResponse.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="799">
<state vertical-scroll-proportion="0.0" vertical-offset="510" max-vertical-offset="799">
<caret line="30" column="31" selection-start-line="30" selection-start-column="31" selection-end-line="30" selection-end-column="31" />
<folding>
<element signature="imports" expanded="true" />
@ -66,7 +103,7 @@
<file leaf-file-name="AuthenticatedObserver.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/AuthenticatedObserver.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="561">
<state vertical-scroll-proportion="0.0" vertical-offset="323" max-vertical-offset="561">
<caret line="19" column="35" selection-start-line="19" selection-start-column="35" selection-end-line="19" selection-end-column="35" />
<folding>
<element signature="imports" expanded="true" />
@ -78,33 +115,13 @@
<file leaf-file-name="ApiClient.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/ApiClient.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-14.103448" vertical-offset="16098" max-vertical-offset="41888">
<state vertical-scroll-proportion="0.0" vertical-offset="16098" max-vertical-offset="41888">
<caret line="1038" column="21" selection-start-line="1038" selection-start-column="12" selection-end-line="1038" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="MediaSyncService.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/MediaSyncService.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1003">
<caret line="8" column="23" selection-start-line="8" selection-start-column="23" selection-end-line="8" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="MediaSyncAdapter.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/MediaSyncAdapter.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1105">
<caret line="0" column="11" selection-start-line="0" selection-start-column="8" selection-end-line="0" selection-end-column="48" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="AuthenticatorService.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/AuthenticatorService.java">
<provider selected="true" editor-type-id="text-editor">
@ -123,7 +140,7 @@
<file leaf-file-name="PeriodicSync.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/PeriodicSync.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="714">
<state vertical-scroll-proportion="0.0" vertical-offset="238" max-vertical-offset="714">
<caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="8" />
<folding />
</state>
@ -133,23 +150,13 @@
<file leaf-file-name="OnDemandSync.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/OnDemandSync.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="595">
<state vertical-scroll-proportion="0.0" vertical-offset="238" max-vertical-offset="595">
<caret line="20" column="8" selection-start-line="18" selection-start-column="8" selection-end-line="20" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="MultiServerSyncProgress.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/MultiServerSyncProgress.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1513">
<caret line="23" column="78" selection-start-line="23" selection-start-column="78" selection-end-line="23" selection-end-column="78" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
@ -163,7 +170,6 @@
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/images/LruBitmapCache.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/net/HttpResponse.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/configuration/ServerConfiguration.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/BaseApiClient.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/livetv/SeriesTimerInfoDto.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/dlna/profiles/DefaultProfile.java" />
@ -178,7 +184,6 @@
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/EnsureConnectUserResponse.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/IConnectionManager.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/network/INetworkConnection.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamInfo.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/AndroidNetworkConnection.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/LogoutAllResponse.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/ExchangePinResponse.java" />
@ -198,7 +203,6 @@
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/TestNextConnectionModeTryConnectResponse.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/apiclient/ServerCredentials.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSyncProgress.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSync.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/Authenticator.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/SyncAccountManager.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/MultiServerSyncProgress.java" />
@ -208,7 +212,10 @@
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/ApiClient.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/AuthenticatedObserver.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/AfterConnectValidatedResponse.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamInfo.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/ConnectionManager.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSync.java" />
</list>
</option>
</component>
@ -241,6 +248,8 @@
<sortByType />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
@ -529,8 +538,6 @@
</PATH>
</subPane>
</pane>
<pane id="PackagesPane" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@ -915,20 +922,6 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/VolleyErrorListener.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="952">
<caret line="8" column="28" selection-start-line="8" selection-start-column="28" selection-end-line="8" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/volley/volley.jar!/com/android/volley/Response.class">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.06049822" vertical-offset="0" max-vertical-offset="843">
<caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/ICredentialProvider.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.078341015" vertical-offset="0" max-vertical-offset="868">
@ -1068,9 +1061,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2244">
<caret line="110" column="0" selection-start-line="110" selection-start-column="0" selection-end-line="110" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -1078,7 +1068,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="939" max-vertical-offset="2091">
<caret line="123" column="9" selection-start-line="123" selection-start-column="9" selection-end-line="123" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
@ -1100,7 +1089,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1002" max-vertical-offset="1870">
<caret line="103" column="38" selection-start-line="103" selection-start-column="38" selection-end-line="103" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
@ -1188,10 +1176,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="680">
<caret line="17" column="8" selection-start-line="17" selection-start-column="8" selection-end-line="17" selection-end-column="8" />
<folding>
<element signature="e#348#349#0" expanded="true" />
<element signature="e#382#383#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -1199,7 +1183,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.28132388" vertical-offset="0" max-vertical-offset="1122">
<caret line="19" column="11" selection-start-line="19" selection-start-column="11" selection-end-line="19" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
@ -1219,16 +1202,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSync.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1258">
<caret line="41" column="0" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="0" />
<folding>
<element signature="e#2364#2383#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/android/sync/MediaSyncService.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1003">
@ -1249,12 +1222,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.1607565" vertical-offset="0" max-vertical-offset="1105">
<caret line="13" column="26" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="26" />
<folding>
<element signature="e#490#491#0" expanded="true" />
<element signature="e#520#521#0" expanded="true" />
<element signature="e#1576#1577#0" expanded="true" />
<element signature="e#1633#1634#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -1297,7 +1264,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/ApiClient.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-14.103448" vertical-offset="16098" max-vertical-offset="41888">
<state vertical-scroll-proportion="0.0" vertical-offset="16098" max-vertical-offset="41888">
<caret line="1038" column="21" selection-start-line="1038" selection-start-column="12" selection-end-line="1038" selection-end-column="21" />
<folding />
</state>
@ -1307,7 +1274,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.14736013" vertical-offset="0" max-vertical-offset="1269">
<caret line="26" column="17" selection-start-line="26" selection-start-column="17" selection-end-line="26" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
@ -1331,16 +1297,40 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamInfo.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="4585" max-vertical-offset="9588">
<caret line="483" column="115" selection-start-line="483" selection-start-column="115" selection-end-line="483" selection-end-column="115" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="9141" max-vertical-offset="14603">
<caret line="550" column="31" selection-start-line="550" selection-start-column="31" selection-end-line="550" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/ConnectionManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="3.96251" vertical-offset="0" max-vertical-offset="12954">
<caret line="290" column="45" selection-start-line="290" selection-start-column="45" selection-end-line="290" selection-end-column="45" />
<state vertical-scroll-proportion="-8.068966" vertical-offset="5325" max-vertical-offset="12988">
<caret line="335" column="57" selection-start-line="335" selection-start-column="57" selection-end-line="335" selection-end-column="57" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#3116#3292#0" expanded="true" />
<element signature="e#3291#3292#0" expanded="true" />
<element signature="e#10608#10839#0" expanded="true" />
<element signature="e#10838#10839#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/ServerSync.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.34357762" vertical-offset="6" max-vertical-offset="1275">
<caret line="33" column="47" selection-start-line="33" selection-start-column="47" selection-end-line="33" selection-end-column="47" />
<folding>
<element signature="e#2414#2433#0" expanded="true" />
</folding>
</state>
</provider>

View File

@ -344,7 +344,11 @@ public class ConnectionManager implements IConnectionManager {
}
server.ImportInfo(systemInfo);
server.setDateLastAccessed(new Date());
if (options.getUpdateDateLastAccessed()){
server.setDateLastAccessed(new Date());
}
server.setLastConnectionMode(connectionMode);
credentials.AddOrUpdateServer(server);
_credentialProvider.SaveCredentials(credentials);
@ -482,7 +486,9 @@ public class ConnectionManager implements IConnectionManager {
ServerCredentials credentials = _credentialProvider.GetCredentials();
server.setDateLastAccessed(new Date());
if (options.getUpdateDateLastAccessed()){
server.setDateLastAccessed(new Date());
}
if (saveCredentials)
{

View File

@ -31,6 +31,7 @@ public class ServerSync {
ConnectionOptions options = new ConnectionOptions();
options.setEnableWebSocket(false);
options.setReportCapabilities(false);
options.setUpdateDateLastAccessed(false);
connectionManager.Connect(server, options, new ServerSyncConnectionResponse(this, server, cancellationToken, progress));
}

View File

@ -30,10 +30,25 @@ public class ConnectionOptions
{
ReportCapabilities = value;
}
/**
Gets or sets a value indicating whether [update date last accessed].
<value><c>true</c> if [update date last accessed]; otherwise, <c>false</c>.</value>
*/
private boolean UpdateDateLastAccessed;
public final boolean getUpdateDateLastAccessed()
{
return UpdateDateLastAccessed;
}
public final void setUpdateDateLastAccessed(boolean value)
{
UpdateDateLastAccessed = value;
}
public ConnectionOptions()
{
setEnableWebSocket(true);
setReportCapabilities(true);
setUpdateDateLastAccessed(true);
}
}

View File

@ -17,32 +17,18 @@ public class NetworkStatus
IsNetworkAvailable = value;
}
/**
Gets or sets a value indicating whether this instance is wired network available.
Gets or sets a value indicating whether this instance is local network available.
<value><c>null</c> if [is wired network available] contains no value, <c>true</c> if [is wired network available]; otherwise, <c>false</c>.</value>
<value><c>null</c> if [is local network available] contains no value, <c>true</c> if [is local network available]; otherwise, <c>false</c>.</value>
*/
private Boolean IsEthernetNetworkAvailable;
public final Boolean getIsEthernetNetworkAvailable()
private Boolean IsLocalNetworkAvailable;
public final Boolean getIsLocalNetworkAvailable()
{
return IsEthernetNetworkAvailable;
return IsLocalNetworkAvailable;
}
public final void setIsEthernetNetworkAvailable(Boolean value)
public final void setIsLocalNetworkAvailable(Boolean value)
{
IsEthernetNetworkAvailable = value;
}
/**
Gets or sets a value indicating whether this instance is wifi network available.
<value><c>null</c> if [is wifi network available] contains no value, <c>true</c> if [is wifi network available]; otherwise, <c>false</c>.</value>
*/
private Boolean IsWifiNetworkAvailable;
public final Boolean getIsWifiNetworkAvailable()
{
return IsWifiNetworkAvailable;
}
public final void setIsWifiNetworkAvailable(Boolean value)
{
IsWifiNetworkAvailable = value;
IsLocalNetworkAvailable = value;
}
/**
Gets the is any local network available.
@ -51,13 +37,11 @@ public class NetworkStatus
*/
public final boolean GetIsAnyLocalNetworkAvailable()
{
if (getIsEthernetNetworkAvailable() == null && getIsWifiNetworkAvailable() == null)
if (getIsLocalNetworkAvailable() == null)
{
return getIsNetworkAvailable();
}
Boolean tempVar = getIsEthernetNetworkAvailable();
Boolean tempVar2 = getIsWifiNetworkAvailable();
return ((tempVar != null) ? tempVar : false) || ((tempVar2 != null) ? tempVar2 : false);
return getIsLocalNetworkAvailable();
}
}

View File

@ -277,7 +277,7 @@ public class StreamBuilder
if (subtitleStream != null)
{
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.getProfile());
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.getProfile(), options.getContext());
playlistItem.setSubtitleDeliveryMethod(subtitleProfile.getMethod());
playlistItem.setSubtitleFormat(subtitleProfile.getFormat());
@ -302,7 +302,7 @@ public class StreamBuilder
{
if (subtitleStream != null)
{
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.getProfile());
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.getProfile(), options.getContext());
playlistItem.setSubtitleDeliveryMethod(subtitleProfile.getMethod());
playlistItem.setSubtitleFormat(subtitleProfile.getFormat());
@ -532,7 +532,7 @@ public class StreamBuilder
{
if (subtitleStream != null)
{
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.getProfile());
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.getProfile(), options.getContext());
if (subtitleProfile.getMethod() != SubtitleDeliveryMethod.External && subtitleProfile.getMethod() != SubtitleDeliveryMethod.Embed)
{
@ -543,14 +543,20 @@ public class StreamBuilder
return IsAudioEligibleForDirectPlay(item, maxBitrate);
}
public static SubtitleProfile GetSubtitleProfile(MediaStream subtitleStream, DeviceProfile deviceProfile)
public static SubtitleProfile GetSubtitleProfile(MediaStream subtitleStream, DeviceProfile deviceProfile, EncodingContext context)
{
// Look for an external profile that matches the stream type (text/graphical)
for (SubtitleProfile profile : deviceProfile.getSubtitleProfiles())
{
if (subtitleStream.getSupportsExternalStream())
if (profile.getMethod() == SubtitleDeliveryMethod.External && subtitleStream.getIsTextSubtitleStream() == MediaStream.IsTextFormat(profile.getFormat()))
{
if (profile.getMethod() == SubtitleDeliveryMethod.External && subtitleStream.getIsTextSubtitleStream() == MediaStream.IsTextFormat(profile.getFormat()))
if (subtitleStream.getSupportsExternalStream())
{
return profile;
}
// For sync we can handle the longer extraction times
if (context.getValue() == EncodingContext.Static.getValue() && subtitleStream.getIsTextSubtitleStream())
{
return profile;
}

View File

@ -481,7 +481,7 @@ public class StreamInfo
private SubtitleStreamInfo GetSubtitleStreamInfo(MediaStream stream)
{
SubtitleProfile subtitleProfile = StreamBuilder.GetSubtitleProfile(stream, getDeviceProfile());
SubtitleProfile subtitleProfile = StreamBuilder.GetSubtitleProfile(stream, getDeviceProfile(), getContext());
if (subtitleProfile.getMethod() != SubtitleDeliveryMethod.External)
{

View File

@ -204,6 +204,21 @@ public class ImageOptions
PercentPlayed = value;
}
/**
Gets or sets the un played count.
<value>The un played count.</value>
*/
private Integer UnPlayedCount;
public final Integer getUnPlayedCount()
{
return UnPlayedCount;
}
public final void setUnPlayedCount(Integer value)
{
UnPlayedCount = value;
}
/**
Gets or sets the color of the background.

View File

@ -82,4 +82,5 @@ public final class ItemSortBy
public static final String Players = "Players";
public static final String GameSystem = "GameSystem";
public static final String IsFavoriteOrLiked = "IsFavoriteOrLiked";
public static final String DateLastContentAdded = "DateLastContentAdded";
}

View File

@ -91,19 +91,6 @@ public class ClientCapabilities
DeviceProfile = value;
}
/**
Usage should be migrated to SupportsPersistentIdentifier. Keeping this to preserve data.
*/
private Boolean SupportsUniqueIdentifier = null;
public final Boolean getSupportsUniqueIdentifier()
{
return SupportsUniqueIdentifier;
}
public final void setSupportsUniqueIdentifier(Boolean value)
{
SupportsUniqueIdentifier = value;
}
public ClientCapabilities()
{
setPlayableMediaTypes(new java.util.ArrayList<String>());

View File

@ -30,10 +30,25 @@ public class SyncDialogOptions
{
Options = value;
}
/**
Gets or sets the quality options.
<value>The quality options.</value>
*/
private java.util.ArrayList<SyncQuality> QualityOptions;
public final java.util.ArrayList<SyncQuality> getQualityOptions()
{
return QualityOptions;
}
public final void setQualityOptions(java.util.ArrayList<SyncQuality> value)
{
QualityOptions = value;
}
public SyncDialogOptions()
{
setTargets(new java.util.ArrayList<SyncTarget>());
setOptions(new java.util.ArrayList<SyncJobOption>());
setQualityOptions(new java.util.ArrayList<SyncQuality>(java.util.Arrays.asList(new SyncQuality[] {SyncQuality.Original, SyncQuality.High, SyncQuality.Medium, SyncQuality.Low})));
}
}