aboutsummaryrefslogtreecommitdiff
path: root/multimedia/straw-viewer
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-10-12 01:26:50 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-10-17 09:37:28 +0700
commite51f9a280083a0c2273c3f27c69e7fd293f84ed4 (patch)
tree3dce0565bb67a9fb12db153b0d3f4ce4f589ec19 /multimedia/straw-viewer
parente31cf7220f01dde203fcf1a6fbf46fb48fbbc365 (diff)
multimedia/straw-viewer: Updated for version 0.1.0.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia/straw-viewer')
-rw-r--r--multimedia/straw-viewer/README23
-rw-r--r--multimedia/straw-viewer/restore_mplayer.diff72
-rw-r--r--multimedia/straw-viewer/straw-viewer.SlackBuild11
-rw-r--r--multimedia/straw-viewer/straw-viewer.info6
4 files changed, 29 insertions, 83 deletions
diff --git a/multimedia/straw-viewer/README b/multimedia/straw-viewer/README
index f9e5dc4e888d..aff15dfd6e40 100644
--- a/multimedia/straw-viewer/README
+++ b/multimedia/straw-viewer/README
@@ -1,8 +1,9 @@
straw-viewer (search and stream videos from youtube)
straw-viewer is a lightweight application for searching and streaming
-videos from YouTube, using the API of invidio.us[2]. The project is in its
-early development stages and some features are not implemented yet.
+videos from YouTube, using the API of invidio.us[2]. The project is
+in its early development stages and some features are not implemented
+yet.
straw-viewer is a fork of youtube-viewer that does not require a Google
API key. Usage and user interface are identical to youtube-viewer.
@@ -28,10 +29,11 @@ Counting optional ones, straw-viewer has over 40 dependencies. To make
life easier, there's a "straw-viewer.sqf" queue file included with this
build, which includes everything listed above.
-This build always includes the command-line client (straw-viewer). For the
-GTK client (gtk-straw-viewer[3]), install perl-Gtk3 and perl-File-ShareDir
-before running this script. If you have them installed but don't want
-gtk-straw-viewer, you can set GTK=no in the script's environment.
+This build always includes the command-line client (straw-viewer). For
+the GTK client (gtk-straw-viewer[3]), install perl-Gtk3 and
+perl-File-ShareDir before running this script. If you have them
+installed but don't want gtk-straw-viewer, you can set GTK=no in the
+script's environment.
Notes:
@@ -41,12 +43,13 @@ Notes:
straw-viewer will fail to play videos at all! If you suspect this,
remove youtube-dl and try without it.
-[2] The default API host is http://invidious.snopyta.org. If straw-viewer gives
+[2] The default API host is http://invidious.snopyta.org. If you get
"Bad gateway" or "Too many requests" errors, try changing the
api_host in ~/.config/straw-viewer/straw-viewer.conf or via
the --api-host option. A list of API hosts can be found at:
https://instances.invidio.us/
-[3] To force gtk-straw-viewer to use your preferred terminal for downloading
- with wget and watching in a terminal, set TERMINAL in the script's
- environment (e.g. TERMINAL="xterm" or TERMINAL="urxvt").
+[3] To force gtk-straw-viewer to use your preferred terminal for
+ downloading with wget and watching in a terminal, set
+ TERMINAL in the script's environment (e.g. TERMINAL="xterm" or
+ TERMINAL="urxvt").
diff --git a/multimedia/straw-viewer/restore_mplayer.diff b/multimedia/straw-viewer/restore_mplayer.diff
index e61d01420c20..1c3f5f82851e 100644
--- a/multimedia/straw-viewer/restore_mplayer.diff
+++ b/multimedia/straw-viewer/restore_mplayer.diff
@@ -1,8 +1,7 @@
-diff --git a/bin/gtk-straw-viewer b/bin/gtk-straw-viewer
-index c6c17dd..9bd9bd8 100755
---- a/bin/gtk-straw-viewer
-+++ b/bin/gtk-straw-viewer
-@@ -161,6 +161,13 @@ my %CONFIG = (
+diff -Naur straw-viewer-0.1.0/bin/gtk-straw-viewer straw-viewer-0.1.0.patched/bin/gtk-straw-viewer
+--- straw-viewer-0.1.0/bin/gtk-straw-viewer 2020-10-06 15:16:34.000000000 -0400
++++ straw-viewer-0.1.0.patched/bin/gtk-straw-viewer 2020-10-12 01:17:39.658582800 -0400
+@@ -160,6 +160,13 @@
fs => q{--fullscreen},
arg => q{--really-quiet --title=*TITLE* --no-ytdl},
},
@@ -16,32 +15,10 @@ index c6c17dd..9bd9bd8 100755
smplayer => {
cmd => q{smplayer},
srt => q{-sub *SUB*},
-@@ -3042,9 +3049,8 @@ sub get_player_command {
- my ($streaming, $video) = @_;
-
- my %MPLAYER;
--
-- $MPLAYER{fullscreen} = $CONFIG{fullscreen} ? $CONFIG{video_players}{$CONFIG{video_player_selected}}{fs} : q{};
-- $MPLAYER{arguments} = $CONFIG{video_players}{$CONFIG{video_player_selected}}{arg} // q{};
-+ $MPLAYER{fullscreen} = $CONFIG{fullscreen} ? $CONFIG{video_players}{$CONFIG{video_player_selected}}{fs} : q{};
-+ $MPLAYER{mplayer_arguments} = $CONFIG{video_players}{$CONFIG{video_player_selected}}{arg} // q{};
-
- my $cmd = join(
- q{ },
-diff --git a/bin/straw-viewer b/bin/straw-viewer
-index 9292f7e..5e4d5b2 100755
---- a/bin/straw-viewer
-+++ b/bin/straw-viewer
-@@ -19,7 +19,7 @@
- # https://github.com/trizen/straw-viewer
- #-------------------------------------------------------
-
--# straw-viewer is a command line utility for streaming YouTube videos in mpv/vlc.
-+# straw-viewer is a command line utility for streaming YouTube videos in mpv/vlc/mplayer.
-
- # This is a fork of youtube-viewer:
- # https://github.com/trizen/youtube-viewer
-@@ -167,11 +167,19 @@ my %CONFIG = (
+diff -Naur straw-viewer-0.1.0/bin/straw-viewer straw-viewer-0.1.0.patched/bin/straw-viewer
+--- straw-viewer-0.1.0/bin/straw-viewer 2020-10-06 15:16:34.000000000 -0400
++++ straw-viewer-0.1.0.patched/bin/straw-viewer 2020-10-12 01:18:57.794575697 -0400
+@@ -153,11 +153,19 @@
arg => q{--really-quiet --title=*TITLE* --no-ytdl},
novideo => q{--no-video},
},
@@ -59,37 +36,6 @@ index 9292f7e..5e4d5b2 100755
$constant{win32}
- ? 'vlc'
+ ? 'mplayer'
- : undef # auto-defined
+ : undef # auto-defined
),
-@@ -1769,6 +1777,21 @@ sub apply_input_arguments {
- return 1;
- }
-
-+# Get mplayer
-+sub get_mplayer {
-+ if ($constant{win32}) {
-+ my $smplayer = catfile($ENV{ProgramFiles}, qw(SMPlayer mplayer mplayer.exe));
-+
-+ if (not -e $smplayer) {
-+ warn "\n\n!!! Please install SMPlayer in order to stream YouTube videos.\n\n";
-+ }
-+
-+ return $smplayer; # Windows MPlayer
-+ }
-+
-+ return 'mplayer'; # *NIX MPlayer
-+}
-+
- # Get term width
- sub get_term_width {
- return $term_width if $constant{win32};
-@@ -3319,7 +3342,7 @@ sub get_player_command {
-
- $MPLAYER{fullscreen} = $opt{fullscreen} ? $opt{video_players}{$opt{video_player_selected}}{fs} // '' : q{};
- $MPLAYER{novideo} = $opt{novideo} ? $opt{video_players}{$opt{video_player_selected}}{novideo} // '' : q{};
-- $MPLAYER{arguments} = $opt{video_players}{$opt{video_player_selected}}{arg} // q{};
-+ $MPLAYER{mplayer_arguments} = $opt{video_players}{$opt{video_player_selected}}{arg} // q{};
-
- my $cmd = join(
- q{ },
diff --git a/multimedia/straw-viewer/straw-viewer.SlackBuild b/multimedia/straw-viewer/straw-viewer.SlackBuild
index 63e89f477d76..09db74f36e29 100644
--- a/multimedia/straw-viewer/straw-viewer.SlackBuild
+++ b/multimedia/straw-viewer/straw-viewer.SlackBuild
@@ -6,12 +6,9 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
-# 20200814 bkw:
-# - update for v0.0.7.
-
-# 20200626 bkw:
-# - update to latest git. Which (for me anyway) works a lot better.
-
+# 20201012 bkw: update for v0.1.0.
+# 20200814 bkw: update for v0.0.7.
+# 20200626 bkw: update to latest git. Which (for me anyway) works a lot better.
# 20200525 bkw:
# - update to latest git.
# - add patch to re-enable mplayer.
@@ -28,7 +25,7 @@
# issues that have been fixed.
PRGNAM=straw-viewer
-VERSION=${VERSION:-0.0.9}
+VERSION=${VERSION:-0.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
diff --git a/multimedia/straw-viewer/straw-viewer.info b/multimedia/straw-viewer/straw-viewer.info
index c8ad26735ccd..d8e1285ce966 100644
--- a/multimedia/straw-viewer/straw-viewer.info
+++ b/multimedia/straw-viewer/straw-viewer.info
@@ -1,8 +1,8 @@
PRGNAM="straw-viewer"
-VERSION="0.0.9"
+VERSION="0.1.0"
HOMEPAGE="https://github.com/trizen/straw-viewer/"
-DOWNLOAD="https://github.com/trizen/straw-viewer/archive/0.0.9/straw-viewer-0.0.9.tar.gz"
-MD5SUM="e96bb2ef0a3f05a94e036aa16a2563a4"
+DOWNLOAD="https://github.com/trizen/straw-viewer/archive/0.1.0/straw-viewer-0.1.0.tar.gz"
+MD5SUM="c7946aed9361e937f49d8c0f98b210e2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="perl-data-dump perl-LWP-Protocol-https perl-JSON perl-Module-Build perl-List-MoreUtils"