GithubHelp home page GithubHelp logo

jigoku / alluvion Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 429 KB

Perl/Gtk2 torrent search utility (strike API)

Home Page: https://jigoku.github.io/alluvion/

License: GNU General Public License v3.0

Shell 1.84% Perl 98.16%

alluvion's Introduction

Hi there πŸ‘‹

  • πŸ”­ I’m currently working on some Red Eclipse 2 maps, and some half-assed LUA/Love2D games
  • πŸ—ΊοΈ Highly interested in original game engine design and interactive level editor / map editors

alluvion's People

Contributors

jigoku avatar

Watchers

 avatar  avatar

alluvion's Issues

Threads

Alluvion should be threaded (priority for proxy connections when implemented). A slow connection can make the application hang, and potentially be terminated by the desktop environment.

Add torrent description feature

https://getstrike.net/api/v2/torrents/descriptions/?hash=

Returns message as base64 encoded text; eg:
{"statuscode":200,"message":"<BASE64HERE>"}

This output could be added to the hash lookup display. Possibly rename it to "torrent info".

Proxy is set when cancelling changes

Reproduce:

  1. Start alluvion with proxy disabled.
  2. Edit > Preferences
  3. Enable proxy
  4. Click HTTP / Socks 4 / Socks 5 radio button
  5. Disable Proxy
  6. Click Cancel

Issue: Proxy is set to radio item clicked even preferences changes were cancelled

Additional tools

Currently has:

  • hash lookup
  • search query

Ideas for extra tabs:

  • bookmarks (keywords / search terms, like bookmarks)
  • download log (for torrent files, instead of "torrent has been saved"... but do we need/want history?)

Disabling proxy does not disable proxy

*** unhandled exception in callback:
***   '' is not a valid URI scheme at ./alluvion-gtk.pl line 611.
***  ignoring at ./alluvion-gtk.pl line 596, <FILE> line 7.

proxy is enabled by issuing:

$ua->proxy([ 'http', 'https' ], "http://".$settings{"proxy_addr"}.":".$settings{"proxy_port"});

when disabling....

$ua->proxy(undef, undef);

THIS is invalid

Install script

Low priority for now.
But should contain a script for packaging/deploying with ease eventually.

HTTP proxy not set properly

Launch alluvion, click "enable proxy".

HTTP is the default radio item, however proxy isn't actually set unless you click the radio item at least once, regardless of whether it is already set.

[Bookmarks] Interface

Make it look nicer, and more usable. Instead of a button, have a markup label with 2 buttons (open / remove)

Fix api parsing

Something changed in the api, many values are wrong (filesize the obvious one) and torrent files are no longer generated by the api.

Also it only provides the info hash from now on. Use magnet builder (with list of custom trackers) to build URI.

User Preferences / config

  • configurable connection timeout ( eg; $ua->timeout( $n ) )
  • configurable filesize display (bytes, kilobytes, megabytes) in query results
  • use proxy (yes/no)
  • proxy address
  • proxy port

Pack search query results as label, also with buttons

Use buttons for

  • download torrent file
  • open (via xdg-open)

This makes it clear the buttons can be clicked, currently a clickable label with no pointer change (hand cursor) makes it hard to figure out it can be clicked.

Add proxy support

Allow the user to configure socks/http/tor connection as proxy for retrieving strike API results

Socks4/5 proxy support

Socks proxy support has been dropped, because currently, cannot find a way to implement it along with LWP::UserAgent.

A solution exists, if you wish to use Tor (tor does not function as an HTTP proxy so cannot be set in Alluvion preferences).

How to use Alluvion over Tor for privacy reasons:

Prepend alluvion with `torify' to route API requests within the application to the Tor network.

Eg;

$ torify ./alluvion-gtk.pl

Enabling the HTTP/HTTPS proxy within Alluvion aswell, will result in

  • YOU > TOR > PROXY > API

It's probably not necessary, but it works.

For example debug() output

[ &] PID:       13655 | VmSize:  1024760 kB | VmPeak:    1062004 kB | Threads:  4
[ !] thread #3 started
08:21:42 libtorsocks(13655): Call to connect received on completed request 3
[ &] PID:       13655 | VmSize:  1024892 kB | VmPeak:    1062004 kB | Threads:  5
08:21:43 libtorsocks(13655): Call to connect received on completed request 3
[ *] requested via proxy (http://xyz.xyz.xyz.xyz:abc)
[ !] thread #3 finished
[ &] PID:       13655 | VmSize:  1024892 kB | VmPeak:    1062004 kB | Threads:  4

Investigate GLib-GObject-CRITICAL warnings

Since introduction of bookmarks manager, these warnings/critical messages have been appearing again. They don't appear to be making the application misbehave, so it's been hard to find where they are coming from.

Noting here as a reminder.

(alluvion-gtk.pl:2018): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed

(alluvion-gtk.pl:2018): GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion 'G_IS_OBJECT (object)' failed

(alluvion-gtk.pl:2018): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(alluvion-gtk.pl:2018): GLib-GObject-CRITICAL **: g_signal_handlers_destroy: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(alluvion-gtk.pl:2018): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Gtk-CRITICAL **: IA__gtk_widget_get_realized: assertion 'GTK_IS_WIDGET (widget)' failed during global destruction.
GLib-GObject-WARNING **: instance with invalid (NULL) class pointer during global destruction.

(alluvion-gtk.pl:2018): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
GLib-GObject-WARNING **: instance with invalid (NULL) class pointer during global destruction.

(alluvion-gtk.pl:2018): GLib-GObject-CRITICAL **: g_signal_handlers_destroy: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
GLib-GObject-WARNING **: instance with invalid (NULL) class pointer during global destruction.

Gtk3

See if it's possible to port everything to Gtk3.

[Hash Lookup] Implement file_names and file_lengths

API example @ https://gist.github.com/Codeusa/92818fd7a0da398f0809

<snip>
"file_info":{
            "file_names":[
               "slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso",
               " slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso.asc",
               " slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso.md5",
               " slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso.txt"
            ],
            "file_lengths":[
               2438987776,
               198,
               67,
               231925
            ]
         },
</snip>

Possibly add extra button by copy/save/execute to show more info.
Present dialog with this information?

0.3 roadmap

Issues that need to be fixed before 0.3

  • Support for environment HTTP_PROXY #35
  • add option to specify client instead of xdg-open #31
  • calls to xdg_open() should be threaded #27
  • Build hash lookup results using perl code (not glade UI) #29
  • [Hash Lookup] Implement file_names and file_lengths #10
  • Hash Lookup magnet URI result (add clipboard button) #30
  • on_window_check_resize causing GLib-GObject-CRITICAL and segfault #34 (temp fix added)
  • Filesize type setting #17
  • Advanced settings - API URI's #36
  • filesize_type conversion, inaccurate values #37

Problems:

  • Dynamic label width on search query has been temporarily dropped due to segfaulting outside of thread when resizing. 0.4 may introduce listview anyway, where this won't be needed.

Cancelled issues:

  • Split alluvion subroutines into separate files based on what they do #26

Slow startup (If proxy is enabled)

When proxy is enabled from previous session, the interface does not show until a connection has been established (or timed out).

Find work around for this.

Implement release checking

check_new_version() was recently added in 08def7b. However it should not be run at each launch, make a menu item under "Help" to manually check, and if a new release is found, give the URI to the release tag page in a dialog prompt.

Split alluvion subroutines into separate files based on what they do

As reference in main script:

#require $Bin . "/lib/interface.pm";
#require $Bin . "/lib/common.pm";
#require $Bin . "/lib/request.pm";
#require $Bin . "/lib/proxy.pm";
#require $Bin . "/lib/debug.pm";
#require $Bin . "/lib/bookmarks.pm";
#require $Bin . "/lib/searchquery.pm";
#require $Bin . "/lib/hashlookup.pm";

This will make things ALOT easier to find/edit/review.

Find new icon

Current icon doesn't have an alpha layer. Find one that does.

Support for environment HTTP_PROXY

Add checkbutton_env_proxy to preferences proxy UI.
eg:

sub ua_init_env {  
    ua_init();
    $ua->proxy( ['http, https'], $ENV{HTTP_PROXY} ) if exists $ENV{HTTP_PROXY};
    $settings{"proxy_type"} = "env";
}

This will use proxy set by users ~/.bashrc, etc using HTTP_PROXY

or....
$ HTTP_PROXY=x.x.x.x ./alluvion-gtk.pl

Implement category listing/selection/filter

API example:
https://getstrike.net/api/v2/torrents/search/?phrase=windows&category=Applications&subcategory=Windows

Valid categories:

Categories:

Anime
Applications
Books
Games
Movies
Music
Other
TV
XXX

Sub Categories:

Highres Movies
Hentai
HD Video
Handheld
Games
Fiction
English-translated
Ebooks
Dubbed Movies
Documentary
Concerts
Comics
Books
Bollywood
Audio books
Asian
Anime Music Video
Animation
Android
Academic
AAC
3D Movies
XBOX360
Windows
Wii
Wallpapers
Video
Unsorted
UNIX
UltraHD
Tutorials
Transcode
Trailer
Textbooks
Subtitles
Soundtrack
Sound clips
Radio Shows
PSP
PS3
PS2
Poetry
Pictures
PC
Other XXX
Other TV
Other Music
Other Movies
Other Games
Other Books
Other Applications
Other Anime
Non-fiction
Newspapers
Music videos
Mp3
Movie clips
Magazines
Mac
Lossless
Linux
Karaoke
iOS

[Preferences] Filesize type setting

Allow user to specify file size to be displayed as GB / MB / KB / bytes.
Would be 3 radio buttons, and shows up in search query results and hash lookup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.