|
|
|
@ -3,6 +3,7 @@ import yaml
|
|
|
|
import asyncio
|
|
|
|
import asyncio
|
|
|
|
import warnings
|
|
|
|
import warnings
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
import os
|
|
|
|
from concurrent.futures import ThreadPoolExecutor
|
|
|
|
from concurrent.futures import ThreadPoolExecutor
|
|
|
|
from API import Fetcher
|
|
|
|
from API import Fetcher
|
|
|
|
from Render import Article
|
|
|
|
from Render import Article
|
|
|
|
@ -220,10 +221,10 @@ class Links(urwid.ListBox):
|
|
|
|
def parseLink(self, link):
|
|
|
|
def parseLink(self, link):
|
|
|
|
ext = link.split(".")[-1]
|
|
|
|
ext = link.split(".")[-1]
|
|
|
|
if ext.lower() in ("jpg", "jpeg", "gif", "png", "tif", "tiff"):
|
|
|
|
if ext.lower() in ("jpg", "jpeg", "gif", "png", "tif", "tiff"):
|
|
|
|
subprocess.Popen(['feh', link])
|
|
|
|
os.system('nohup feh ' + link + ' 2>/dev/null &')
|
|
|
|
elif Utils.checkStreamingVideo(link):
|
|
|
|
elif Utils.checkStreamingVideo(link):
|
|
|
|
tui.destroyOverlay()
|
|
|
|
tui.destroyOverlay()
|
|
|
|
subprocess.Popen(['mpv', "--ytdl-format=bestvideo[height<=720]+bestaudio/best[height<=720]", link])
|
|
|
|
os.system('nohup mpv --ytdl-format="bestvideo[height<=720]+bestaudio/best[height<=720]" "' + link + '" 2>/dev/null &')
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
subprocess.Popen(['firefox', '-new-tab', link])
|
|
|
|
subprocess.Popen(['firefox', '-new-tab', link])
|
|
|
|
|
|
|
|
|
|
|
|
|