--nextPart1337699.2cq04A4Lq6 Content-Type: text/plain; charset tf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Ilmari Heikkinen: > On 9/17/07, Konrad Meyer <konrad / tylerc.org> wrote: > > Quoth Ilmari Heikkinen: > > > find $MEDIA_LIBRARY_DIR -type f | \ > > > mplayer -identify -ao null -vo null -frames 0 -playlist - | \ > > > grep ID_CLIP_INFO_NAME | sed 's/^.*=//' | sort | uniq > > > > > > (replace $MEDIA_LIBRARY_DIR with the directory name) > > > > > > I'd love to run that but mplayer dies rather early on on some of my files. > > Hmm, here's a ruby version that should work through those: > > media_dir = "music" > seen_names = {} > mpc = "mplayer -identify -ao null -vo null -frames 0 -playlist - 2>/dev/null" > Dir["#{media_dir}/**/*"].each{|fn| > if File.file?(fn) > IO.popen(mpc, "r+"){|mp| > begin > mp.puts fn > mp.close_write > tags = mp.read.strip.split("\n").grep(/^ID_CLIP_INFO_NAME/) > names = tags.map{|t| t.split("=", 2)[1] } > names.each{|n| > seen_names[n] ||= (puts n; true) > } > rescue > end > } > end > } > > > I'd guess one of the libraries you're using for parsing is giving back 40 > > as a genre or track number (a bit high, but might be tagged wrong) and it > > needs to be converted to a string before you can use it. > > Good catch, thanks. Fixed. > http://dark.fhtr.org/repos/metadata/metadata-0.9.tar.gz > > > > > > Thanks! > > -- > > Konrad Meyer <konrad / tylerc.org> http://konrad.sobertillnoon.com/ Just FYI -- I've been running your script since about 6.5 hours ago, I'll reply again when it's actually done. So far no problems. HTH, -- Konrad Meyer <konrad / tylerc.org> http://konrad.sobertillnoon.com/ --nextPart1337699.2cq04A4Lq6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG7yDqCHB0oCiR2cwRAkJxAKCb1YpPhAQVi5sDfsPLz2TatXPl6ACfWKWj pBU3uDimN8PAM0ORZ9i5yjE W0 -----END PGP SIGNATURE----- --nextPart1337699.2cq04A4Lq6--