implement offline artist id

This commit is contained in:
Luke Pulverenti 2015-03-23 23:34:52 -04:00
parent 8acf943083
commit d49f50bf33
4 changed files with 61 additions and 46 deletions

88
.idea/workspace.xml generated
View File

@ -7,11 +7,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="5b626835-6518-4586-bf6c-5bbba32974d2" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/DeviceResumeFromSleepObservable.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/comparators/SortNameComparator.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$/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/apiinteraction/sync/data/IItemRepository.java" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/IItemRepository.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/LocalAssetManager.java" afterPath="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/LocalAssetManager.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="MediaBrowser.ApiClient.Java.iws" />
<ignored path=".idea/workspace.xml" />
@ -38,11 +36,11 @@
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="PlaybackManager.java" pinned="false" current-in-tab="false">
<file leaf-file-name="PlaybackManager.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/playback/PlaybackManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="4301">
<caret line="221" column="17" selection-start-line="221" selection-start-column="17" selection-end-line="221" selection-end-column="17" />
<state vertical-scroll-proportion="0.4510993" vertical-offset="0" max-vertical-offset="4301">
<caret line="56" column="58" selection-start-line="56" selection-start-column="58" selection-end-line="56" selection-end-column="58" />
<folding>
<element signature="e#3180#3181#0" expanded="true" />
<element signature="e#3237#3238#0" expanded="true" />
@ -51,11 +49,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="LocalAssetManager.java" pinned="false" current-in-tab="true">
<file leaf-file-name="LocalAssetManager.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/LocalAssetManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.3207547" vertical-offset="102" max-vertical-offset="10591">
<caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
<state vertical-scroll-proportion="0.0" vertical-offset="5508" max-vertical-offset="10676">
<caret line="349" column="0" selection-start-line="349" selection-start-column="0" selection-end-line="349" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1800#1801#0" expanded="true" />
@ -82,15 +80,25 @@
<element signature="e#5943#5944#0" expanded="true" />
<element signature="e#5984#5985#0" expanded="true" />
<element signature="e#7266#7279#0" expanded="true" />
<element signature="e#19036#19037#0" expanded="true" />
<element signature="e#19081#19082#0" expanded="true" />
<element signature="e#19160#19161#0" expanded="true" />
<element signature="e#19211#19212#0" expanded="true" />
<element signature="e#19348#19349#0" expanded="true" />
<element signature="e#19393#19394#0" expanded="true" />
<element signature="e#19472#19473#0" expanded="true" />
<element signature="e#19523#19524#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="IItemRepository.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/IItemRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="527">
<caret line="22" column="27" selection-start-line="22" selection-start-column="27" selection-end-line="22" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
</file>
<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">
@ -167,6 +175,7 @@
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/connectionmanager/ConnectionManager.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/comparators/NameComparator.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/comparators/SortNameComparator.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/IItemRepository.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/LocalAssetManager.java" />
</list>
</option>
@ -728,7 +737,7 @@
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23162584" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23162584" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32996634" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
@ -925,13 +934,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/IItemRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="527">
<caret line="8" column="17" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/ILocalAssetManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1139">
@ -1059,17 +1061,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/playback/PlaybackManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="4301">
<caret line="221" column="17" selection-start-line="221" selection-start-column="17" selection-end-line="221" selection-end-column="17" />
<folding>
<element signature="e#3180#3181#0" expanded="true" />
<element signature="e#3237#3238#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/server/ServerSync.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.12888552" vertical-offset="0" max-vertical-offset="1479">
@ -1172,10 +1163,18 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/IItemRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="527">
<caret line="22" column="27" selection-start-line="22" selection-start-column="27" selection-end-line="22" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/sync/data/LocalAssetManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.3207547" vertical-offset="102" max-vertical-offset="10591">
<caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
<state vertical-scroll-proportion="0.0" vertical-offset="5508" max-vertical-offset="10676">
<caret line="349" column="0" selection-start-line="349" selection-start-column="0" selection-end-line="349" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1800#1801#0" expanded="true" />
@ -1202,10 +1201,21 @@
<element signature="e#5943#5944#0" expanded="true" />
<element signature="e#5984#5985#0" expanded="true" />
<element signature="e#7266#7279#0" expanded="true" />
<element signature="e#19036#19037#0" expanded="true" />
<element signature="e#19081#19082#0" expanded="true" />
<element signature="e#19160#19161#0" expanded="true" />
<element signature="e#19211#19212#0" expanded="true" />
<element signature="e#19348#19349#0" expanded="true" />
<element signature="e#19393#19394#0" expanded="true" />
<element signature="e#19472#19473#0" expanded="true" />
<element signature="e#19523#19524#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/mediabrowser/apiinteraction/playback/PlaybackManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.4510993" vertical-offset="0" max-vertical-offset="4301">
<caret line="56" column="58" selection-start-line="56" selection-start-column="58" selection-end-line="56" selection-end-column="58" />
<folding>
<element signature="e#3180#3181#0" expanded="true" />
<element signature="e#3237#3238#0" expanded="true" />
</folding>
</state>
</provider>

View File

@ -20,7 +20,7 @@ public interface IItemRepository {
ArrayList<LocalItem> getItems(LocalItemQuery query);
ArrayList<String> getAlbumArtists(String serverId, String userId);
ArrayList<LocalItemInfo> getAlbumArtists(String serverId, String userId);
ArrayList<LocalItemInfo> getTvSeries(String serverId, String userId);

View File

@ -327,18 +327,23 @@ public class LocalAssetManager implements ILocalAssetManager {
private ArrayList<BaseItemDto> getMusicArtists(UserDto user, BaseItemDto parentItem)
{
ArrayList<String> artists = itemRepository.getAlbumArtists(user.getServerId(), user.getId());
ArrayList<LocalItemInfo> artists = itemRepository.getAlbumArtists(user.getServerId(), user.getId());
ArrayList<BaseItemDto> newList = new ArrayList<>();
for (String item : artists){
for (LocalItemInfo item : artists){
BaseItemDto showItem = new BaseItemDto();
showItem.setId(item);
showItem.setName(item);
showItem.setSortName(item);
showItem.setId(item.getId());
showItem.setName(item.getName());
showItem.setSortName(item.getName());
showItem.setType("MusicArtist");
showItem.setServerId(user.getServerId());
showItem.setServerId(item.getServerId());
showItem.setImageTags(new HashMap<ImageType, String>());
if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(item.getPrimaryImageTag())) {
showItem.getImageTags().put(ImageType.Primary, item.getPrimaryImageTag());
}
newList.add(showItem);
}