-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopcorn
More file actions
executable file
·50 lines (45 loc) · 2.01 KB
/
popcorn
File metadata and controls
executable file
·50 lines (45 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: popcorn
# Created: 2020/03/06 - 19:26:02
# Author.: @fbnmtz, fgm (fabiano.matoz@gmail.com)
# (take idea for another script)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Monday, 2024/12/09 - 17:40:49
# Modified By..: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 1.1.14.300
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# > popcorn (term version)
# use terminial to watch movies / series.
# you search for a name, get a list of torrents and select one to watch
# directly in mpv
#
# we use two programs
# * pirateget (finds and downloads torrents from the Pirate Bay)
# * peerflix (open a magnetlink, download and open video in a given player (mpv))
# ############################################################################
# HISTORY:
#
# shellcheck disable=SC1090 # SC1090: Can't follow non-constant source. Use a directive to specify location.
source "$xSHELL_INIT"
use args popcorn.lib
xrequirements pirate-get peerflix
xarg --id -H,--history --var f:h --desc "show search history"
xarg --id -m,--magnet --var f:m,magnet+r --desc "magnet link for download"
xarg --id -p,--player --var f:p,player+r --desc "set player to watch torrent"
xarg --id -s,--search --var f:s,search+r --desc "term for search a torrent"
xarg --id -S,--status --var f:S --desc "show popcorn status"
xarg --id -w,--web --var f:w --desc "start peerfliex web interface"
xrun --xversionrc --xrequire-one --xcolors "$@"
case "$f" in
h ) pHistory ;;
m ) pMagnet ;;
w ) pWeb ;;
S ) pStatus ;;
s|*) pSearch "$@" ;;
esac
runApp