Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

QMPlay2 and youtube videos (Wrap script)

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

QMPlay2 and youtube videos (Wrap script)

#1 Post by bester69 »

Ive just installed qmplay2 to watch youtube videos, and I saw it didnt load direct url but preformatted one, So I did the following script to parse youtube url's and to be able to load a plain youtube playlist file as well.:

qmplay2.sh
Uses.:
qmplay2 Anyfile.mp4
qmplay2 https://www.youtube.com/watch?v=NBj-XsIDk94
qmplay2 PlaylistYoutube.txt

Code: Select all

#!/bin/bash
#
export PATH=$PATH:/opt/QMPlay2/bin
LIBDIR=/opt/QMPlay2/lib/
export HOME=/home/user
flgtxt=0
fileproc="/tmp/$1"
if [ -f "$1" ]
then

A="$(file  "$1")"
 case "$A" in
    *"ASCII"* )  
    echo "es aSCII"
    flgtxt=1
        ;;
    * )
        echo "Sin Error..."
        ;;
    esac
fi


 if [ "$flgtxt" -eq "1" ]
  then
  echo "es aSCII"
  sort -uR "$1" | head -n 20 > "$fileproc"
    QMPlay2 &
sleep 3
  while IFS='' read -r line || [[ -n "$line" ]]; do
echo "$line"
 case "$line" in
    *"www.youtube.com"* )  
    echo "es youtube"
    QMPlay2 --enqueue YouTube://{"$line"} &
    sleep 1
        ;;
    * )
        echo "No es Youtube, Error..."
        ;;
    esac

done < "$fileproc"
   exit
  fi

 case "$1" in
    *"www.youtube.com"* )  
    echo "es youtube"
    QMPlay2 YouTube://{"$1"} 
        ;;
    * )
        echo "Sin Error..."
        echo "$@" 
        #QMPlay2 "$1" &
        QMPlay2 "file://$(readlink -e "$1")"
        ;;
    esac

bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: QMPlay2 and youtube videos (Wrap script)

#2 Post by stevepusser »

I take it that you didn't install my build, since the binary is in /opt instead of /usr/bin.
MX Linux packager and developer

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: QMPlay2 and youtube videos (Wrap script)

#3 Post by bester69 »

stevepusser wrote:I take it that you didn't install my build, since the binary is in /opt instead of /usr/bin.
yeah, I realised after installed, I supposed it might be in your repos. but I installed it for testing... Ive your repos. in my source list, but Ive them commented.. I installed ubuntu's version :? , Im goint to fix this and install it from your repos.


Thanks Steve. :wink:
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: QMPlay2 and youtube videos (Wrap script)

#4 Post by bester69 »

installed. It works great

Code: Select all

sudo aptitude versions qmplay2
Package qmplay2:                              
i   1:18.12.26-2~obs              
Thanks Steve.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: QMPlay2 and youtube videos (Wrap script)

#5 Post by stevepusser »

I fixed the Buster and Sid builds just after I asked you--apparently qttools5-dev doesn't get pulled in automatically by another qt5 package like it does in Stretch. Go figure. https://build.opensuse.org/package/show ... mplay2-qt5
MX Linux packager and developer

Post Reply