The SanDisk sorts by the mp3 info title tag, so I wrote a small script that I run on my podcast files before I load them on my player so that they will show up first in the playlist by prepending '01_' to the mp3 title tag (and using the mp3 filename if the title is nil).
First, install the ruby-mp3info gem if you don't have it:
gem install ruby-mp3info
edit_mp3info_title.rb
require 'rubygems'
require "mp3info"
dir = Dir.open('/Users/dsparlingimbp/PODCAST/mp3')
puts "mp3 directory: #{dir.path}"
dir.each do |file|
next unless /\.mp3$/ =~ file
puts "mp3: #{file}"
mp3file = "#{dir.path}/#{file}"
Mp3Info.open(mp3file) do |mp3|
puts "original title: #{mp3.tag.title}"
title = '01_' + (mp3.tag.title || file)
mp3.tag.title = title
puts "new title: #{mp3.tag.title}"
end
end
No comments:
Post a Comment