ektoplayer 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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f7e3bffc50021abf9f3c8384db4c81952abb036
4
- data.tar.gz: a7d7612d2175422b4e1f59d01e6c3992915bbb6c
3
+ metadata.gz: df13d5e7cb639805cb5a974d6c6e139026080839
4
+ data.tar.gz: fe7d880c84897d5ab4543af17438ea6edcd214b8
5
5
  SHA512:
6
- metadata.gz: 788048c6464ae80c0d1d1ef2d0a85a307787ab8d8b7116cb4f2bf934223087238d5eb2af9ce48973899a248daee415aca40a23cf3a63c80d2554ab5a8fd7c8a7
7
- data.tar.gz: 16bb67c65cd1b0b6c530d4f6e74f36b32d3a727e44125c8ba29c1b5e1d467362ec36d5b81ceb7a6ce5aa223d4cedd6accd8ea354b2f871d765fd581c1b82cd1a
6
+ metadata.gz: 24bf8f5c2f04a43862146b218493716196c29cd4646f0c0db21d79786249178c6a89993975e68660a245265f548efdb5c1aaaf87eaa82862e50f9b873f173b20
7
+ data.tar.gz: 7bee87109a42bcb4e06be0ea4d50bc1f19243ab315494598fe5f6e540dd874f034e491f6f12f26d38f1fdc05004426757fa8d5c038862fd4f6499786b3d54fb5
@@ -10,7 +10,7 @@ require 'date'
10
10
 
11
11
  module Ektoplayer
12
12
  class Application
13
- VERSION = '0.1'.freeze
13
+ VERSION = '0.1.1'.freeze
14
14
  GITHUB_URL = 'https://github.com/braph/ektoplayer'.freeze
15
15
  EKTOPLAZM_URL = 'http://www.ektoplazm.com'.freeze
16
16
 
@@ -23,7 +23,7 @@ module Ektoplayer
23
23
  $stderr.puts("#{DateTime.now.rfc3339} #{from}.#{func}: " + msgs.join(' '))
24
24
 
25
25
  if e = msgs.select { |m| m.kind_of?Exception }[0]
26
- $stderr.puts "#{e.backtrace.first}: #{e.message} (#{e.class})", e.backtrace.drop(1).map{|s| "\t#{s}"}
26
+ $stderr.puts "#{e.backtrace.first}: #{e.message} (#{e.class})", e.backtrace.join(?\n)
27
27
  end
28
28
  $stderr.flush
29
29
  end
@@ -16,23 +16,25 @@ module Ektoplayer
16
16
  def download_album(index)
17
17
  return unless track = @playlist[index]
18
18
  Thread.new do
19
- @trackloader.download_album(track['url'])
19
+ @trackloader.download_album(track['url']) rescue (
20
+ Application.log(self, $!)
21
+ )
20
22
  end
21
23
  end
22
24
 
23
25
  def reload(index)
24
26
  return unless track = @playlist[index]
25
27
  Thread.new do
26
- @trackloader.get_track_file(track['url'], reload: true)
28
+ @trackloader.get_track_file(track['url'], reload: true) rescue (
29
+ Application.log(self, $!)
30
+ )
27
31
  end
28
32
  end
29
33
 
30
34
  def play(index)
31
35
  return unless track = @playlist[index]
32
- Thread.new do
33
- @playlist.current_playing=(index)
34
- @player.play(@trackloader.get_track_file(track['url']))
35
- end
36
+ @playlist.current_playing=(index)
37
+ @player.play(@trackloader.get_track_file(track['url']))
36
38
  end
37
39
 
38
40
  def play_next
@@ -54,7 +54,7 @@ module Ektoplayer
54
54
  FileUtils::rm(dl.file) rescue nil
55
55
  end
56
56
 
57
- @download << dl.start!
57
+ @downloads << dl.start!
58
58
  end
59
59
 
60
60
  def get_track_file(url, reload: false)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ektoplayer
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
  - Benjamin Abendroth