Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added searching by artist

  • Loading branch information...
commit 4e66d2251429c254761f52f9dfdb1bf723764d50 1 parent 9c6a42c
@floreskul authored
Showing with 426 additions and 2 deletions.
  1. +23 −1 index.html
  2. +402 −0 js/composers.js
  3. +1 −1  manifest.json
View
24 index.html
@@ -17,10 +17,32 @@
<script type="text/javascript" src="js/backbone.js"></script>
<script type="text/javascript" src="js/jath.js"></script>
<script type="text/javascript" src="js/jade.js"></script>
+
+ <script type="text/javascript" src="js/composers.js"></script>
+
<script src="js/fotorama.js"></script>
<script>
+ function getQueryByYears(startYear, endYear) {
+ artists = [];
+ for (var c in composers) {
+ start = composers[c][0];
+ end = composers[c][1];
+ if ((startYear > start) && (endYear < end)) {
+ artists.push('artist:"' + c + '"');
+ }
+ if (artists.length > 10) {
+ break;
+ }
+ }
+ var query = artists.join(' OR ');
+ console.log(query);
+ return query;
+ }
+
function startMusicByYearRange(startYear, endYear) {
- var query = "year:" + startYear + "-" + endYear;
+ var query = getQueryByYears(startYear, endYear);
+ // console.log(query);
+ // var query = "year:" + startYear + "-" + endYear;
console.log(query);
var search = new models.Search(query);
currentPlaylist = new models.Playlist();
View
402 js/composers.js
@@ -0,0 +1,402 @@
+composers = {
+ "Jean-Baptiste Lully": [
+ 1632,
+ 1687
+ ],
+ "Francois Couperin": [
+ 1668,
+ 1733
+ ],
+ "P\u00e9rotin": [
+ 1160,
+ 1225
+ ],
+ "Georg Philipp Telemann": [
+ 1681,
+ 1767
+ ],
+ "William Walton": [
+ 1902,
+ 1983
+ ],
+ "Maurice Ravel": [
+ 1875,
+ 1937
+ ],
+ "Heinrich Sch\u00fctz": [
+ 1585,
+ 1672
+ ],
+ "Dietrich Buxtehude": [
+ 1637,
+ 1707
+ ],
+ "Gioacchino Rossini": [
+ 1792,
+ 1868
+ ],
+ "Paul Hindemith": [
+ 1895,
+ 1963
+ ],
+ "Olivier Messiaen": [
+ 1908,
+ 1992
+ ],
+ "Thomas Tallis": [
+ 1505,
+ 1585
+ ],
+ "Henry Purcell": [
+ 1659,
+ 1695
+ ],
+ "Robert Schumann": [
+ 1810,
+ 1856
+ ],
+ "Ludwig Van Beethoven": [
+ 1770,
+ 1827
+ ],
+ "Antonin Dvorak": [
+ 1841,
+ 1904
+ ],
+ "George Gershwin": [
+ 1898,
+ 1937
+ ],
+ "Arnold Schoenberg": [
+ 1874,
+ 1951
+ ],
+ "William Byrd": [
+ 1539,
+ 1623
+ ],
+ "Sergei Rachmaninoff": [
+ 1873,
+ 1943
+ ],
+ "Orlando Gibbons": [
+ 1583,
+ 1625
+ ],
+ "Benjamin Britten": [
+ 1913,
+ 1976
+ ],
+ "John Dowland": [
+ 1563,
+ 1626
+ ],
+ "Frederic Chopin": [
+ 1810,
+ 1849
+ ],
+ "Anton Webern": [
+ 1883,
+ 1945
+ ],
+ "Jean-Philippe Rameau": [
+ 1683,
+ 1764
+ ],
+ "Christoph Willibald Gluck": [
+ 1714,
+ 1787
+ ],
+ "Mikhail Glinka": [
+ 1804,
+ 1857
+ ],
+ "Modest Mussorgsky": [
+ 1839,
+ 1881
+ ],
+ "Franz Schubert": [
+ 1797,
+ 1828
+ ],
+ "Hector Berlioz": [
+ 1803,
+ 1869
+ ],
+ "Carl Nielsen": [
+ 1865,
+ 1931
+ ],
+ "Guillaume de Machaut": [
+ 1300,
+ 1377
+ ],
+ "Hildegard von Bingen": [
+ 1098,
+ 1179
+ ],
+ "Charles Ives": [
+ 1874,
+ 1954
+ ],
+ "Georges Bizet": [
+ 1838,
+ 1875
+ ],
+ "Giovanni Pierluigi da Palestrina": [
+ 1525,
+ 1594
+ ],
+ "Josquin Des Prez": [
+ 1440,
+ 1521
+ ],
+ "Alexander Nikolayevich Scriabin": [
+ 1872,
+ 1915
+ ],
+ "Giovanni Battista Pergolesi": [
+ 1710,
+ 1736
+ ],
+ "Dmitri Shostakovich": [
+ 1906,
+ 1975
+ ],
+ "B\u00e9la Bart\u00f3k": [
+ 1881,
+ 1945
+ ],
+ "Hugo Wolf": [
+ 1860,
+ 1903
+ ],
+ "Jules Massenet": [
+ 1842,
+ 1912
+ ],
+ "Carl Philipp Emanuel Bach": [
+ 1714,
+ 1788
+ ],
+ "Guillaume Dufay": [
+ 1400,
+ 1474
+ ],
+ "Alban Berg": [
+ 1885,
+ 1935
+ ],
+ "Richard Strauss": [
+ 1864,
+ 1949
+ ],
+ "Alexander Glazunov": [
+ 1865,
+ 1936
+ ],
+ "Camille Saint-Sa\u00ebns": [
+ 1835,
+ 1921
+ ],
+ "Bedrick Smetana": [
+ 1824,
+ 1884
+ ],
+ "Igor Stravinsky": [
+ 1882,
+ 1971
+ ],
+ "Gustav Holst": [
+ 1874,
+ 1934
+ ],
+ "Charles Gounod": [
+ 1818,
+ 1893
+ ],
+ "Tom\u00e1s Luis de Victoria": [
+ 1549,
+ 1611
+ ],
+ "Ralph Vaughan Williams": [
+ 1872,
+ 1958
+ ],
+ "Erik Satie": [
+ 1866,
+ 1925
+ ],
+ "Gustav Mahler": [
+ 1860,
+ 1911
+ ],
+ "Gabriel Faur\u00e9": [
+ 1845,
+ 1924
+ ],
+ "Aaron Copland": [
+ 1900,
+ 1990
+ ],
+ "Johann Sebastian Bach": [
+ 1685,
+ 1750
+ ],
+ "Roland de Lassus": [
+ 1532,
+ 1594
+ ],
+ "Leos Jan\u00e1cek": [
+ 1854,
+ 1928
+ ],
+ "Manuel de Falla": [
+ 1876,
+ 1946
+ ],
+ "Wolfgang Amadeus Mozart": [
+ 1756,
+ 1791
+ ],
+ "Gaetano Donizetti": [
+ 1797,
+ 1848
+ ],
+ "Nikolai Rimsky-Korsakov": [
+ 1844,
+ 1908
+ ],
+ "C\u00e9sar Franck": [
+ 1822,
+ 1890
+ ],
+ "Felix Mendelssohn": [
+ 1809,
+ 1847
+ ],
+ "Alexander Borodin": [
+ 1833,
+ 1887
+ ],
+ "Domenico Scarlatti": [
+ 1685,
+ 1757
+ ],
+ "Darius Milhaud": [
+ 1892,
+ 1974
+ ],
+ "Archangelo Corelli": [
+ 1653,
+ 1713
+ ],
+ "Richard Wagner": [
+ 1813,
+ 1883
+ ],
+ "Franz Liszt": [
+ 1811,
+ 1886
+ ],
+ "Don Carlo Gesualdo": [
+ 1566,
+ 1613
+ ],
+ "Anton Bruckner": [
+ 1824,
+ 1896
+ ],
+ "Vincenzo Bellini": [
+ 1801,
+ 1835
+ ],
+ "Antonio Vivaldi": [
+ 1678,
+ 1741
+ ],
+ "Peter Ilyich Tchaikovsky": [
+ 1840,
+ 1893
+ ],
+ "Serge Prokofiev": [
+ 1891,
+ 1953
+ ],
+ "Claude Debussy": [
+ 1862,
+ 1918
+ ],
+ "John Cage": [
+ 1912,
+ 1992
+ ],
+ "Edvard Grieg": [
+ 1843,
+ 1907
+ ],
+ "Giacomo Meyerbeer": [
+ 1791,
+ 1864
+ ],
+ "L\u00e9onin": [
+ 1135,
+ 1201
+ ],
+ "Carl Maria von Weber": [
+ 1786,
+ 1826
+ ],
+ "Samuel Barber": [
+ 1910,
+ 1981
+ ],
+ "Giacomo Puccini": [
+ 1858,
+ 1924
+ ],
+ "Johann Strauss II": [
+ 1825,
+ 1899
+ ],
+ "Giuseppe Verdi": [
+ 1813,
+ 1901
+ ],
+ "Francis Poulenc": [
+ 1899,
+ 1963
+ ],
+ "Ottorino Respighi": [
+ 1879,
+ 1936
+ ],
+ "Joseph Haydn": [
+ 1732,
+ 1809
+ ],
+ "George Frideric Handel": [
+ 1685,
+ 1759
+ ],
+ "Jean Sibelius": [
+ 1865,
+ 1957
+ ],
+ "Johannes Brahms": [
+ 1833,
+ 1897
+ ],
+ "Claudio Monteverdi": [
+ 1567,
+ 1643
+ ],
+ "Giovanni Gabrieli": [
+ 1554,
+ 1612
+ ],
+ "Edward Elgar": [
+ 1857,
+ 1934
+ ]
+}
View
2  manifest.json
@@ -1,7 +1,7 @@
{
"BundleType": "Application",
"AppName": {
- "en": "Rijksmuseum App"
+ "en": "Rijksmuseum Gallery"
},
"SupportedLanguages": [
"en"
Please sign in to comment.
Something went wrong with that request. Please try again.