From 4346bf79bcaa6c64092f885b68e969d3de110424 Mon Sep 17 00:00:00 2001 From: coolnsx Date: Thu, 22 May 2025 16:59:50 +0530 Subject: [PATCH] feat: title in mpv android --- .functions | 2 +- ani-new | 2 +- download | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.functions b/.functions index 169d668..dad8f01 100644 --- a/.functions +++ b/.functions @@ -44,7 +44,7 @@ error_linux() { } player_droid() { - am start --user 0 -a android.intent.action.VIEW -d "$1" -n is.xyz.mpv/.MPVActivity >/dev/null 2>&1 + am start --user 0 -a android.intent.action.VIEW -d "$1" -n is.xyz.mpv/.MPVActivity -e "title" "$2" >/dev/null 2>&1 #am start --user 0 -a android.intent.action.VIEW -d "$1" -n org.videolan.vlc/org.videolan.vlc.gui.video.VideoPlayerActivity -e "title" "$2" >/dev/null 2>&1 } diff --git a/ani-new b/ani-new index 6421635..f70c9c3 100755 --- a/ani-new +++ b/ani-new @@ -70,7 +70,7 @@ printf "%s\n" "$url" | while read -r id title; do case $choice in stream) info_$os "opening $title" "mpv" - player_$os "$provider_video" "$title" "--http-header-fields='Referer: https://$domain' --sub-file='$subtitle'" + player_$os "$provider_video" "$title" "--referrer='https://$domain' --sub-file='$subtitle'" break ;; cast) diff --git a/download b/download index d4e0981..bdd9331 100755 --- a/download +++ b/download @@ -101,9 +101,7 @@ esac if [ -n "$fallback" ]; then info "Using fallback" "$app" "$id" - filename="$(date +%s).mp4" - yt-dlp --no-skip-unavailable-fragments --fragment-retries infinite -N 16 -S 'res,ext:mp4:m4a' --recode mp4 "$link" -o "$filename" - mv -v "$filename" "$download_dir" + yt-dlp --no-skip-unavailable-fragments --fragment-retries infinite -N 16 -S 'res,ext:mp4:m4a' --recode mp4 "$link" -o "$download_dir/%(title)s.%(ext)s" else info "Downloading Video" "$app" "$id" printf "%s" "$video_url" | aria2c -x16 -s16 -j10 -k'1M' --user-agent="$agent" -d "$download_dir" -i - --download-result=hide --summary-interval=0 || notify_$os "Unable to Download $app Video"