ektoplayer 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ektoplayer/application.rb +3 -1
- data/lib/ektoplayer/browsepage.rb +15 -5
- data/lib/ektoplayer/views/info.rb +5 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb06ab1d760e586affdc548cf3c622323736700c
|
4
|
+
data.tar.gz: 147c4ab4a4a71f4acae9bcc963da610daba75f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab09617d8346b932adb34879a6400c79af7c8e14e348908161d0bd9f1bfc1b9a35547504c1dbdda0d281dda13435a2b3fdf03b6a0ed45d3710cc761d4ff1d0dc
|
7
|
+
data.tar.gz: ec888b4104511631aa3d3366896e2591252d398cfeece159bd7027de2860470b6b7144b03998af879461f75af5fbd17fcdf1ccad7ae910a1df1b8853550f44e9
|
@@ -10,9 +10,11 @@ require 'date'
|
|
10
10
|
|
11
11
|
module Ektoplayer
|
12
12
|
class Application
|
13
|
-
VERSION = '0.1.
|
13
|
+
VERSION = '0.1.12'.freeze
|
14
14
|
GITHUB_URL = 'https://github.com/braph/ektoplayer'.freeze
|
15
15
|
EKTOPLAZM_URL = 'http://www.ektoplazm.com'.freeze
|
16
|
+
EKTOPLAZM_ALBUM_BASE_URL = EKTOPLAZM_URL + '/free-music'.freeze
|
17
|
+
EKTOPLAZM_COVER_BASE_URL = EKTOPLAZM_URL + '/img'.freeze
|
16
18
|
|
17
19
|
CONFIG_DIR = File.join(Dir.home, '.config', 'ektoplayer').freeze
|
18
20
|
CONFIG_FILE = File.join(CONFIG_DIR, 'ektoplayer.rc').freeze
|
@@ -4,6 +4,7 @@ require 'nokogiri'
|
|
4
4
|
require 'date'
|
5
5
|
require 'base64'
|
6
6
|
require 'scanf'
|
7
|
+
require 'uri'
|
7
8
|
require 'open-uri'
|
8
9
|
|
9
10
|
module Ektoplayer
|
@@ -60,23 +61,32 @@ module Ektoplayer
|
|
60
61
|
album[:styles] << a.text
|
61
62
|
end
|
62
63
|
|
63
|
-
album[:
|
64
|
-
|
64
|
+
album[:description] = post.at_css(?p).
|
65
|
+
to_html.sub(/^<p>/, '').sub(/<\/p>$/, '') rescue ''
|
66
|
+
|
67
|
+
begin album[:cover_url] = File.basename(
|
68
|
+
URI.parse(post.at_css('.cover')[:src]).path
|
69
|
+
)
|
70
|
+
rescue
|
71
|
+
end
|
72
|
+
|
65
73
|
album[:download_count] = post.at_css('.dc strong').text.delete(?,).to_i rescue 0
|
66
74
|
|
67
75
|
post.css('h1 a').each do |a|
|
68
76
|
album[:title] = a.text
|
69
|
-
album[:url] = a[:href]
|
77
|
+
album[:url] = File.basename(URI.parse(a[:href]).path)
|
70
78
|
end
|
71
79
|
|
72
80
|
post.xpath('.//a[@rel="tag"]').each do |a|
|
73
81
|
album[:released_by] = a.text
|
74
|
-
album[:released_by_url] = a[:href]
|
82
|
+
album[:released_by_url] = File.basename(URI.parse(a[:href]).path)
|
83
|
+
# todo
|
75
84
|
end
|
76
85
|
|
77
86
|
post.xpath('.//a[@rel="author external"]').each do |a|
|
78
87
|
album[:posted_by] = a.text
|
79
|
-
album[:posted_by_url] = a[:href]
|
88
|
+
album[:posted_by_url] = File.basename(URI.parse(a[:href]).path)
|
89
|
+
# todo
|
80
90
|
end
|
81
91
|
|
82
92
|
album[:archive_urls] = post.css('.dll a').map do |a|
|
@@ -69,6 +69,10 @@ module Ektoplayer
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
+
def get_cover_url(album)
|
73
|
+
"#{Application::EKTOPLAZM_COVER_BASE_URL}/#{album}"
|
74
|
+
end
|
75
|
+
|
72
76
|
def draw
|
73
77
|
return unless @player
|
74
78
|
|
@@ -108,7 +112,7 @@ module Ektoplayer
|
|
108
112
|
draw_tag('Styles', @track['styles'].gsub(?,, ', '))
|
109
113
|
draw_tag('Downloads', @track['download_count'])
|
110
114
|
draw_tag('Rating', "%0.2d%% (%d Votes)" % [@track['rating'], @track['votes']])
|
111
|
-
draw_tag('Cover'); draw_url(@track['cover_url'], 'Cover')
|
115
|
+
draw_tag('Cover'); draw_url(get_cover_url(@track['cover_url']), 'Cover')
|
112
116
|
@win.next_line
|
113
117
|
|
114
118
|
# -- description
|
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.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Abendroth
|
@@ -123,9 +123,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements:
|
126
|
-
- 'For playback: /bin/mpg123 or the "audite-lib"
|
127
|
-
- 'For archive extracting: /bin/unzip, /bin/7z or "rubyzip"
|
128
|
-
- 'One of
|
126
|
+
- 'For playback: /bin/mpg123 or the "audite-lib" gem'
|
127
|
+
- 'For archive extracting: /bin/unzip, /bin/7z or the "rubyzip" gem'
|
128
|
+
- 'One of these curses-gems: ffi-ncurses, ncurses, ncursesw, curses'
|
129
129
|
rubyforge_project:
|
130
130
|
rubygems_version: 2.6.8
|
131
131
|
signing_key:
|