A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve search

+27 -6
+23 -2
src/Javascript/Workers/search.js
··· 61 61 .reduce( 62 62 ([ acc, previousOperator, previousPrefix ], chunk) => { 63 63 const operator = (a => a && a[0])( chunk.match(/^(\+|-)/) ) 64 - const chunkWithoutOperator = chunk.replace(/^(\+|-)/, "") 64 + const chunkWithoutOperator = chunk.replace(/^(\+|-)/, "").replace(/\*$/, "") 65 65 const prefix = (a => a && a[1])( chunkWithoutOperator.match(/^([^:]+:)/) ) 66 66 const chunkWithoutPrefix = chunkWithoutOperator.replace(/^([^:]+:)/, "") 67 67 ··· 69 69 const pr = prefix ? "" : (operator ? "" : previousPrefix) 70 70 71 71 return chunkWithoutPrefix.trim().length > 0 72 - ? [ [ ...acc, op + pr + chunkWithoutOperator ], op, prefix || pr ] 72 + ? [ [ ...acc 73 + , op + pr + chunkWithoutOperator 74 + ] 75 + , op 76 + , prefix || pr 77 + ] 73 78 : [ acc, previousOperator, previousPrefix ] 74 79 }, 75 80 [ [], "+", "" ] 76 81 )[0] 77 82 .join(" ") 78 83 84 + const searchTermWithAsteriks = 85 + searchTerm 86 + .split(" ") 87 + .map(s => { 88 + if (s.startsWith("-")) return s 89 + return s + "*" 90 + }) 91 + .join(" ") 92 + 93 + console.log(searchTerm, searchTermWithAsteriks) 94 + 79 95 if (index) { 80 96 results = index 81 97 .search(searchTerm) 82 98 .map(s => s.ref) 99 + .concat( 100 + index 101 + .search(searchTermWithAsteriks) 102 + .map(s => s.ref) 103 + ) 83 104 } 84 105 85 106 self.postMessage({
+4 -4
src/Static/About/Index.md
··· 78 78 ### Search 79 79 80 80 ```shell 81 - # Show me every track where the title, artist or album contains the term 'Parkway' and the term 'Drive'. Terms are separated by spaces (eg. "Killing with a smile" has four terms). 81 + # Show me every track where the title, artist or album contains the term 'Parkway' and the term 'Drive'. 82 82 Parkway Drive 83 83 84 - # Show me every track of which the artist's name contains 'park'. 85 - artist:park* 84 + # Show me every track of which the artist's name starts with 'park'. 85 + artist:park 86 86 87 - # Show me every track from Parkway Drive's "Deep Blue" album. 87 + # Show me every track from Parkway Drive of which the album starts with "Deep Blue". 88 88 artist:Parkway Drive album:Deep Blue 89 89 90 90 # Show me every track from Parkway Drive but not their "Atlas" album.