I am aware that this means "wiping" users' choices of genre playlists, but consider the following :
- Previously, all they could choose from was a static list, whereas now one can choose from every genre available on the Subsonic server.
- We can't know what genres are available on the server when we're getting the saved value from localStorage. So a mapping might be possible but way too costly for a list of names that will only take a few clicks to recreate anyway.
- Added an svg "X" icon to enable removing auto-playlists
- Notice that the background-color and color change are done too, and since it's SVG, it takes only one image and some CSS to do both.
- Added a subsonic.css file. It is intended (long term) to have all subsonic view-related CSS styles.
- persistence-service now manages the selected genre auto-playlists names instead of utils.getValue().
- Rewrote persistence-service.js to comply with https://github.com/johnpapa/angular-styleguide#style-y052
- Rewrote many test descriptions in persistence-service_test.js to follow these recommendations : http://gojko.net/2015/02/25/how-to-get-the-most-out-of-given-when-then/
- Second part of the fix for tsquillario/Jamstash#212 - Fixes getIndexes
- Moved loading / saving / deleting the selected music folder to persistence-service.
- Moved the request to get all the music folders to subsonic-service.
- Moved SelectedMusicFolder to subsonic-controller's scope from the rootScope
- Fixes a bug where we would send a '-1' music folder id to Subsonic, causing an SQL error when choosing "All Folders" and refreshing the Artists list.
- When Volume has never been stored in local storage, it causes "non-finite value" errors in jPlayer. persistence-service will now return 1.0 if it's not set.
- Adds tests to checkVersion & checkVersionNewer: if the second version (older or required version) is undefined, it always returns true. This enables us to upgrade the settings even if there never was a Jamstash version stored in local storage.
- Adds unit tests that cover all cases.
- Adds call to parseVersionString() so we can pass it version string e.g. '1.0.1'
- persistence-service.js now also manages JamstashVersion. It is set in localStorage from app.js's constant, and not from the changelog so we don't have to add a version to the changelog to actually do stuff.
- persistence-service.js's upgradeToVersion() now only applies newer changesets. This ensures we won't erase users' settings with changesets at every new version, e.g. resetting songSearchType to song every time.
- upgradeToVersion() will also notify the user of the upgrade, which was formerly done in settings.js
- Adds an angular "value" that will contain an array of objects with version and change to be applied to the settings.
- Adds the possibility to run multiple changesets (e.g. upgrade from v1.0.0 to v1.0.2).
- Adds todos in the utils service for things related to version comparisons.
- settings.js now has its own module : 'jamstash.settings.controller'. This makes it easier to test it and identify what dependencies it has.
- Renames 'jamstash.settings' module into 'jamstash.settings.service'
- Adds an angular constant to hold the current Jamstash version in app.js.
- Adds a way to upgrade incrementally what was in localStorage : in 4.4.5, DefaultSearchType will no longer be an object but an int, so we must init it with an int value, otherwise a blank option will be displayed. We detect what version we are using and what version was stored using persistence-service.js and run the upgrade accordingly.
- Refactors almost completely persistence-service_test.js
- Unit-tests some of settings.js's methods.
We used to save the current queue, song and volume with a "jamstash" prefix.
We no longer used the previous non-prefixed values, which became unused.
While not overly annoying for volume or playlist, if we plan to use locker to manage our settings it could become much more problematic.
- Adds a volume field to the player service. It is set directly, no need for get/set...
- Adds a watcher in player-directive to set jPlayer's volume accordingly
- Adds turnVolumeUp and turnVolumeDown methods to the main scope. For the moment they are fine there, we'll maybe move them to the player service if they are called by anything else.
- Adds get/save/delete for the volume in the persistence service.
That way, whenever we want to use something else (like a JSON file, or a DB) we will only have to change persistence-service.js
- Migrated the unit tests there too.
- Added replay in case of jPlayer error.