mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
add MYsan icon and create icons dir in setup
This commit is contained in:
parent
072680d637
commit
a1486457da
BIN
.assets/icons/MYsan.png
Normal file
BIN
.assets/icons/MYsan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 451 KiB |
5
ani-cli
5
ani-cli
@ -11,7 +11,8 @@ VERBOSE=0
|
||||
BASE_URL=$(curl -s -L -o /dev/null -w "%{url_effective}\n" https://gogoanime.cm)
|
||||
CFG_DIR="$XDG_CONFIG_HOME/aniwrapper"
|
||||
ROFI_CFG="meh.rasi"
|
||||
ANIWRAPPER_ICON_PATH="$CFG_DIR/aniwrapper.png"
|
||||
ANIWRAPPER_ICON_PATH="$CFG_DIR/icons/icon-64.png"
|
||||
MAISAN_ICON_PATH="$CFG_DIR/icons/MYsan.png"
|
||||
|
||||
HISTORY_DB="$XDG_CONFIG_HOME/aniwrapper/history.sqlite3"
|
||||
|
||||
@ -494,7 +495,7 @@ open_episode() {
|
||||
# ffmpeg -i "$play_link" -c copy "${anime_id}-${episode}.mkv" >/dev/null 2>&1 &&
|
||||
ffmpeg -i "$play_link" -c copy "${episode}.mkv" >/dev/null 2>&1 &&
|
||||
notify-send -i "$ANIWRAPPER_ICON_PATH" "Download complete for ${anime_id//-/ } - Episode: $episode" ||
|
||||
notify-send -i "$ANIWRAPPER_ICON_PATH" "Download failed for ${anime_id//-/ } - Episode: $episode. Please retry or check your internet connection"
|
||||
notify-send -i "$MAISAN_ICON_PATH" "Download failed for ${anime_id//-/ } - Episode: $episode. Please retry or check your internet connection"
|
||||
# printf "${c_green}Downloaded episode: %s${c_reset}\n" "$episode" ||
|
||||
# printf "${c_red}Download failed episode: %s , please retry or check your internet connection${c_reset}\n" "$episode"
|
||||
}
|
||||
|
21
setup.sh
21
setup.sh
@ -46,14 +46,15 @@ run_setup() {
|
||||
log "History database created..."
|
||||
fi
|
||||
|
||||
if [[ ! -f "$DIR/meh.rasi" ]]; then
|
||||
# Move theme files and skip-intro script to correct locations
|
||||
log "Moving theme files..."
|
||||
cp themes/* "$DIR"/
|
||||
log "Theme files moved..."
|
||||
fi
|
||||
|
||||
log "Creating mpv/scripts/ directory if it doesn't exist..."
|
||||
mkdir -p "$MPV_DIR/scripts/"
|
||||
log "Created mpv scripts directory..."
|
||||
if [[ ! -f "$MPV_DIR/scripts/skip-intro.lua" ]]; then
|
||||
log "Moving skip-intro.lua into mpv scripts directory..."
|
||||
cp lua/skip-intro.lua "$MPV_DIR/scripts/"
|
||||
@ -62,19 +63,19 @@ run_setup() {
|
||||
log "skip-intro.lua already exists in $XDG_CONFIG_HOME/mpv/scripts/"
|
||||
fi
|
||||
|
||||
# install aniwrapper icon
|
||||
if [[ ! -d "$DIR/icons" ]]; then
|
||||
log "Creating icons directory"
|
||||
mkdir -p "$DIR/icons"
|
||||
fi
|
||||
# install aniwrapper icons
|
||||
cp .assets/icons/* "$DIR/icons/"
|
||||
log "Installed icons in config directory..."
|
||||
# xdg-icon-resource install --size 64 ./assets/icons/icon-64.png aniwrapper --novendor
|
||||
cp .assets/icons/icon-64.png "$XDG_CONFIG_HOME/aniwrapper/icon-64.png"
|
||||
}
|
||||
|
||||
if [[ ! -d "$DIR" ]]; then
|
||||
if run_setup; then
|
||||
if run_setup; then
|
||||
log "Setup Complete...."
|
||||
else
|
||||
else
|
||||
printf "%s\n" "There was an error during setup"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
log "Directory exists... skipping setup"
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user