Skip to content

Commit

Permalink
Fixed loading indicator blocking the ui
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeTurner616 committed Jan 8, 2024
1 parent 78d22d3 commit 788946f
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 27 deletions.
Binary file modified LibGenSearchApp.exe
Binary file not shown.
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
<div style="display: flex; align-items: flex-start;">
<div style="flex: 1;">
</div>
<div>
<a href="https://libgen.li">
<img align="right" width="99" height="157" src="https://raw.githubusercontent.com/JakeTurner616/simple-libgen-desktop/662f57d03295eaafbc8eaf3c92e4f61fe9793fa6/docs/icon.png">
</a>
</div>
</div>

# simple-libgen-desktop 📚
## simple-libgen-desktop

A straightforward, reliable, and lightweight Libgen library client written in Java that doesn't require database dumps and avoids the common issues that plague Libgen Desktop. It enables direct downloading from the libgen.li and library.lol mirrors.

<div style="text-align: center;">
<p>Using simple-libgen-desktop to search for books and mirrors:</p>
<img src="https://raw.githubusercontent.com/JakeTurner616/simple-libgen-desktop/main/docs/libgendemo200percentspeed.gif" alt="Using the application to find book mirrors" style="display: block; margin: auto;">
</div>
<div style="display: inline-block;">
<p>Using simple-libgen-desktop to search for books and mirrors:</p>
<img src="https://raw.githubusercontent.com/JakeTurner616/simple-libgen-desktop/main/docs/libgendemo200percentspeed.gif" alt="Using the application to find book mirrors">
</div>

## Features 🌟
## Features

- 🔍 Search and download books from libgen.li and library.lol.
- 📖 Displays the list of mirrors for any given book across annas-archive.org, library.lol or any other libgen.li supported mirror.
- 🌐 Allows for filtering against any language and/or any media type.
- 📚 Fetches book details, covers, and direct download URLs across multiple mirrors all in one place.
- ⬇️ Directly download from the libgen.li or library.lol mirror to a selected local location.
- 🚀 Multi-threaded downloading logic allows for downloading more than one book simultaneously without blocking the UI.
- 🔢 Pagination allows for in-depth searching of results.
- 🎨 Uses Java Swing (jswing) and Jsoup for graphics and web scraping, respectively.
- Search and download books from libgen.li and library.lol.
- Displays the list of mirrors for any given book across annas-archive.org, library.lol or any other libgen.li supported mirror.
- Allows for filtering against any language and/or any media type.
- Fetches book details, covers, and direct download URLs across multiple mirrors all in one place.
- Directly download from the libgen.li or library.lol mirror to a selected local location.
- Multi-threaded downloading logic allows for downloading more than one book simultaneously without blocking the UI.
- Pagination allows for in-depth searching of results.
- Uses Java Swing (jswing) and Jsoup for graphics and web scraping, respectively.

## License 📜
## License

This project is licensed under the GNU GPL v3.0 License - see the [LICENSE](https://github.com/JakeTurner616/simple-libgen-desktop/blob/main/LICENSE) file for details.
2 changes: 1 addition & 1 deletion lanuch4j-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>C:\Users\jaked\Documents\simple-libgen-desktop\target\LibGenSearchApp-1.0.1-SNAPSHOT-jar-with-dependencies.jar</jar>
<jar>C:\Users\jaked\Documents\simple-libgen-desktop\target\LibGenSearchApp-1.0.2-SNAPSHOT-jar-with-dependencies.jar</jar>
<outfile>C:\Users\jaked\Documents\simple-libgen-desktop\LibGenSearchApp.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
Expand Down
43 changes: 43 additions & 0 deletions launch.sh
Original file line number Diff line number Diff line change
@@ -1,43 +1,86 @@
#!/bin/bash



# Prevent script from running as root

if [ "$(id -u)" == "0" ]; then

echo "This script should not be run as root. Please run as a normal user."

exit 1

fi



# Set the current directory as the base for relative paths

BASEDIR=$(realpath $(dirname "$0"))



# Classpath including the jsoup library and your application's jar file

CLASSPATH="$BASEDIR/lib/jsoup-1.17.2.jar:$BASEDIR/target/LibGenSearchApp-1.0.1-SNAPSHOT-jar-with-dependencies.jar"



# Main class of your application

MAIN_CLASS="LibGenSearchApp"



# Run the application

java -cp "$CLASSPATH" $MAIN_CLASS



# Uncomment below to add JVM options or application arguments if necessary

# java -cp "$CLASSPATH" $MAIN_CLASS arg1 arg2



# Desktop shortcut file path

DESKTOP_FILE="$HOME/Desktop/simple-libgen-desktop.desktop"



# Check if the desktop file already exists

if [ ! -f "$DESKTOP_FILE" ]; then

echo "[Desktop Entry]" > "$DESKTOP_FILE"

echo "Type=Application" >> "$DESKTOP_FILE"

echo "Name=Simple LibGen Desktop" >> "$DESKTOP_FILE"

echo "Icon=$BASEDIR/docs/icon.png" >> "$DESKTOP_FILE" # Update with the path to your icon

echo "Exec=bash $BASEDIR/launch.sh" >> "$DESKTOP_FILE"

echo "Terminal=false" >> "$DESKTOP_FILE"

echo "Comment=Launch Simple LibGen Application" >> "$DESKTOP_FILE"

echo "Categories=Utility;" >> "$DESKTOP_FILE"



# Make the .desktop file executable

chmod +x "$DESKTOP_FILE"

echo "Desktop shortcut created."

else

echo "Desktop shortcut already exists."

fi

21 changes: 21 additions & 0 deletions launch4j.log
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ Args length: 73/32768 chars
Exit code: 0


Version: 3.50
CmdLine: C:\Users\jaked\Documents\simple-libgen-desktop\LibGenSearchApp.exe --l4j-debug
JNI: No
WOW64: Yes
Working dir: C:\Users\jaked\Documents\simple-libgen-desktop\.
Requires JDK: No
Requires 64-Bit: No
Java min ver:
Java max ver:
Substitute: JAVA_HOME =
Substitute: PATH = C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin;C:\Python39\Scripts\;C:\Python39\;C:\Python311\Scripts\;C:\Python311\;C:\Program Files\Zulu\zulu-19\bin\;C:\Program Files\Oculus\Support\oculus-runtime;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\PuTTY\;C:\Users\jaked\Desktop\ffmpeg.exe;C:\Users\jaked\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Docker\Docker\resources\bin;C:\Users\jaked\Documents\platform-tools\adb.exe;C:\Users\jaked\AppData\Roaming\flutter_windows_3.3.10-stable\flutter\bin;C:\Program Files\Erlang OTP\bin;C:\Program Files\MongoDB\Server\6.0\bin;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Users\jaked\ffmpeg-2023-03-30-git-4d216654ca-essentials_build\bin;C:\Users\jaked\AppData\Roaming\Python\Scripts;C:\Program Files\Calibre2\;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.6\bin;C:\Users\jaked\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\jaked\AppData\Local\Programs\Python\Python312\;C:\Users\jaked\miniconda3;C:\Users\jaked\miniconda3\Library\mingw-w64\bin;C:\Users\jaked\miniconda3\Library\usr\bin;C:\Users\jaked\miniconda3\Library\bin;C:\Users\jaked\miniconda3\Scripts;C:\Users\jaked\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\jaked\AppData\Local\Programs\Python\Python310\;C:\Ruby31-x64\bin;C:\Users\jaked\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\jaked\AppData\Local\Programs\Python\Python38\;C:\Users\jaked\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Nmap;C:\Users\jaked\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\jaked\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\jaked\AppData\Roaming\npm;C:\Users\jaked\jq.exe;C:\Program Files (x86)\GnuWin32\bin\make.exe;C:\Users\jaked\.dotnet\tools;C:\Users\jaked\AppData\Roaming\Python\Scripts;;C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin
JRE paths: ;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin;C:\Python39\Scripts\;C:\Python39\;C:\Python311\Scripts\;C:\Python311\;C:\Program Files\Zulu\zulu-19\bin\;C:\Program Files\Oculus\Support\oculus-runtime;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\PuTTY\;C:\Users\jaked\Desktop\ffmpeg.exe;C:\Users\jaked\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Docker\Docker\resources\bin;C:\Users\jaked\Documents\platform-tools\adb.exe;C:\Users\jaked\AppData\Roaming\flutter_windows_3.3.10-stable\flutter\bin;C:\Program Files\Erlang OTP\bin;C:\Program Files\MongoDB\Server\6.0\bin;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Users\jaked\ffmpeg-2023-03-30-git-4d216654ca-essentials_build\bin;C:\Users\jaked\AppData\Roaming\Python\Scripts;C:\Program Files\Calibre2\;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.6\bin;C:\Users\jaked\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\jaked\AppData\Local\Programs\Python\Python312\;C:\Users\jaked\miniconda3;C:\Users\jaked\miniconda3\Library\mingw-w64\bin;C:\Users\jaked\miniconda3\Library\usr\bin;C:\Users\jaked\miniconda3\Library\bin;C:\Users\jaked\miniconda3\Scripts;C:\Users\jaked\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\jaked\AppData\Local\Programs\Python\Python310\;C:\Ruby31-x64\bin;C:\Users\jaked\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\jaked\AppData\Local\Programs\Python\Python38\;C:\Users\jaked\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Nmap;C:\Users\jaked\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\jaked\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\jaked\AppData\Roaming\npm;C:\Users\jaked\jq.exe;C:\Program Files (x86)\GnuWin32\bin\make.exe;C:\Users\jaked\.dotnet\tools;C:\Users\jaked\AppData\Roaming\Python\Scripts;;C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin
Check launcher: C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common\bin\javaw.exe (not found)
Check launcher: C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin\javaw.exe (OK)
Version string: 1.011.000_018 / 64-Bit (OK)
Launcher: C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin\javaw.exe
Launcher args: -jar "C:\Users\jaked\Documents\simple-libgen-desktop\LibGenSearchApp.exe"
Args length: 73/32768 chars
Exit code: 0


Version: 3.50
CmdLine: C:\Users\jaked\Documents\simple-libgen-desktop\LibGenSearchApp.exe --l4j-debug
JNI: No
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.serverboi</groupId>
<artifactId>LibGenSearchApp</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.2-SNAPSHOT</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/LibGenSearchApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,4 @@ public List<String> getMirrors() {
return mirrors;
}
}
}
}
Binary file not shown.
Binary file modified target/classes/LibGenSearchApp$1.class
Binary file not shown.
Binary file modified target/classes/LibGenSearchApp$ImageClickListener.class
Binary file not shown.
Binary file modified target/classes/LibGenSearchApp$ImageDetails.class
Binary file not shown.
Binary file modified target/classes/LibGenSearchApp.class
Binary file not shown.

0 comments on commit 788946f

Please sign in to comment.