mpdcron icon indicating copy to clipboard operation
mpdcron copied to clipboard

Error in homescrape

Open jck opened this issue 13 years ago • 2 comments

When i run homescrape, i get this error after a few entries:

........ Modified 1 entries

  • eugene count 1 "artist='Gran Ronde' and title='Wisdom'" Modified 1 entries
  • eugene count --artist 1 "name='Gran Ronde'" Modified 1 entries /usr/bin/homescrape:125:in sprintf': malformed format string - %' (ArgumentError) from /usr/bin/homescrape:125:inblock in
    ' from /usr/bin/homescrape:77:in call' from /usr/bin/homescrape:77:inblock in fetch' from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:213:in block in each' from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:inupto' from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:in each' from /usr/bin/homescrape:67:infetch' from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:123:in `
    '

jck avatar Jul 22 '10 01:07 jck

It was because the name of the song had a '%' in it, this change to def quote src fixed it: def quote src src.gsub(/'/, "''").gsub(/"/, "\"").gsub(/%/, "%%") end

jck avatar Jul 24 '10 22:07 jck

noted, will fix it shortly

alip avatar Jan 20 '11 17:01 alip