Menu

#15 functioning id3 editor

CVS_version
open
5
2004-09-14
2004-09-14
Dan Snyder
No

Here's a diff against the current CVS to enable id3
editing functions. It uses PEAR::MP3_ID instead of
execing a userspace utility.

There are two known limitations:

1) The PHP script must have write permission for the file
you want to edit

2) The current version of MP3_ID can read v1 and v2
tags but can only write ID3v1

You'll also need to set some things in your config file:

ID3_EDITOR_ENABLED = yes
ID3_EDITOR_LOGFILE = none

or

ID3_EDITOR_ENABLED = yes
ID3_EDITOR_LOGFILE = /tmp/ID3_edit.log

Discussion

  • Dan Snyder

    Dan Snyder - 2004-09-14

    Logged In: YES
    user_id=872578

    also requires a short edit to main.php to enable the links to
    the id3 editor

    if ($cnf->ID3_EDITOR_ENABLED) {
    echo " <td class=\"tiny\"><a href=\"javascript:popup
    ('id3_edit.php?id=".urlencode($row
    ["songs_id"])."&amp;show_form=1', 'id3_editor', 'width=400,hei
    ght=250');\">ED</a></td>";
    }

     
  • Dan Snyder

    Dan Snyder - 2004-09-14

    Logged In: YES
    user_id=872578

    Updated version.

    Rewrite of database updates to properly handle changing
    artist/album names.

    Trim all whitespace from data.

    TODO: verify 'track number' provided by the user is actually a
    decimal

     
  • Dan Snyder

    Dan Snyder - 2004-09-14

    id3_editor_fix2.tgz

     
  • Dan Snyder

    Dan Snyder - 2004-09-15

    Logged In: YES
    user_id=872578

    Updated version. This is probably the last update until
    PEAR::MP3_ID can handle ID3v2.

    Update file mtime in database when changing tag.

    Deal with ID3v1's 30 character limit on all fields

    Update db when changing artist/album name capitalization
    only. For example, to correct led zeppelin to be Led Zeppelin.

     
  • Dan Snyder

    Dan Snyder - 2004-09-15

    id3_editor_fix3.tgz

     
  • Marc Schiffbauer

    Logged In: YES
    user_id=633121

    Hi Dan,

    thanks for the patch. I think we will implement a slighly
    different approach:

    Changes will only be committed to the DB. Updating the files
    will then be the job of the command line tool.

    advantages:
    * the webinterface does not need to have write
    access to the files.
    * we have id3v1 and v2 support
    * we have ogg tags support
    * it is faster
    * web interface and files can be on
    different systems

    There will be config options where you can choose if files
    or db have precedence if both were updated before a run of
    the command line tool.

    -marc

     

Log in to post a comment.

MongoDB Logo MongoDB