Skip to content
This repository has been archived by the owner on Dec 5, 2020. It is now read-only.

Commit

Permalink
show detailed export status. Fix #282
Browse files Browse the repository at this point in the history
  • Loading branch information
haecker-felix committed Jan 20, 2018
1 parent 5ccd217 commit 348143f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gradio-library.vala
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ namespace Gradio{
}

public async void export_as_m3u(string path){
Gtk.MessageDialog progress_dialog = new Gtk.MessageDialog (null, Gtk.DialogFlags.MODAL, Gtk.MessageType.INFO, Gtk.ButtonsType.NONE, "Please wait...");
progress_dialog.show ();

message("Exporting m3u playlist to: %s", path);

File file = File.new_for_path (path);
Expand Down Expand Up @@ -302,6 +305,7 @@ namespace Gradio{

RadioStation station = yield Util.get_station_by_id(int.parse(station_id));
if (station != null) {
progress_dialog.text = "Exporting \"" + station.title + "\" ...";
string address = yield station.get_stream_address();

dos.put_string("#EXTINF:0,"+station.title+"\n");
Expand All @@ -317,6 +321,7 @@ namespace Gradio{
}
} while (rc == Sqlite.ROW);

progress_dialog.destroy();
message("Successfully exported database!");
}

Expand Down

0 comments on commit 348143f

Please sign in to comment.