diff --git a/play b/play index 171ac8a..f31eac3 100644 --- a/play +++ b/play @@ -1,26 +1,9 @@ #!/usr/bin/env python - -''' -Copyright (C) 2021 Markil 3 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -''' - import pathlib from pathlib import Path from urllib import parse import subprocess +import os import sys import random from os.path import exists @@ -278,13 +261,13 @@ m3u, playlist Normally, playlists are ignored during the file search. vlcArgs = ["cvlc"] if "l" in options: vlcArgs.append("--loop") - else: - files.append("vlc://quit") + #else: + #files.append("vlc://quit") vlcArgs += files #print(" ".join(vlcArgs)) print("Launching VLC: %s" % (vlcArgs)) - process = subprocess.Popen(vlcArgs, stdout=sys.stdout, stderr=sys.stderr) if not "l" in options: - exit(process.wait()) + os.execvp(vlcArgs[0], vlcArgs) else: + subprocess.Popen(vlcArgs, stdout=sys.stdout, stderr=sys.stderr) exit(0)