├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── client.go ├── client_test.go ├── cmd ├── android │ ├── doc.go │ └── magopie │ │ ├── .gitignore │ │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── bullercodeworks │ │ │ │ └── magopie │ │ │ │ └── ApplicationTest.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── bullercodeworks │ │ │ │ │ └── magopie │ │ │ │ │ ├── AboutActivity.java │ │ │ │ │ ├── ConfigActivity.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── State.java │ │ │ │ │ └── adapters │ │ │ │ │ └── ResultAdapter.java │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── magnet.png │ │ │ │ ├── magopie.png │ │ │ │ ├── magopie_android_icon.png │ │ │ │ └── magopie_logo_text.png │ │ │ │ ├── drawable-ldpi │ │ │ │ ├── magnet.png │ │ │ │ ├── magopie.png │ │ │ │ ├── magopie_android_icon.png │ │ │ │ └── magopie_logo_text.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── magnet.png │ │ │ │ ├── magopie.png │ │ │ │ ├── magopie_android_icon.png │ │ │ │ └── magopie_logo_text.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── magnet.png │ │ │ │ ├── magopie.png │ │ │ │ ├── magopie_android_icon.png │ │ │ │ └── magopie_logo_text.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── magnet.png │ │ │ │ ├── magopie.png │ │ │ │ ├── magopie_android_icon.png │ │ │ │ └── magopie_logo_text.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── magnet.png │ │ │ │ ├── magopie.png │ │ │ │ ├── magopie_android_icon.png │ │ │ │ └── magopie_logo_text.png │ │ │ │ ├── layout │ │ │ │ ├── activity_about.xml │ │ │ │ ├── content_config.xml │ │ │ │ ├── content_main.xml │ │ │ │ └── torrent_list_row.xml │ │ │ │ ├── menu │ │ │ │ ├── menu_main.xml │ │ │ │ └── popup_menu.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── bullercodeworks │ │ │ └── magopie │ │ │ └── ExampleUnitTest.java │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── magopie-go │ │ └── build.gradle │ │ └── settings.gradle ├── magopie-cui │ ├── .gitignore │ ├── main.go │ ├── screen.go │ ├── screen_about.go │ └── screen_search.go └── magopie │ ├── .gitignore │ ├── doc.go │ ├── errors.go │ ├── main.go │ ├── server.go │ ├── server_test.go │ ├── site_kat.go │ ├── site_kat_test.go │ ├── site_tpb.go │ ├── site_tpb_test.go │ ├── sitedb.go │ ├── sitedb_test.go │ ├── test_helpers_test.go │ └── testdata │ ├── kat_ubuntu.xml │ └── tpb_ubuntu ├── doc.go ├── logo.png ├── margo.png ├── site.go ├── torrent.go ├── util.go ├── util_test.go └── vendor ├── github.com ├── PuerkitoBio │ └── goquery │ │ ├── LICENSE │ │ ├── README.md │ │ ├── array.go │ │ ├── doc.go │ │ ├── expand.go │ │ ├── filter.go │ │ ├── iteration.go │ │ ├── manipulation.go │ │ ├── property.go │ │ ├── query.go │ │ ├── traversal.go │ │ ├── type.go │ │ └── utilities.go ├── andybalholm │ └── cascadia │ │ ├── LICENSE │ │ ├── README.md │ │ ├── parser.go │ │ └── selector.go ├── br0xen │ └── termbox-util │ │ ├── LICENSE │ │ ├── README.md │ │ ├── termbox_alertmodal.go │ │ ├── termbox_asciiart.go │ │ ├── termbox_confirmmodal.go │ │ ├── termbox_dropmenu.go │ │ ├── termbox_frame.go │ │ ├── termbox_inputfield.go │ │ ├── termbox_inputmodal.go │ │ ├── termbox_label.go │ │ ├── termbox_menu.go │ │ ├── termbox_progressbar.go │ │ ├── termbox_scrollframe.go │ │ └── termbox_util.go ├── dustin │ └── go-humanize │ │ ├── LICENSE │ │ ├── README.markdown │ │ ├── big.go │ │ ├── bigbytes.go │ │ ├── bytes.go │ │ ├── comma.go │ │ ├── ftoa.go │ │ ├── humanize.go │ │ ├── number.go │ │ ├── ordinals.go │ │ ├── si.go │ │ └── times.go ├── gorilla │ ├── context │ │ ├── LICENSE │ │ ├── README.md │ │ ├── context.go │ │ └── doc.go │ └── mux │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── mux.go │ │ ├── regexp.go │ │ └── route.go ├── justinas │ └── alice │ │ ├── LICENSE │ │ ├── README.md │ │ └── chain.go ├── kr │ └── fs │ │ ├── LICENSE │ │ ├── Readme │ │ ├── filesystem.go │ │ └── walk.go ├── mattn │ └── go-runewidth │ │ ├── README.mkd │ │ ├── runewidth.go │ │ ├── runewidth_js.go │ │ ├── runewidth_posix.go │ │ └── runewidth_windows.go ├── nsf │ └── termbox-go │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── api.go │ │ ├── api_common.go │ │ ├── api_windows.go │ │ ├── collect_terminfo.py │ │ ├── syscalls.go │ │ ├── syscalls_darwin.go │ │ ├── syscalls_darwin_amd64.go │ │ ├── syscalls_freebsd.go │ │ ├── syscalls_linux.go │ │ ├── syscalls_netbsd.go │ │ ├── syscalls_openbsd.go │ │ ├── syscalls_windows.go │ │ ├── termbox.go │ │ ├── termbox_common.go │ │ ├── termbox_windows.go │ │ ├── terminfo.go │ │ └── terminfo_builtin.go ├── pborman │ └── uuid │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dce.go │ │ ├── doc.go │ │ ├── hash.go │ │ ├── json.go │ │ ├── node.go │ │ ├── sql.go │ │ ├── time.go │ │ ├── util.go │ │ ├── uuid.go │ │ ├── version1.go │ │ └── version4.go ├── pkg │ └── sftp │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── attrs.go │ │ ├── attrs_stubs.go │ │ ├── attrs_unix.go │ │ ├── client.go │ │ ├── debug.go │ │ ├── packet.go │ │ ├── release.go │ │ ├── server.go │ │ ├── server_stubs.go │ │ ├── server_unix.go │ │ └── sftp.go └── spf13 │ └── afero │ ├── LICENSE.txt │ ├── README.md │ ├── afero.go │ ├── appveyor.yml │ ├── basepath.go │ ├── cacheOnReadFs.go │ ├── const_bsds.go │ ├── const_win_unix.go │ ├── copyOnWriteFs.go │ ├── httpFs.go │ ├── ioutil.go │ ├── mem │ ├── dir.go │ ├── dirmap.go │ └── file.go │ ├── memmap.go │ ├── memradix.go │ ├── os.go │ ├── path.go │ ├── readonlyfs.go │ ├── regexpfs.go │ ├── sftp.go │ ├── sftp │ └── file.go │ ├── sftp_test_go │ ├── unionFile.go │ └── util.go ├── golang.org └── x │ ├── crypto │ ├── LICENSE │ ├── PATENTS │ ├── curve25519 │ │ ├── const_amd64.s │ │ ├── cswap_amd64.s │ │ ├── curve25519.go │ │ ├── doc.go │ │ ├── freeze_amd64.s │ │ ├── ladderstep_amd64.s │ │ ├── mont25519_amd64.go │ │ ├── mul_amd64.s │ │ └── square_amd64.s │ └── ssh │ │ ├── buffer.go │ │ ├── certs.go │ │ ├── channel.go │ │ ├── cipher.go │ │ ├── client.go │ │ ├── client_auth.go │ │ ├── common.go │ │ ├── connection.go │ │ ├── doc.go │ │ ├── handshake.go │ │ ├── kex.go │ │ ├── keys.go │ │ ├── mac.go │ │ ├── messages.go │ │ ├── mux.go │ │ ├── server.go │ │ ├── session.go │ │ ├── tcpip.go │ │ └── transport.go │ ├── net │ ├── LICENSE │ ├── PATENTS │ └── html │ │ ├── atom │ │ ├── atom.go │ │ ├── gen.go │ │ └── table.go │ │ ├── const.go │ │ ├── doc.go │ │ ├── doctype.go │ │ ├── entity.go │ │ ├── escape.go │ │ ├── foreign.go │ │ ├── node.go │ │ ├── parse.go │ │ ├── render.go │ │ └── token.go │ └── text │ ├── LICENSE │ ├── PATENTS │ ├── transform │ └── transform.go │ └── unicode │ └── norm │ ├── composition.go │ ├── forminfo.go │ ├── input.go │ ├── iter.go │ ├── maketables.go │ ├── normalize.go │ ├── readwriter.go │ ├── tables.go │ ├── transform.go │ ├── trie.go │ └── triegen.go └── vendor.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.6 5 | - tip 6 | 7 | matrix: 8 | fast_finish: true 9 | allow_failures: 10 | - go: tip 11 | 12 | install: true # Bypass installing deps on travis to force vendoring 13 | 14 | script: go test -v -race ./... 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2016 Magopie Authors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /client_test.go: -------------------------------------------------------------------------------- 1 | package magopie 2 | 3 | import ( 4 | "encoding/json" 5 | "net/http" 6 | "net/http/httptest" 7 | "testing" 8 | ) 9 | 10 | var testKey = "Margo the magpie" 11 | 12 | func TestClientSearch(t *testing.T) { 13 | torrent1 := Torrent{ 14 | ID: "ID 1", 15 | Title: "Title 1", 16 | MagnetURI: "Magnet 1", 17 | SiteID: "test", 18 | Seeders: 10, 19 | Leechers: 100, 20 | Size: 123456, 21 | } 22 | torrent2 := Torrent{ 23 | ID: "ID 2", 24 | Title: "Title 2", 25 | MagnetURI: "Magnet 2", 26 | SiteID: "test", 27 | Seeders: 20, 28 | Leechers: 200, 29 | Size: 654321, 30 | } 31 | 32 | var srvMethod, srvPath, srvQuery string 33 | var srvValid bool 34 | srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 35 | srvMethod = r.Method 36 | srvPath = r.URL.Path 37 | srvQuery = r.FormValue("q") 38 | srvValid = requestIsSigned(r, testKey) 39 | json.NewEncoder(w).Encode([]Torrent{torrent1, torrent2}) 40 | })) 41 | defer srv.Close() 42 | 43 | var ( 44 | expectedMethod = "GET" 45 | expectedPath = "/torrents" 46 | expectedQuery = "ubuntu 15.10" 47 | ) 48 | 49 | ret := NewClient(srv.URL, testKey).Search(expectedQuery) 50 | 51 | if srvMethod != expectedMethod { 52 | t.Errorf("Search server method %q, expected %q", srvMethod, expectedMethod) 53 | } 54 | if srvPath != expectedPath { 55 | t.Errorf("Search server path %q, expected %q", srvPath, expectedPath) 56 | } 57 | if srvQuery != expectedQuery { 58 | t.Errorf("Search server query %q, expected %q", srvQuery, expectedQuery) 59 | } 60 | if !srvValid { 61 | t.Error("Search server request was not signed") 62 | } 63 | 64 | if l := ret.Length(); l != 2 { 65 | t.Fatalf("Search result length = %d, expected 2", l) 66 | } 67 | 68 | if trnt := ret.Get(0); *trnt != torrent1 { 69 | t.Errorf("Search result[0] = %v, expected %v", *trnt, torrent1) 70 | } 71 | if trnt := ret.Get(1); *trnt != torrent2 { 72 | t.Errorf("Search result[0] = %v, expected %v", *trnt, torrent2) 73 | } 74 | } 75 | 76 | func TestClientDownload(t *testing.T) { 77 | var ( 78 | torrent = Torrent{ID: "someHash"} 79 | 80 | srvMethod, srvPath string 81 | srvValid bool 82 | 83 | expectedMethod = "POST" 84 | expectedPath = "/download/someHash" 85 | ) 86 | srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 87 | srvMethod = r.Method 88 | srvPath = r.URL.Path 89 | srvValid = requestIsSigned(r, testKey) 90 | w.WriteHeader(http.StatusCreated) 91 | })) 92 | defer srv.Close() 93 | 94 | ret := NewClient(srv.URL, testKey).Download(&torrent) 95 | 96 | if srvMethod != expectedMethod { 97 | t.Errorf("Download server method %q, expected %q", srvMethod, expectedMethod) 98 | } 99 | if srvPath != expectedPath { 100 | t.Errorf("Download server path %q, expected %q", srvPath, expectedPath) 101 | } 102 | if !srvValid { 103 | t.Error("Download server request was not signed") 104 | } 105 | 106 | if ret != true { 107 | t.Errorf("Download result %v, expected %v", ret, true) 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /cmd/android/doc.go: -------------------------------------------------------------------------------- 1 | // Package android holds the native android client that talks to the server using go 2 | // bindings. 3 | package android 4 | -------------------------------------------------------------------------------- /cmd/android/magopie/.gitignore: -------------------------------------------------------------------------------- 1 | # Default android studio ignores 2 | *.iml 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | 11 | # Files for the dex VM 12 | *.dex 13 | 14 | # Java class files 15 | *.class 16 | 17 | # Generated files 18 | bin/ 19 | gen/ 20 | 21 | # gomobile generated files 22 | *.aar 23 | 24 | .idea/ 25 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | applicationId "com.bullercodeworks.magopie" 9 | minSdkVersion 15 10 | targetSdkVersion 22 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:22.1.1' 26 | compile project(':magopie-go') 27 | } 28 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/brbuller/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/androidTest/java/com/bullercodeworks/magopie/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.bullercodeworks.magopie; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/java/com/bullercodeworks/magopie/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.bullercodeworks.magopie; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | 6 | public class AboutActivity extends AppCompatActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_about); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/java/com/bullercodeworks/magopie/ConfigActivity.java: -------------------------------------------------------------------------------- 1 | package com.bullercodeworks.magopie; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | import android.widget.Button; 7 | import android.widget.EditText; 8 | import android.widget.TextView; 9 | 10 | /** 11 | * Created by brbuller on 1/23/16. 12 | */ 13 | public class ConfigActivity extends Activity { 14 | public State state; 15 | EditText txtServerURL; 16 | EditText txtApiToken; 17 | Button btnSaveConfig; 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.content_config); 22 | state = new State(); 23 | btnSaveConfig = (Button)findViewById(R.id.btnSaveConfig); 24 | txtServerURL = (EditText)findViewById(R.id.txtServerURL); 25 | txtApiToken = (EditText)findViewById(R.id.txtApiToken); 26 | btnSaveConfig.setOnClickListener(new View.OnClickListener() { 27 | @Override 28 | public void onClick(View view) { 29 | state.ServerURL = txtServerURL.getText().toString(); 30 | state.ApiToken = txtApiToken.getText().toString(); 31 | 32 | finish(); 33 | } 34 | }); 35 | } 36 | 37 | @Override 38 | public void onResume() { 39 | super.onResume(); 40 | state.load(); 41 | txtServerURL.setText(state.ServerURL); 42 | txtApiToken.setText(state.ApiToken); 43 | } 44 | 45 | @Override 46 | public void onPause() { 47 | state.save(); 48 | super.onPause(); 49 | } 50 | 51 | @Override 52 | public void onBackPressed() { 53 | if("".equals(txtServerURL.getText().toString())) { 54 | this.finishAffinity(); 55 | } else { 56 | super.onBackPressed(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/java/com/bullercodeworks/magopie/State.java: -------------------------------------------------------------------------------- 1 | package com.bullercodeworks.magopie; 2 | 3 | import org.json.JSONException; 4 | import org.json.JSONObject; 5 | 6 | import java.util.ArrayList; 7 | import java.util.HashMap; 8 | 9 | import go.magopie.Magopie; 10 | 11 | /** 12 | * Created by brbuller on 1/23/16. 13 | */ 14 | public class State { 15 | 16 | public String file = "/data/data/com.bullercodeworks.magopie/state"; 17 | 18 | public String ServerURL = ""; 19 | public String ApiToken = ""; 20 | public ArrayList results; 21 | public Magopie.Client client; 22 | public HashMap sites; 23 | 24 | public State() { 25 | load(); 26 | results = new ArrayList<>(); 27 | sites = new HashMap<>(); 28 | client = Magopie.NewClient(ServerURL, ApiToken); 29 | Magopie.SiteCollection s = UpdateSites(); 30 | for(int i = 0; i < s.Length(); i++) { 31 | sites.put(s.Get(i).getID(), s.Get(i).getName()); 32 | } 33 | } 34 | 35 | public Magopie.SiteCollection UpdateSites() { 36 | return client.ListSites(); 37 | } 38 | 39 | public void save() { 40 | try { 41 | JSONObject jsonState = new JSONObject(); 42 | jsonState.put("serverURL", ServerURL); 43 | jsonState.put("apiToken", ApiToken); 44 | Magopie.SaveToFile(file, jsonState.toString().getBytes()); 45 | } catch(Exception e) { } 46 | } 47 | 48 | public void load() { 49 | String ret = ""; 50 | byte[] res = Magopie.ReadFromFile(file); 51 | if(res != null && res.length > 0) { 52 | ret = new String(res); 53 | try { 54 | JSONObject jsonState = new JSONObject(ret); 55 | ServerURL = jsonState.getString("serverURL"); 56 | ApiToken = jsonState.getString("apiToken"); 57 | } catch(JSONException e) {} 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-hdpi/magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-hdpi/magnet.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-hdpi/magopie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-hdpi/magopie.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-hdpi/magopie_android_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-hdpi/magopie_android_icon.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-hdpi/magopie_logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-hdpi/magopie_logo_text.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-ldpi/magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-ldpi/magnet.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-ldpi/magopie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-ldpi/magopie.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-ldpi/magopie_android_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-ldpi/magopie_android_icon.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-ldpi/magopie_logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-ldpi/magopie_logo_text.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-mdpi/magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-mdpi/magnet.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-mdpi/magopie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-mdpi/magopie.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-mdpi/magopie_android_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-mdpi/magopie_android_icon.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-mdpi/magopie_logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-mdpi/magopie_logo_text.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xhdpi/magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xhdpi/magnet.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xhdpi/magopie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xhdpi/magopie.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xhdpi/magopie_android_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xhdpi/magopie_android_icon.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xhdpi/magopie_logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xhdpi/magopie_logo_text.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magnet.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magopie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magopie.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magopie_android_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magopie_android_icon.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magopie_logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxhdpi/magopie_logo_text.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magnet.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magopie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magopie.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magopie_android_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magopie_android_icon.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magopie_logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devict/magopie/509f4724787d7f1d8ac76e7344fb5acb7b9d39b0/cmd/android/magopie/app/src/main/res/drawable-xxxhdpi/magopie_logo_text.png -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /cmd/android/magopie/app/src/main/res/layout/content_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 14 | 19 | 23 | 28 | 29 | 33 | 34 | 38 | 39 | 43 | 44 |