media-jugg 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d82c7602e7ffb370d5c1b1784e75913f57ce44822d865a5967b4c6c712744bc
4
- data.tar.gz: 3d70a05ebc503ae0a9f0fe479daf50b5feea0290b29c42d3b04ea5d3e0ff4f55
3
+ metadata.gz: 4db7d4366d09debf01e75a1d923f25c53701092720bb11d5c17cc32043e857dc
4
+ data.tar.gz: 1ead2cb55775511811051ce5365f27921e44199bfac9776ed13613454d527ff1
5
5
  SHA512:
6
- metadata.gz: 53a329090ea9a3eb519408bf5a1097780a7cd7088f342c2ed5a6c91c5b71403e7c7a32f5e8066a7e802fac365bf363960048d1f73a505a673bcd762e93d20cda
7
- data.tar.gz: 05b67226d054d47a60e5c96bd1a373bdd51bfa2f86cdaa73587ef91e37a181a9635b545baa51ccc2b8130dc1465748df38bfd6207f1c614000b42e69fa69073a
6
+ metadata.gz: 3fc8038399f8f1815205173e44dd90c4053445b9a0708668e633b74a6097cf0551eb24b30b40deeffdc7ede0c2e3319d7cbc03de4a0f59e69bca26f496955211
7
+ data.tar.gz: dca27058624d3ce62536a1fe9004831752c1ffecd71e389f03fba3f29a684542807924361532a23ac0f78f134f970d98c65227c99441b91d8a9bcabd60881b11
data/bin/mediajugg CHANGED
@@ -6,15 +6,21 @@ require 'media_jugg'
6
6
  class MediaJuggCLI < Thor
7
7
  desc "audio URL", "downloads an audio from the matching source"
8
8
  def audio(url)
9
- puts "Downloading your audio now #{url}"
9
+ puts "🔊 Downloading your audio now #{url}"
10
10
  MediaJugg.audio(url)
11
11
  end
12
12
 
13
13
  desc "video URL", "downloads a video from the matching source"
14
14
  def video(url)
15
- puts "Downloading your video now #{url}"
15
+ puts "📼 Downloading your video now #{url}"
16
16
  MediaJugg.video(url)
17
17
  end
18
+
19
+ desc "subtitles URL", "downloads the subtitles from matching source"
20
+ def subtitles(url)
21
+ puts "📝 Downloading subtitles for video: #{url}"
22
+ MediaJugg.subtitles(url)
23
+ end
18
24
  end
19
25
 
20
26
  MediaJuggCLI.start(ARGV)
data/dlp/ytdlp_runner.py CHANGED
@@ -5,10 +5,6 @@ import argparse
5
5
 
6
6
 
7
7
  youtube_url = sys.argv[1]
8
- print("YT URL FROM ARG IS", youtube_url)
9
8
  yt_opts = yt_dlp.parse_options(sys.argv[2:]).ydl_opts
10
- print("YT OPTS IS", yt_opts)
11
9
  ydl = yt_dlp.YoutubeDL(yt_opts)
12
- print("Did YDL")
13
- ydl.download(youtube_url)
14
- print("DID DL")
10
+ ydl.download(youtube_url)
data/lib/media_jugg.rb CHANGED
@@ -10,5 +10,9 @@ class MediaJugg
10
10
  def video(url)
11
11
  dlp_runner(url, '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]', '-S', 'vcodec:h264')
12
12
  end
13
+
14
+ def subtitles(url)
15
+ dlp_runner(url, '--write-subs', '--write-auto-subs', '--skip-download', '--sub-lang', "en")
16
+ end
13
17
  end
14
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: media-jugg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Indigo Tech