fyt 1.1.1.pre2 → 1.1.1.pre3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36214c5dd023e949b1747697e4bb655f9e05d57c
4
- data.tar.gz: 41dfc80a442861d5bfb628f00bdabcf6a02b00c7
3
+ metadata.gz: 99ddb6f0c28e0097332cb98626c6e61d00bceba8
4
+ data.tar.gz: 8e9c2f6adaad7f08292822110b29d76496827a05
5
5
  SHA512:
6
- metadata.gz: '0886efdeb76f7c6f8ea1b6c099f2906f3e1c01ad6a76ab3c2bd0b943826398e3348a97dce011fb7737ae9fd695af934cfb1c4d5b9864ddf99b499c13af3ca707'
7
- data.tar.gz: d73abaf0a06de21f359362f36c4ef61bb49c4df88a4b5dc7c9be4f14b3306b3f84248f2d33453866432d05fc8192bc2a8e75b8f785b1f69cb2a9937a13cc5e34
6
+ metadata.gz: af08b83bedaee9a4d401e286054df76ab17da29fca377e9614564df7e8ee01f70801a18c8273ed6c6589effe832bf392ca7dd39631e9a1808ec5cbb9863941a6
7
+ data.tar.gz: b5e871f6448e936f9fec127206034f054d60d4b09d555b953f20403af7e87717b236663fd4c334ca7ef71f9c927cb80766ea9647b4ef24c97817c73b1cfd1305
data/lib/fyt/builder.rb CHANGED
@@ -53,7 +53,10 @@ module FYT
53
53
  rescue OpenURI::HTTPError => e
54
54
  logger.debug "OpenURI::HTTPError: #{e.message}"
55
55
  rescue
56
- add_image(youtube_url, title)
56
+ @add_image_counter ||= 0
57
+ @add_image_counter += 1
58
+
59
+ add_image(youtube_url, title) if @add_image_counter < 3
57
60
  end
58
61
 
59
62
  def add_item(link, title, filename)
data/lib/fyt/parser.rb CHANGED
@@ -17,7 +17,10 @@ module FYT
17
17
  return RSS::Parser.parse(rss, false)
18
18
  end
19
19
  rescue
20
- read
20
+ @read_counter ||= 0
21
+ @read_counter += 1
22
+
23
+ read if @read_counter < 3
21
24
  end
22
25
  end
23
26
  end
data/lib/fyt/storage.rb CHANGED
@@ -66,7 +66,10 @@ module FYT
66
66
 
67
67
  execute "youtube-dl #{options_string}"
68
68
  rescue
69
- download_file!(url, output_path)
69
+ @download_counter ||= 0
70
+ @download_counter += 1
71
+
72
+ download_file!(url, output_path) if @download_counter < 3
70
73
  end
71
74
 
72
75
  def execute(command_string)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fyt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1.pre2
4
+ version: 1.1.1.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steffen Schröder