Skip to content

Commit

Permalink
v0.0.15 - omicron
Browse files Browse the repository at this point in the history
- fixes crash on changing settings
- fixes crash on initialize playlist before sync
- fixes crash on sync with null local songs
  • Loading branch information
memen45 committed Jul 24, 2020
1 parent 739ef46 commit 382b5ca
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
9 changes: 7 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Version 0.0.14
Version [0.0.15] -
- fixes crash on changing settings
- fixes crash on initialize playlist before sync
- fixes crash on sync with null local songs

Version [0.0.14] - 2020-07-16
- fixes reset session on settings changed (AmpacheAPI)
- fixes potential bug from incompatible storage
- fixes potential bug from outdated storage
- fixes error reporting in "Server Info" tab
- fixes sync - 'fake sync' bug
- fixes crash on receiving error (AmpacheAPI)
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="SubMusicApp" id="62436b93f69e4823a8b41854b6684b4a" launcherIcon="@Drawables.LauncherIcon" name="@Strings.AppName" type="audio-content-provider-app" version="0.0.14">
<iq:application entry="SubMusicApp" id="62436b93f69e4823a8b41854b6684b4a" launcherIcon="@Drawables.LauncherIcon" name="@Strings.AppName" type="audio-content-provider-app" version="0.0.15">
<iq:products>
<iq:product id="fenix5plus"/>
<iq:product id="fenix5splus"/>
Expand Down
2 changes: 1 addition & 1 deletion resources/strings/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<strings>
<string id="AppName">SubMusic</string>

<string id="AppVersionTitle">0.0.14 - xi</string>
<string id="AppVersionTitle">0.0.15 - omicron</string>
<string id="ApiStandard">API backend</string>
<string id="ApiStandardSubsonic">Subsonic API</string>
<string id="ApiStandardAmpache">Ampache API - beta</string>
Expand Down
3 changes: 3 additions & 0 deletions source/SubMusicApp.mc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class SubMusicApp extends Application.AudioContentProviderApp {
System.println("Settings changed");

// reset the sessions for the provider
if (d_provider == null) {
return;
}
d_provider.onSettingsChanged(getProviderSettings());
}

Expand Down
4 changes: 3 additions & 1 deletion source/SubMusicContentIterator.mc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ class SubMusicContentIterator extends Media.ContentIterator {
var playlist = Application.Storage.getValue(Storage.PLAYLIST);
var lists = Application.Storage.getValue(Storage.PLAYLIST_LOCAL);

if ((playlist != null) && (lists[playlist] != null))
if ((playlist != null)
&& (lists[playlist] != null)
&& (lists[playlist]["songs"] != null))
{
var songs = lists[playlist]["songs"];
var store = new SubMusicSongStore();
Expand Down
8 changes: 5 additions & 3 deletions source/SubMusicPlaylistStore.mc
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,22 @@ class SubMusicPlaylistSync extends SubMusicPlaylistsBase {

// update the given playlist on either locals or tosync
function update(id, songs) {
var locals;
var locals = null;

// load local list, return if not available
if (d_locals.hasKey(id)) {
locals = d_locals[id]["songs"];
} else if (d_tosync.hasKey(id)) {
locals = [];

// copy the playlist to the locals list
d_locals[id] = d_tosync.get(id);
d_locals[id]["songs"] = [];
} else {
return 0;
}
// set empty array if still null
if (locals == null) {
locals = [];
}

var remotes = songs;
var count = 0;
Expand Down

0 comments on commit 382b5ca

Please sign in to comment.