Skip to content

Commit

Permalink
Fixing sync error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alain M committed Dec 6, 2019
1 parent a82105f commit cd7ce3e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions data/com.github.alainm23.byte.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<summary>Window position</summary>
<description>Most recent window position (x, y)</description>
</key>

<key name="window-size" type="(ii)">
<default>(532, 786)</default>
<summary>Most recent window size</summary>
Expand Down
1 change: 1 addition & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public class MainWindow : Gtk.Window {
Byte.scan_service.scan_local_files (folder);

main_stack.visible_child_name = "library_view";
library_stack.visible_child_name = "home_view";
}
});

Expand Down
16 changes: 8 additions & 8 deletions src/Services/Scan.vala
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ public class Services.Scan : GLib.Object {
}

public void discovered_new_local_item (Objects.Artist artist, Objects.Album album, Objects.Track track) {
if (counter == 0) {
sync_started ();
is_sync = true;
}

counter++;
counter_max++;

new Thread<void*> ("discovered_new_local_item", () => {
if (counter == 0) {
sync_started ();
is_sync = true;
}

counter++;
counter_max++;

album.artist_id = Byte.database.insert_artist_if_not_exists (artist);
album.artist_name = artist.name;

Expand Down
1 change: 0 additions & 1 deletion src/Widgets/TrackRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public class Widgets.TrackRow : Gtk.ListBoxRow {

secondary_label = new Gtk.Label (track.artist_name);
secondary_label.get_style_context ().add_class ("secondary_label");
secondary_label.use_markup = true;
secondary_label.halign = Gtk.Align.START;
secondary_label.valign = Gtk.Align.START;
secondary_label.max_width_chars = 40;
Expand Down

0 comments on commit cd7ce3e

Please sign in to comment.