enklawa 0.1.0 → 0.1.1

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
- ZTJiOTllYjE0NjU0NWU0Y2JiNWIxNGMyNjBkY2FiODhmMWY3YzI2NA==
4
+ MmI4ZjY1YTU2MDYxOTM0ZWFiMTU0NjBmMWVkM2E2ZTZmMGE3YjIxOA==
5
5
  data.tar.gz: !binary |-
6
- YTM5MTY4NTc1ZTlmMWRkZDc5MTFhMzk2ZWUyMDVjMTdjMjZkN2RmOQ==
6
+ NzFkNDhkYmU4MTJmYzk0YjJkYWMwMmE1YmNhYjE3YWJiOGJkOWFhZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MmUxYzNlMzEyZGI5NDlkODc4YTMzOTliNzcwN2Y1MzU2MTU5NjkyMDA4ODhj
10
- YTBhZWMwOTBjNmNkNTkyM2M1MzY1ZmQ1N2E2ZTE1OGJkZDY1Y2FlY2JhZDBh
11
- NmFlOWQ3NTA3NTg4M2MyYjZkOWI0OTMyMTZkOGYzZTY1YmQxZDE=
9
+ OGQ1NDE1YTJhODc2OWI5NGJkYmYyYmZlZDk5OTYyZjVhMzg2ODg4MWY0YjVk
10
+ Y2MwZWFlODQwYjQ2ZGRjNjVkMThiYzdmYWM3ZjczNjkwOWIzNmMyOWNjOTA2
11
+ NzNiMjExY2E1MTAwZjBjZjE0YjVjZTQzZGFhNDEwYWYwODE3ODg=
12
12
  data.tar.gz: !binary |-
13
- M2U1MmQ5MmRhZjI2MGJkYjA0NDc1YmQxZTdiNmY0ZjQzNmZhMmIwMzY4OTg4
14
- Y2RhZTI5MmE2Zjk1ZjFhZWY2YjI2NmQ5YTZjY2YzODRjYWI4N2ZhOTI1NTU1
15
- ZjhiYzc5MGJlNTg2NWUyOTZkMjlhM2E2NGE5ZGVjMGM0NzkzNTM=
13
+ NDI5YWU2ZDJmNDE3ZGJlNmU1MDRlODA0NTMzNTUwNDViYWEwN2MzMGUwOWRi
14
+ MTFhMGQzY2U1NzJhMzUwZTdhNDJkYTRlMmJkODEwNDkxZGVkZmE5YWQ4YmYw
15
+ NWNkYTIzYTAxZjgwMTEyMjgyODg2M2U2ZTBjMWY1NDcwNjQ1ZmQ=
@@ -97,9 +97,13 @@ module Enklawa
97
97
  episode.pub_date = entry.published
98
98
 
99
99
  if episode.mp3
100
- episode.check_if_image_exists_or_use_from_program(program)
101
- episode.duration = entry.enclosure_length.to_i
102
- program << episode
100
+ temp_output_file_name = "/tmp/episode_metadata_#{episode.id}.txt"
101
+ `ffmpeg2theora #{episode.mp3} > #{temp_output_file_name} 2>&1` unless File.exists?(temp_output_file_name)
102
+ if open(temp_output_file_name).read.match(/.+Duration:\s+(\d{2}):(\d{2}):(\d{2}).+/i)
103
+ episode.duration = $3.to_i + ($2.to_i * 60) + ($3.to_i * 60 * 60)
104
+ episode.check_if_image_exists_or_use_from_program(program)
105
+ program << episode
106
+ end
103
107
  end
104
108
  end
105
109
  end
@@ -1,5 +1,5 @@
1
1
  module Enklawa
2
2
  module Api
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enklawa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkadiusz Buras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-12 00:00:00.000000000 Z
11
+ date: 2014-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json