enklawa 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjU0N2YyZjE0ZTM0NDA3Yjg4MjVjNGE1YzE3MjJlYTM0MjVmY2IzZA==
4
+ MjRjYmQ1NDZmMDEzZjJiYmQwYTk3OTUyZjgwYTBjNGViZTFmZTEzYg==
5
5
  data.tar.gz: !binary |-
6
- YTUyZWE4YzU1MWRlN2U2ODBlZDkzYTA2OWIzZGFmMTZhMjdmMzE1Mw==
6
+ YWY3Y2FjOTE3ZmQxYTU4Yjc5NjYzZmQ0Y2YzMWM3MmYxMTJkYzA5YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWU4YmFkNGVmYmM0YmI1Mjg3NmY1OTg3MGQ5NTU5ZGFiOGY3ZmNlYjliMGFi
10
- Mzg1YTg5NGMwNTkzODk3NWY5NWEyNDEwODFjMGFhZjdkZWZiMzg4Y2QyNTk5
11
- MGJhN2NiNWFhMzI0NWZiYTc0OTdiMjdiNDY4YTI5YmI3Zjc3YzU=
9
+ ODUyYWE3OGQ0MjdjMzAxOGM2MDdlNWZhNDYyMTQ5ZjdmMjg0ODU4YjY4ZmZi
10
+ ZTIxNjZiZmJlOTA2ZjlhM2NlNGIzNTJjZGFlMTQwZWI3Zjc0NmYyZWExMDVi
11
+ NTkzZGJhN2E0MmQ2YjQyN2VjMTQ5NzBlMDhiZDAxMDlhYTYxMzY=
12
12
  data.tar.gz: !binary |-
13
- MzUzNGM3OWQxM2JhNzIwNGViNjE2ZDU2NmEyOGE0ZDU1ODgyNzY2YTAzMGQ1
14
- NDczMzIzYmNiNDMwZTdjZDhjMzU1MDBlODYzOTc1NzI5MDQyNDBjMzNjM2M2
15
- ZTkwY2U5OTBjYTU3ZjlkNTUzMGRiZmE4YTU1ZDNlM2YwOWUwYWQ=
13
+ ZDViYmE2MzNhZmQ5NzNmZDQ4MzcyMjg4OGFiNjhlNjIyMTgzMGY4YmRmY2Ri
14
+ YzJmOTc4OTU5Nzc0YTRjNGYzMzIzMDMzZGIwODE4YjNkMzViZTRkNmU3NjI2
15
+ ODJkZDZiNjgxOTkyNzM1MDZlYWVhYjA3ZWY2Yjc0M2UzYzkyY2E=
@@ -113,7 +113,7 @@ module Enklawa
113
113
 
114
114
  def get_duration(episode)
115
115
  return @cache['durations'][episode.id] if @cache['durations'].key?(episode.id)
116
-
116
+
117
117
  duration = nil
118
118
  temp_output_file_name = "/tmp/episode_metadata.txt"
119
119
  `ffmpeg2theora #{episode.mp3} > #{temp_output_file_name} 2>&1`
@@ -135,13 +135,9 @@ module Enklawa
135
135
  episode.pub_date = entry.published
136
136
 
137
137
  if episode.mp3
138
- temp_output_file_name = "/tmp/episode_metadata_#{episode.id}.txt"
139
- `ffmpeg2theora #{episode.mp3} > #{temp_output_file_name} 2>&1` unless File.exists?(temp_output_file_name)
140
- if open(temp_output_file_name).read.match(/.+Duration:\s+(\d{2}):(\d{2}):(\d{2}).+/i)
141
- episode.duration =
142
- episode.image = check_if_image_exists_or_use_from_program(program, episode)
143
- program << episode
144
- end
138
+ episode.duration = get_duration(episode)
139
+ episode.image = check_if_image_exists_or_use_from_program(program, episode)
140
+ program << episode if episode.duration
145
141
  end
146
142
  end
147
143
  end
@@ -1,5 +1,5 @@
1
1
  module Enklawa
2
2
  module Api
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enklawa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkadiusz Buras