diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-26 16:53:54 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-26 16:53:54 -0400 |
| commit | 3eaf25132c65bf287f2206e85a8a1eaa5670ac15 (patch) | |
| tree | e5e40e8cbfb0ae721ce9ccd011c4380b64aedd78 | |
| parent | 757cfcae8e91a5b7f1c78032398a6287055120b8 (diff) | |
search flyout placeholder
3 files changed, 10 insertions, 20 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LuceneSearchEngine.cs b/MediaBrowser.Server.Implementations/Library/LuceneSearchEngine.cs index 79ca1f554..d5675578d 100644 --- a/MediaBrowser.Server.Implementations/Library/LuceneSearchEngine.cs +++ b/MediaBrowser.Server.Implementations/Library/LuceneSearchEngine.cs @@ -118,9 +118,11 @@ namespace MediaBrowser.Server.Implementations.Library } } + // Find artists var artists = items.OfType<Audio>() .SelectMany(i => new[] { i.Artist, i.AlbumArtist }) .Where(i => !string.IsNullOrEmpty(i)) + .Distinct(StringComparer.OrdinalIgnoreCase) .ToList(); foreach (var item in artists) @@ -194,26 +196,6 @@ namespace MediaBrowser.Server.Implementations.Library } /// <summary> - /// Gets the hints. - /// </summary> - /// <param name="item">The item.</param> - /// <param name="searchTerm">The search term.</param> - /// <returns>IEnumerable{Tuple{SearchHintResultSystem.Int32}}.</returns> - private async Task<IEnumerable<Tuple<BaseItem, int>>> GetHints(BaseItem item, string searchTerm) - { - var hints = new List<Tuple<BaseItem, int>>(); - - var index = IndexOf(item.Name, searchTerm); - - if (index != -1) - { - hints.Add(new Tuple<BaseItem, int>(item, index)); - } - - return hints; - } - - /// <summary> /// Gets the words. /// </summary> /// <param name="term">The term.</param> diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index df3e78e71..7aaa4d173 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -485,6 +485,7 @@ namespace MediaBrowser.WebDashboard.Api "pluginupdatespage.js", "scheduledtaskpage.js", "scheduledtaskspage.js", + "search.js", "songs.js", "supporterkeypage.js", "supporterpage.js", @@ -528,6 +529,7 @@ namespace MediaBrowser.WebDashboard.Api "librarybrowser.css", "detailtable.css", "posteritem.css", + "search.css", "pluginupdates.css", "userimage.css" }; diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 59f669f77..e0e4f8c9c 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -186,6 +186,9 @@ <Content Include="dashboard-ui\css\posteritem.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\css\search.css">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\css\userimage.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -255,6 +258,9 @@ <Content Include="dashboard-ui\scripts\musicrecommended.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\scripts\search.js">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\songs.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
|
