Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Commit

Permalink
check for newer version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jigoku committed May 7, 2015
1 parent 0af6e2c commit 08def7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* socks4 proxy support
* socks5 proxy support
* configurable connection timeout
* search query labels for torrent titles now expand when window is resized
* bookmark manager
* hash lookup "clipboard" button changed to show more torrent information
* threaded file requests - file_request()
Expand Down
12 changes: 12 additions & 0 deletions alluvion-gtk.pl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ sub main {
# start thread for statusbar display
set_index_total();

# check if there is a newer release
check_new_version();

# main loop
Gtk2->main(); gtk_main_quit();
}
Expand All @@ -224,6 +227,15 @@ sub debug_proxy_address {
}
}

sub check_new_version {
my $tag = json_request("https://api.github.com/repos/jigoku/alluvion/releases/latest");

# prompt there is a newer release
if ($tag->{tag_name} > $VERSION) {
spawn_dialog("info", "ok", "Information", "A new release is available\n");
}
}

sub file_request($) {
# file to fetch
my $file_uri = shift;
Expand Down

0 comments on commit 08def7b

Please sign in to comment.