Menu

#101 import.pl fails when mp3 doesn't have a tracknumber

open
nobody
None
3
2005-03-12
2004-12-23
No

I don't understand this one, because the database
allows nulls in this field (songs.trackno).

Here's the error:

No Directory Given, current dir assumed. (use -h for
command line options)
DBD::mysql::st execute failed: You have an error in
your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use
near 'NULL,'1993','','57',0)' at line 1 at
/usr/local/jukebox/import.pl line 527.
DBD::mysql::st execute failed: You have an error in
your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use
near 'NULL,'57','1993','')' at line 1 at
/usr/local/jukebox/import.pl line 529.
Adding: Bob Rivers & Twisted Radio - Jingle Hells Bells
- I Am Santa Claus - /mp3/incoming/eSanta.com - Bob
Rivers & Twisted Radio - Jingle Hells Bells.mp3

Attaching simple fix, will always create tracknum=0 if
tracknum isn't there. This fixed the problem for me.

Discussion

  • William Skellenger

    Patch for import.pl

     
  • Roel Adriaans

    Roel Adriaans - 2004-12-28

    Logged In: YES
    user_id=470115

    This is a weird one. Does this happen with every mp3 without
    a tracknumber or with some files? Eg, is it easy reproduceable?

    If it is try add a song with verbose comments turned on.

    I've imported hunderds songs without tracknumbers without
    problems.

    I don't like this fix btw, it fixes the problem without
    fixing what caused the problem. I want and have a lot files
    in my database with null as trackno, it should work and not
    with trackno 0.

     
  • Nobody/Anonymous

    Logged In: NO

    Try downloading and adding same song from esanta.com --
    so-called "free" MP3 Christmas music. See if the error
    happens for you.

     
  • Roel Adriaans

    Roel Adriaans - 2004-12-31

    Logged In: YES
    user_id=470115

    Argh, CTRL-W closes a tab in firefox, not remove last word.

    But it works here:

    flapbeast /usr/local/jukebox # ./import.pl
    /home/roel/eSanta.com\ -\ BobTwisted\ Radio\ -\ Jingle\
    Hells\ Bells.mp3
    Adding: Bob Rivers & Twisted Radio - Jingle Hells Bells - I
    Am Santa Claus - /home/roel/eSanta.com - BobTwisted Radio -
    Jingle Hells Bells.mp3

    I tried it on my laptop, my development installation and my
    normal music playing gjukebox installation without problems.
    I also tried adding other mp3's without tracknumbers, they
    all worked fine.

    The problem has to be somewere else, can you try to run
    import.pl with the verbose option?

     
  • Paradxum

    Paradxum - 2005-03-12
    • priority: 5 --> 3
     
  • Paradxum

    Paradxum - 2005-03-12

    Logged In: YES
    user_id=596175

    I agree with helldesk. I have never come across this problem
    and I import tons of songs (some with trackno's some
    without.) I'd love to see the execution. If you e-mail me at
    my sf account I'll give you a place to upload the offending
    mp3 and see if I can reproduce the effect.

     
  • William Skellenger

    Logged In: YES
    user_id=631721

    Roel/Eric: Maybe it is an issue unique to my machine.

    Could you please check the following:

    # mysql -V
    mysql Ver 12.22 Distrib 4.0.21, for pc-linux-gnu (i386)

    # perl -v
    This is perl, v5.8.2 built for i386-linux
    Copyright 1987-2003, Larry Wall

    #perl -MCPAN -e shell

    cpan> m DBI
    <...snipped garbage...>
    INST_VERSION 1.45

    cpan> m DBD::mysql
    <...snipped again...>
    INST_VERSION 2.1027

    The issue must be related to one of the supporting packages.
    I have the issue as posted above, and my guess is that I've
    got newer packages than either of you, as I'm a new user and
    this was a completely new Linux install as of November 2004.

    I will back out my changes and run import.pl with the
    verbose option shortly. I've been away from home on
    business for the winter, will be getting back into this in
    the next few weeks.

     
  • Roel Adriaans

    Roel Adriaans - 2005-03-12

    Logged In: YES
    user_id=470115

    Nice to hear that you're back, it was a little bit silent
    here :)

    I'm running gentoo unstable with pretty new versions. Here
    are they:

    # mysql -V
    mysql Ver 12.22 Distrib 4.0.23, for pc-linux-gnu (i686)

    # perl -v
    This is perl, v5.8.6 built for i686-linux

    m bdi:
    INST_VERSION 1.45

    m DBD::MySQL
    INST_VERSION 2.9003

    And the module that reads the mp3 files:
    MPEG::MP3Info
    <...>
    CPAN_VERSION 0.90
    INST_VERSION 0.90

     

Log in to post a comment.

Auth0 Logo