[mythtv-users] Re: m3u2myth.pl inserting empty playlists

Grant Edwards grante at visi.com
Tue Aug 31 15:31:05 EDT 2004


On Tue, Aug 31, 2004 at 02:05:06PM -0500, m0j0.j0j0 wrote:

>> The only useful-looking thing google could find was this Perl
>> program:
>> 
>>   http://www.foofus.net/jmk/mythtv/m3u2myth.pl
> 
> heh. Someone actually downloaded something I wrote and tried it. Cool.
> ;)

>>   Reading data from m3u file...
>>   Inserting new playlist to DB: Van Morrison - Moondance:
>> 
>> From what I can tell from looking at the m3u2myth.pl source
>> code, there is supposed to be a songlist output after that
>> second colon.  But the song list is always empty.  Beyond
>> that, I've been unable to decipher the Perl code.
> 
> I took a quick look at the code again (it's been a while since
> I wrote it or used it) to see what's going on. 
> 
> Are your MP3 already in the MythMusic DB?

Yes.

> The script grabs the ID for each file by matching the filename
> listed in the m3u to that in the DB.

Yup, that's what I thought.  That step isn't finding any
matching filenames.

> If the MP3s are not already in the DB or your m3u uses a
> different path than the DB (say Windows: c:\blah\foo.mp3),

I tried m3u files with absolute paths like this:

/data/music/Van_Morrison/Moondance/Moondance.mp3

and m3u files with paths relative to the "music" directory like
this

Van_Morrison/Moondance/Moondance.mp3


Neither one worked.  

I haven't been able to figure out is what the filenames are in
the DB actually are.  I'm going to grab the MySQL module for
Python sometime and see how much damage I can do with that.

I suppose I could to MySQL command-line stuff, but that's just
a bit scary.

> things aren't going to work. All my machines are Linux with
> the same directory structure, so the script suited my needs.
> 
> I should probably add some nice error messages to the script.
> Maybe someday when I have some free time...

Unfortunately I don't know enough Perl to be of any help.

-- 
Grant Edwards
grante at visi.com


More information about the mythtv-users mailing list