5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/playa/views/playlist_view.rb', line 5
def render
view 'playlist' do
self.object.view.each do |sel, cur, item|
if sel && cur
line do
stream do
width title_width(item)
text "\u{25B6}> #{item.title}"
end
stream do
width timer_width(item)
text "#{timer(item)}"
align :right
end
end
elsif cur
line do
stream do
width title_width(item)
text " > #{item.title}"
end
stream do
width timer_width(item)
text "#{timer(item)}"
align :right
end
end
elsif sel
line do
stream do
width title_width(item)
text "\u{25B6} #{item.title}"
end
stream do
width timer_width(item)
text "#{timer(item)}"
align :right
end
end
else
line do
stream do
width title_width(item)
text " #{item.title}"
end
stream do
width timer_width(item)
text "#{timer(item)}"
align :right
end
end
end
end
end
end
|