kagu 0.4.3 → 0.4.4

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: 7a1a026f110e2fd415d6d19a9995ebfdefd8c9b7
4
- data.tar.gz: a8690585a73b12e321a268693329782f33972037
3
+ metadata.gz: c64b2bce11df1db7eef71c7aa0a3de60c0e6246f
4
+ data.tar.gz: 004ebcd692535602f6ec4a16d0775f8ef2d18ba3
5
5
  SHA512:
6
- metadata.gz: 9e5327dd17acc6485ebdc5d5fc5c8e3475aed55a554a406f274511598f9768dd9833ac026688f354f13ebd94c9d2bc0230b721d66babc202cd2dbe80a5a03520
7
- data.tar.gz: 793de716824423596d29fe77963477c30db6c7f37ed3b8b8ff002220ae3e87d2a1c139b4b9de204332c4a04c4281e10ef8e167b8ecb10b3c9c35a9233f8647f5
6
+ metadata.gz: 2dca79d485bd293043ce57b9e39babe9a5d86c8ee470f25640c8c2ad8ccf4e4129b05b3ca01adf8443955dfad2a207518dbeacf06bbcdab7b0e57f484f2ce8df
7
+ data.tar.gz: 485d551b04e5d8793ab28db422a2713f02dd578ab48e455cec64d73517d6e2f7d2a32567acceffdf2ef8445068f55fece8eae1cccdc17e66e2f31be384034924
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.4
data/lib/kagu/finder.rb CHANGED
@@ -116,8 +116,9 @@ module Kagu
116
116
  @tracks_digests ||= begin
117
117
  [].tap do |tracks_digests|
118
118
  tracks.each do |track|
119
- digests(artist: track.artist, title: track.title).each_with_index do |digest, index|
120
- next if ignored.include?(digest)
119
+ digests = digests(artist: track.artist, title: track.title)
120
+ next if digests.any? { |digest| ignored.include?(digest) }
121
+ digests.each_with_index do |digest, index|
121
122
  tracks_digests[index] ||= {}
122
123
  tracks_digests[index][digest] ||= []
123
124
  tracks_digests[index][digest].push(track)
@@ -114,6 +114,13 @@ describe Kagu::Finder do
114
114
  expect(finder.find(artist: 'korn', title: 'ball tongue')).not_to be_empty
115
115
  end
116
116
 
117
+ it 'does not include ignored tracks for each digest' do
118
+ finder.reload(replacements: { 'blind' => 'foo' })
119
+ expect {
120
+ finder.reload(ignored: 'korn foo', replacements: { 'blind' => 'foo' })
121
+ }.to change { finder.find(artist: 'korn', title: 'blind').size }.to(0)
122
+ end
123
+
117
124
  it 'finds for some tracks with replacements as regexp' do
118
125
  finder.reload(replacements: { /subsonik (\d+)/ => "subsonik podcast \\1" })
119
126
  results = finder.find(artist: 'subsonik', title: '002')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kagu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Toulotte