MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

am 28.06.2007 05:52:24 von glenleslie

--===============0978748881==
Content-Type: multipart/alternative; boundary="0-1186888202-1183002744=:69392"
Content-Transfer-Encoding: 7bit

--0-1186888202-1183002744=:69392
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Greetings,
=20
Just trying to re-arrange ID3 information in a large set of MP3
files. Before I run the following Perl script, iTunes can read the ID3
tagging information. After writing ID3 information to the MP3, iTunes n=
o
longer reads any tagging information from the MP3.
=20
Does anyone have any information regarding this? There is some
cryptic information in the MP3::Tag POD regarding setting the
"id3v23_unsync" option but that doesn't seem to alter the impact on iTun=
es at all.
Windows and other tag readers seem to be able to read the all ID3v1 and
ID3v2 tags just fine (including the altered fields) after running the
following script.
=20
Thanks for any suggestions/guideance anyone can provide.
=20
Description: the following program takes an MP3 filename as input. =20
Action: It appends the value in the Album field to front of the
TITLE Field. That's it! Easy!
=20
#!/usr/bin/perl -w
use MP3::Tag;
MP3::Tag->config(id3v23_unsync=3D>FALSE);
my $filename =3D $ARGV[0];
$mp3 =3D MP3::Tag->new($filename);
@info=3D$mp3->autoinfo;
@albnum =3D split(/_/, $info[3]);
=20
$frame =3D $mp3->{ID3v2}->get_frame("TIT2");
print $frame;
=20
$mp3->{ID3v1}->title("$albnum[0] $info[0]");
$mp3->{ID3v2}->change_frame("TIT2","$albnum[0] $info[0]");
=20
$mp3->{ID3v1}->write_tag();
$mp3->{ID3v2}->write_tag();
=20
@info=3D$mp3->autoinfo;
print $info[0]; //print ID3v1 TITLE field

$frame =3D $mp3->{ID3v2}->get_frame("TIT2");
print $frame; //print ID3v2 Title2 field
=20
$mp3->close();
=20
Thanks!
=20
GL

=20
---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car=
Finder tool.
--0-1186888202-1183002744=:69392
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Greetings,
  
  Just trying to re-arrange ID3 infor=
mation in a large set of MP3
files.  Before I run the following =
Perl script, iTunes can read the ID3
tagging information.  After=
writing ID3 information to the MP3, iTunes no
longer reads any taggi=
ng information from the MP3.
  
  Does anyone have =
any information regarding this?  There is some
cryptic informati=
on in the MP3::Tag POD regarding setting the
"id3v23_unsync" option b=
ut that doesn't seem to alter the impact on iTunes at all.
  Wind=
ows and other tag readers seem to be able to read the all ID3v1 and
I=
D3v2 tags just fine (including the altered fields) after running the
=
following script.
  
  Thanks for any suggestions/g=
uideance anyone can provide.
  
  Description: =
; the following program takes an MP3 filename as input. 
  =
Action:  It appends the value in
the Album field to front of the
TITLE Field.  That's it!  =
Easy!
  
  #!/usr/bin/perl -w
  use MP3::Ta=
g;
  MP3::Tag->config(id3v23_unsync=3D>FALSE);
  my=
$filename =3D $ARGV[0];
  $mp3 =3D MP3::Tag->new($filename);<=
BR>  @info=3D$mp3->autoinfo;
  @albnum =3D split(/_/, $in=
fo[3]);
  
  $frame =3D $mp3->{ID3v2}->get_fr=
ame("TIT2");
print $frame;
  
  $mp3->{ID3v1}=
->title("$albnum[0] $info[0]");
$mp3->{ID3v2}->change_frame("=
TIT2","$albnum[0] $info[0]");
  
  $mp3->{ID3v1}=
->write_tag();
  $mp3->{ID3v2}->write_tag();
 &n=
bsp;
  @info=3D$mp3->autoinfo;
print $info[0];  =
            &=
nbsp; //print ID3v1 TITLE field

  $frame =3D $mp3->{ID3v2}=
->get_frame("TIT2");
print
$frame;           =
;    //print ID3v2 Title2 field
  
 =
$mp3->close();
  
  Thanks!
   >  GL



Choose the right car based on your needs. =20
Check out oo.com/carfinder/;_ylc=3DX3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHN lYwNtYWlsdGFn=
cwRzbGsDY2FyLWZpbmRlcg-- ">Yahoo! Autos new Car Finder tool.


--0-1186888202-1183002744=:69392--

--===============0978748881==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0978748881==--

RE: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

am 28.06.2007 11:01:41 von Brian Raven

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of
glen_leslie@pobox.com
Sent: 28 June 2007 04:52
To: activeperl@listserv.ActiveState.com
Subject: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

> Greetings,
> =

> Just trying to re-arrange ID3 information in a large set of MP3
> files. Before I run the following Perl script, iTunes can read the
ID3
> tagging information. After writing ID3 information to the MP3, iTunes
no
> longer reads any tagging information from the MP3.
> =

> Does anyone have any information regarding this? There is some
> cryptic information in the MP3::Tag POD regarding setting the
> "id3v23_unsync" option but that doesn't seem to alter the impact on
iTunes at all.
> Windows and other tag readers seem to be able to read the all ID3v1
and
> ID3v2 tags just fine (including the altered fields) after running the
> following script.
> =

> Thanks for any suggestions/guideance anyone can provide.
> =

> Description: the following program takes an MP3 filename as input.

> Action: It appends the value in the Album field to front of the
> TITLE Field. That's it! Easy!
> =

> #!/usr/bin/perl -w
> use MP3::Tag;
> MP3::Tag->config(id3v23_unsync=3D>FALSE);
> my $filename =3D $ARGV[0];
> $mp3 =3D MP3::Tag->new($filename);
> @info=3D$mp3->autoinfo;
> @albnum =3D split(/_/, $info[3]);
> =

> $frame =3D $mp3->{ID3v2}->get_frame("TIT2");
> print $frame;
> =

> $mp3->{ID3v1}->title("$albnum[0] $info[0]");
> $mp3->{ID3v2}->change_frame("TIT2","$albnum[0] $info[0]");
> =

> $mp3->{ID3v1}->write_tag();
> $mp3->{ID3v2}->write_tag();
> =

> @info=3D$mp3->autoinfo;
> print $info[0]; //print ID3v1 TITLE field
> =

> $frame =3D $mp3->{ID3v2}->get_frame("TIT2");
> print $frame; //print ID3v2 Title2 field
> =

> $mp3->close();
> =


First, always start with "use strict;", and "use warnings;" is better
than -w.

Second, it is better to post real code, i.e. cut&paste code that you
have actually run. The lines containing '//' where you probably meant
'#' indicate that this may not the case here, as they produce syntax
errors.

If you had used strictures it would have complained to you about the
bareword "FALSE", which might have given you a clue to what your problem
might be. For a further clue try the following at the command line:

perl -e "if(FALSE){print qq{true\n}} else {print qq{false\n}}"

That is, FALSE as a bareword evaluates to true. Try using a value that
really evaluates to false, like 0 (zero).

I don't know whether your script will work after making the above
change. My comments are based solely on the code you posted and the
documentation for MP3::Tag. I have no knowledge about what you are
trying to do.

Not sure what you mean about the id3v23_unsync info being cryptic ("Some
broken MP3 players (e.g., ITunes, at least up to v6) refuse to handle
unsyncronized (e.g., written as the standard requires it) tags; they may
need this to be set to FALSE. Default: TRUE."). Indeed, apart from
taking TRUE/FALSE a bit too literally, you seem to have understood it
well enough.

HTH

-- =

Brian Raven =


==================== =====3D=
================
Atos Euronext Market Solutions Disclaimer
==================== =====3D=
================

The information contained in this e-mail is confidential and solely for the=
intended addressee(s). Unauthorised reproduction, disclosure, modification=
, and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediat=
ely and delete it from your system. The views expressed in this message do =
not necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales with=
registration no. 3962327. Registered office address at 25 Bank Street Lon=
don E14 5NQ United Kingdom. =

Atos Euronext Market Solutions SAS - Registered in France with registration=
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 750=
09 Paris France.

L'information contenue dans cet e-mail est confidentielle et uniquement des=
tinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Tou=
te copie, publication ou diffusion de cet email est interdite. Si cet e-mai=
l vous parvient par erreur, nous vous prions de bien vouloir prevenir l'exp=
editeur immediatement et d'effacer le e-mail et annexes jointes de votre sy=
steme. Le contenu de ce message electronique ne represente pas necessaireme=
nt la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se =
situe 25 Bank Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e, e=
nregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro 4=
25 100 294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Hauss=
mann 75009 Paris France.
==================== =====3D=
================

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

am 28.06.2007 13:36:20 von Bill Luebkert

Brian Raven wrote:
>
> and "use warnings;" is better
> than -w.

To the best of my knowledge, use warnings is only *better* in that it
gives you more control than -w. -w should report all warnings (the same
as use warnings 'all') from my reading of docs. If you need to selectively
turn on and off various warnings, that's where use warnings is more useful.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Re: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

am 28.06.2007 21:45:38 von glenleslie

--===============1271762608==
Content-Type: multipart/alternative; boundary="0-1511602121-1183059938=:45569"
Content-Transfer-Encoding: 7bit

--0-1511602121-1183059938=:45569
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks for the uhhh... pointers (wrong language?). As a newbie, when I "=
use strict" I end up chasing so many rabbits down blind holes that I spen=
d days troubleshooting issues that have nothing to do with my program. I=
realize I will have to apply the discipline at some point... for now, wr=
iting code on my own time/dime, I persist with the bare minimum "-w". If=
you have dire warnings (hehe) with regard to this approach, I'm all ears=
..
=20
Yes, you are right, I added the comments to the listserv posting-- whic=
h were invalid in Perl-ese. =20
=20
BINGO! You pointed out my ASS-umption that there was a FALSE literal d=
efined inherently in Perl! :)
=20
Changing the config entry to: =20
=20
MP3::Tag->config("id3v23_unsync",0); =20
=20
fixed the problem with iTunes.
=20
The following code is working "as expected". iTunes sees all now (so t=
he id3v23_unsync issue still exists in iTunes version 7.x). Somehow iTun=
es 7.2 can even pull in the album cover (from a very obscure Audio Bible)=
.... which is a bit scary since it means that iTunes is getting very "big =
brotherish" in its abitlity to determine exactly what music you have load=
ed (not that that should be a problem for anyone who's listening to... th=
e Bible).
=20
Thanks again for your help!
=20
Kind Regards!
=20
GL
=20
#!/usr/bin/perl -w
use MP3::Tag;
MP3::Tag->config("id3v23_unsync",0);
my $filename =3D $ARGV[0];
$mp3 =3D MP3::Tag->new($filename);
@info =3D $mp3->autoinfo();
@albnum =3D split(/_/, $info[3]);
#my ($title, $frame);
$frame =3D $mp3->{ID3v2}->get_frame("TIT2");
print $frame;
$mp3->{ID3v1}->title("$albnum[0] $info[0]");
$mp3->{ID3v2}->change_frame("TIT2","$albnum[0] $info[0]");
$mp3->{ID3v1}->write_tag();
$mp3->{ID3v2}->write_tag();
@info=3D$mp3->autoinfo;
print $info[0];
$frame =3D $mp3->{ID3v2}->get_frame("TIT2");
print $frame;
# @tags =3D $mp3->get_tags;
# print "\n @tags";
$mp3->close();


=20
Message: 4
Date: Thu, 28 Jun 2007 10:01:41 +0100
From: "Brian Raven"=20

Subject: RE: MP3::Tag - iTunes cannot read ID3 tags written by
MP3::Tag?
To:=20
Message-ID:
<88CCF1662EC4C148AC1C20692A2F0AEF01F9238E@wpaexa01.AEMS.INT>
Content-Type: text/plain; charset=3D"ISO-8859-1"

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of
glen_leslie@pobox.com
Sent: 28 June 2007 04:52
To: activeperl@listserv.ActiveState.com
Subject: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

> Greetings,
>=20
> Just trying to re-arrange ID3 information in a large set of MP3
> files. Before I run the following Perl script, iTunes can read the
ID3
> tagging information. After writing ID3 information to the MP3, iTunes
no
> longer reads any tagging information from the MP3.
>=20
> Does anyone have any information regarding this? There is some
> cryptic information in the MP3::Tag POD regarding setting the
> "id3v23_unsync" option but that doesn't seem to alter the impact on
iTunes at all.
> Windows and other tag readers seem to be able to read the all ID3v1
and
> ID3v2 tags just fine (including the altered fields) after running the
> following script.
>=20
> Thanks for any suggestions/guideance anyone can provide.
>=20
> Description: the following program takes an MP3 filename as input.

> Action: It appends the value in the Album field to front of the
> TITLE Field. That's it! Easy!
>=20
> #!/usr/bin/perl -w
> use MP3::Tag;
> MP3::Tag->config(id3v23_unsync=3D>FALSE);
> my $filename =3D $ARGV[0];
> $mp3 =3D MP3::Tag->new($filename);
> @info=3D$mp3->autoinfo;
> @albnum =3D split(/_/, $info[3]);
>=20
> $frame =3D $mp3->{ID3v2}->get_frame("TIT2");
> print $frame;
>=20
> $mp3->{ID3v1}->title("$albnum[0] $info[0]");
> $mp3->{ID3v2}->change_frame("TIT2","$albnum[0] $info[0]");
>=20
> $mp3->{ID3v1}->write_tag();
> $mp3->{ID3v2}->write_tag();
>=20
> @info=3D$mp3->autoinfo;
> print $info[0]; //print ID3v1 TITLE field
>=20
> $frame =3D $mp3->{ID3v2}->get_frame("TIT2");
> print $frame; //print ID3v2 Title2 field
>=20
> $mp3->close();
>=20

First, always start with "use strict;", and "use warnings;" is better
than -w.

Second, it is better to post real code, i.e. cut&paste code that you
have actually run. The lines containing '//' where you probably meant
'#' indicate that this may not the case here, as they produce syntax
errors.

If you had used strictures it would have complained to you about the
bareword "FALSE", which might have given you a clue to what your problem
might be. For a further clue try the following at the command line:

perl -e "if(FALSE){print qq{true\n}} else {print qq{false\n}}"

That is, FALSE as a bareword evaluates to true. Try using a value that
really evaluates to false, like 0 (zero).

I don't know whether your script will work after making the above
change. My comments are based solely on the code you posted and the
documentation for MP3::Tag. I have no knowledge about what you are
trying to do.

Not sure what you mean about the id3v23_unsync info being cryptic ("Some
broken MP3 players (e.g., ITunes, at least up to v6) refuse to handle
unsyncronized (e.g., written as the standard requires it) tags; they may
need this to be set to FALSE. Default: TRUE."). Indeed, apart from
taking TRUE/FALSE a bit too literally, you seem to have understood it
well enough.

HTH

--=20
Brian Raven=20

==================== =====3D=
================
Atos Euronext Market Solutions Disclaimer
==================== =====3D=
================

The information contained in this e-mail is confidential and solely for t=
he intended addressee(s). Unauthorised reproduction, disclosure, modifica=
tion, and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immedi=
ately and delete it from your system. The views expressed in this message=
do not necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales wi=
th registration no. 3962327. Registered office address at 25 Bank Street =
London E14 5NQ United Kingdom.=20
Atos Euronext Market Solutions SAS - Registered in France with registrati=
on no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann =
75009 Paris France.

L'information contenue dans cet e-mail est confidentielle et uniquement d=
estinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee.=
Toute copie, publication ou diffusion de cet email est interdite. Si cet=
e-mail vous parvient par erreur, nous vous prions de bien vouloir preven=
ir l'expediteur immediatement et d'effacer le e-mail et annexes jointes d=
e votre systeme. Le contenu de ce message electronique ne represente pas =
necessairement la position ou le point de vue d'Atos Euronext Market Solu=
tions.
Atos Euronext Market Solutions Limited Soci?t? de droit anglais, enregist=
r?e au Royaume Uni sous le num?ro 3962327, dont le si?ge social se situe =
25 Bank Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, soci?t? par actions simplifi?e, enreg=
istr? au registre dui commerce et des soci?t?s sous le num?ro 425 100 294=
RCS Paris et dont le si?ge social se situe 6/8 Boulevard Haussmann 75009=
Paris France.
==================== =====3D=
================



------------------------------

Message: 5
Date: Thu, 28 Jun 2007 04:36:20 -0700
From: Bill Luebkert=20
Subject: Re: MP3::Tag - iTunes cannot read ID3 tags written by
MP3::Tag?
To: activeperl@listserv.ActiveState.com
Message-ID: <46839D34.9070609@roadrunner.com>
Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed

Brian Raven wrote:
>=20
> and "use warnings;" is better
> than -w.

To the best of my knowledge, use warnings is only *better* in that it
gives you more control than -w. -w should report all warnings (the same
as use warnings 'all') from my reading of docs. If you need to selectivel=
y
turn on and off various warnings, that's where use warnings is more usefu=
l.



------------------------------

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

End of ActivePerl Digest, Vol 11, Issue 22
******************************************


=20
---------------------------------
Got a little couch potato?=20
Check out fun summer activities for kids.
--0-1511602121-1183059938=:45569
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks for the uhhh... pointers (wrong language?).  As a newbie=
, when I "use strict" I end up chasing so many rabbits down blind holes t=
hat I spend days troubleshooting issues that have nothing to do with my p=
rogram.  I realize I will have to apply the discipline at some point=
.... for now, writing code on my own time/dime, I persist with the bare mi=
nimum "-w".  If you have dire warnings (hehe) with regard to this ap=
proach, I'm all ears.
 
Yes, you are right, =
I added the comments to the listserv posting-- which were invalid in Perl=
-ese. 
 
BINGO!  You pointed out =
my ASS-umption that there was a FALSE literal defined inherently in Perl!=
  :)
 
Changing the config entry to:&nb=
sp;
 
      &=
nbsp;        MP3::Tag->config("id3v=
23_unsync",0); 
=20
 
fixed the problem with iTunes.
 =
;
The following code is working "as expected".  iTunes s=
ees all now (so the id3v23_unsync issue still exists in iTunes version 7.=
x).  Somehow iTunes 7.2 can even pull in the album cover (from a ver=
y obscure Audio Bible)... which is a bit scary since it means that iTunes=
is getting very "big brotherish" in its abitlity to determine exactly wh=
at music you have loaded (not that that should be a problem for anyone wh=
o's listening to... the Bible).
 
Thanks aga=
in for your help!
 
Kind Regards!
v> 
GL
 
#!/usr/bin/perl -w=
use MP3::Tag;
MP3::Tag->config("id3v23_unsync=
",0);
my $filename =3D $ARGV[0];
$mp3 =3D MP3::Ta=
g->new($filename);
@info =3D $mp3->autoinfo();
<=
div>@albnum =3D split(/_/, $info[3]);=20
#my ($title, $frame);
$frame =3D $mp3->{ID3v2}->g=
et_frame("TIT2");
print $frame;
$mp3->{ID3v1}->title=
("$albnum[0] $info[0]");
$mp3->{ID3v2}->change_frame("TIT2","$al=
bnum[0] $info[0]");
$mp3->{ID3v1}->write_tag();
=
$mp3->{ID3v2}->write_tag();
@info=3D$mp3->autoi=
nfo;
print $info[0];
$frame =3D $mp3->{ID3v2}->get_frame("TIT=
2");
print $frame;
# @tags =3D $mp3->get_tags;
# pri=
nt "\n @tags";
$mp3->close();

lass=3Dreplbq style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: =
#1010ff 2px solid">
Message: 4
Date: Thu, 28 Jun 2007 10:01:41 +010=
0
From: "Brian Raven"
Subject: RE: MP3::Tag =
- iTunes cannot read ID3 tags written by
MP3::Tag?
To:

Message-ID:
<88CCF1662EC4=
C148AC1C20692A2F0AEF01F9238E@wpaexa01.AEMS.INT>
Content-Type: text/=
plain; charset=3D"ISO-8859-1"

From: activeperl-bounces@listserv.Ac=
tiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On =
Behalf Of
glen_leslie@pobox.com
Sent: 28 June 2007 04:52
To: act=
iveperl@listserv.ActiveState.com
Subject: MP3::Tag - iTunes cannot rea=
d ID3 tags written by MP3::Tag?

> Greetings,
>
> J=
ust trying to re-arrange ID3 information in a large set of MP3
> fi=
les. Before I run the following Perl script, iTunes can read the
ID3 R>> tagging information. After writing ID3 information to the MP3, iTu=
nes
no
> longer reads any tagging information from the MP3.
&=
gt;
> Does anyone have any information regarding this? There is so=
me
> cryptic information in the MP3::Tag POD regarding setting the<=
BR>> "id3v23_unsync" option but that
doesn't seem to alter the impact on
iTunes at all.
> Windows an=
d other tag readers seem to be able to read the all ID3v1
and
> =
ID3v2 tags just fine (including the altered fields) after running the
=
> following script.
>
> Thanks for any suggestions/guidea=
nce anyone can provide.
>
> Description: the following progr=
am takes an MP3 filename as input.

> Action: It appends the val=
ue in the Album field to front of the
> TITLE Field. That's it! Eas=
y!
>
> #!/usr/bin/perl -w
> use MP3::Tag;
> MP3:=
:Tag->config(id3v23_unsync=3D>FALSE);
> my $filename =3D $ARG=
V[0];
> $mp3 =3D MP3::Tag->new($filename);
> @info=3D$mp3-=
>autoinfo;
> @albnum =3D split(/_/, $info[3]);
>
> =
$frame =3D $mp3->{ID3v2}->get_frame("TIT2");
> print $frame;<=
BR>>
> $mp3->{ID3v1}->title("$albnum[0] $info[0]");
&g=
t;
$mp3->{ID3v2}->change_frame("TIT2","$albnum[0] $info[0]");
>=

> $mp3->{ID3v1}->write_tag();
> $mp3->{ID3v2}->=
write_tag();
>
> @info=3D$mp3->autoinfo;
> print $i=
nfo[0]; //print ID3v1 TITLE field
>
> $frame =3D $mp3->{I=
D3v2}->get_frame("TIT2");
> print $frame; //print ID3v2 Title2 f=
ield
>
> $mp3->close();
>

First, always sta=
rt with "use strict;", and "use warnings;" is better
than -w.

S=
econd, it is better to post real code, i.e. cut&paste code that you R>have actually run. The lines containing '//' where you probably meant R>'#' indicate that this may not the case here, as they produce syntax >errors.

If you had used strictures it would have complained to yo=
u about the
bareword "FALSE", which might have given you a clue to wha=
t your problem
might be. For a further clue try the following at the c=
ommand line:

perl -e
"if(FALSE){print qq{true\n}} else {print qq{false\n}}"

That is, F=
ALSE as a bareword evaluates to true. Try using a value that
really ev=
aluates to false, like 0 (zero).

I don't know whether your script =
will work after making the above
change. My comments are based solely =
on the code you posted and the
documentation for MP3::Tag. I have no k=
nowledge about what you are
trying to do.

Not sure what you mea=
n about the id3v23_unsync info being cryptic ("Some
broken MP3 players=
(e.g., ITunes, at least up to v6) refuse to handle
unsyncronized (e.g=
.., written as the standard requires it) tags; they may
need this to be=
set to FALSE. Default: TRUE."). Indeed, apart from
taking TRUE/FALSE =
a bit too literally, you seem to have understood it
well enough.
R>HTH

--
Brian Raven

===========3D=
==================== =====3D=
=====3D
Atos Euronext Market Solutions Disclaimer
===3D=
==================== =====3D=
=============3D

The
information contained in this e-mail is confidential and solely for the =
intended addressee(s). Unauthorised reproduction, disclosure, modificatio=
n, and/or distribution of this email may be unlawful.
If you have rece=
ived this email in error, please notify the sender immediately and delete=
it from your system. The views expressed in this message do not necessar=
ily reflect those of Atos Euronext Market Solutions.

Atos Euronext=
Market Solutions Limited - Registered in England & Wales with regist=
ration no. 3962327. Registered office address at 25 Bank Street London E1=
4 5NQ United Kingdom.
Atos Euronext Market Solutions SAS - Registered=
in France with registration no. 425 100 294. Registered office address a=
t 6/8 Boulevard Haussmann 75009 Paris France.

L'information conten=
ue dans cet e-mail est confidentielle et uniquement destinee a la (aux) p=
ersonnes a laquelle (auxquelle(s)) elle est adressee. Toute copie, public=
ation ou diffusion de cet email est
interdite. Si cet e-mail vous parvient par erreur, nous vous prions de b=
ien vouloir prevenir l'expediteur immediatement et d'effacer le e-mail et=
annexes jointes de votre systeme. Le contenu de ce message electronique =
ne represente pas necessairement la position ou le point de vue d'Atos Eu=
ronext Market Solutions.
Atos Euronext Market Solutions Limited Soci?t=
? de droit anglais, enregistr?e au Royaume Uni sous le num?ro 3962327, do=
nt le si?ge social se situe 25 Bank Street E14 5NQ Londres Royaume Uni. R>
Atos Euronext Market Solutions SAS, soci?t? par actions simplifi?e,=
enregistr? au registre dui commerce et des soci?t?s sous le num?ro 425 1=
00 294 RCS Paris et dont le si?ge social se situe 6/8 Boulevard Haussmann=
75009 Paris France.
=================3D=
==================== ====<=
BR>


------------------------------

Message: 5
Date: =
Thu, 28 Jun 2007 04:36:20 -0700
From: Bill Luebkert R.COM>
Subject: Re: MP3::Tag - iTunes
cannot read ID3 tags written by
MP3::Tag?
To: activeperl@listserv.=
ActiveState.com
Message-ID: <46839D34.9070609@roadrunner.com> >Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed

B=
rian Raven wrote:
>
> and "use warnings;" is better
> =
than -w.

To the best of my knowledge, use warnings is only *better=
* in that it
gives you more control than -w. -w should report all warn=
ings (the same
as use warnings 'all') from my reading of docs. If you =
need to selectively
turn on and off various warnings, that's where use=
warnings is more useful.



------------------------------ R>
_______________________________________________
ActivePerl maili=
ng list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://=
listserv.ActiveState.com/mailman/mysubs

End of ActivePerl Digest, =
Vol 11, Issue 22
******************************************
QUOTE>



Got a little couch potato?

Check out fun h.yahoo.com/search?fr=3Doni_on_mail&p=3Dsummer+activities+fo r+kids&cs=3Db=
z">summer activities for kids.

--0-1511602121-1183059938=:45569--

--===============1271762608==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1271762608==--

RE: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

am 29.06.2007 13:51:53 von Brian Raven

Bill Luebkert <> wrote:
> Brian Raven wrote:
>> =

>> and "use warnings;" is better
>> than -w.
> =

> To the best of my knowledge, use warnings is only *better* in that it
> gives you more control than -w. -w should report all warnings (the
> same as use warnings 'all') from my reading of docs. If you need to
> selectively turn on and off various warnings, that's where use
> warnings is more useful. =


That sounds like better to me :-)

Seriously though, the difference may seem marginal for scripts but
'perldoc perllexwarn' does say "The use warnings pragma is a replacement
for both the command line flag -w and the equivalent Perl variable,
$^W.". Also, the '-w' on the '#!' line may not be interpreted on all
platforms (e.g., IIRC, older versions of perl on win32), in which case
you have to remember to put it on the command line. Always starting your
scripts with "use warnings" is therefore more certain to enable warnings
than "#!perl -w", especially if you expect your scripts to be portable.
Its more important for modules, though, as it is the only way of
guaranteeing that warnings are enabled, whatever the calling code might
do. Personally, I make it a habit to start all perl code with "use
strict;" and "use warnings;" (actually I made it a habit for my editor
to do that).

To be honest, as long as warnings are enabled, I wouldn't quibble too
much about how you do it. In retrospect, perhaps "preferable" would have
been better than "better" (IYSWIM).

HTH

-- =

Brian Raven =


==================== =====3D=
================
Atos Euronext Market Solutions Disclaimer
==================== =====3D=
================

The information contained in this e-mail is confidential and solely for the=
intended addressee(s). Unauthorised reproduction, disclosure, modification=
, and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediat=
ely and delete it from your system. The views expressed in this message do =
not necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales with=
registration no. 3962327. Registered office address at 25 Bank Street Lon=
don E14 5NQ United Kingdom. =

Atos Euronext Market Solutions SAS - Registered in France with registration=
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 750=
09 Paris France.

L'information contenue dans cet e-mail est confidentielle et uniquement des=
tinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Tou=
te copie, publication ou diffusion de cet email est interdite. Si cet e-mai=
l vous parvient par erreur, nous vous prions de bien vouloir prevenir l'exp=
editeur immediatement et d'effacer le e-mail et annexes jointes de votre sy=
steme. Le contenu de ce message electronique ne represente pas necessaireme=
nt la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se =
situe 25 Bank Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e, e=
nregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro 4=
25 100 294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Hauss=
mann 75009 Paris France.
==================== =====3D=
================

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

am 29.06.2007 14:10:46 von Bill Luebkert

Brian Raven wrote:
> Bill Luebkert <> wrote:
>
>>Brian Raven wrote:
>>
>>> and "use warnings;" is better
>>>than -w.
>>
>>To the best of my knowledge, use warnings is only *better* in that it
>>gives you more control than -w. -w should report all warnings (the
>>same as use warnings 'all') from my reading of docs. If you need to
>>selectively turn on and off various warnings, that's where use
>>warnings is more useful.
>
>
> That sounds like better to me :-)
>
> Seriously though, the difference may seem marginal for scripts but
> 'perldoc perllexwarn' does say "The use warnings pragma is a replacement
> for both the command line flag -w and the equivalent Perl variable,
> $^W.". Also, the '-w' on the '#!' line may not be interpreted on all
> platforms (e.g., IIRC, older versions of perl on win32), in which case
> you have to remember to put it on the command line. Always starting your
> scripts with "use warnings" is therefore more certain to enable warnings
> than "#!perl -w", especially if you expect your scripts to be portable.
> Its more important for modules, though, as it is the only way of
> guaranteeing that warnings are enabled, whatever the calling code might
> do. Personally, I make it a habit to start all perl code with "use
> strict;" and "use warnings;" (actually I made it a habit for my editor
> to do that).
>
> To be honest, as long as warnings are enabled, I wouldn't quibble too
> much about how you do it. In retrospect, perhaps "preferable" would have
> been better than "better" (IYSWIM).

That was my point - the -w did turn on all warnings, so in the case at hand
it was just as good as the use version. As far as preferable, on Win32, it
would be preferable if you needed some of the additional functionality it
provides. The word you might want to use is more versatile.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Re: MP3::Tag - iTunes cannot read ID3 tags written by MP3::Tag?

am 29.06.2007 14:26:35 von Brian Raven

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of
glen_leslie@pobox.com
Sent: 28 June 2007 20:46
To: activeperl@listserv.ActiveState.com
Subject: Re: Re: MP3::Tag - iTunes cannot read ID3 tags written by
MP3::Tag?

> Thanks for the uhhh... pointers (wrong language?). As a newbie, when
I "use strict" I end up chasing so many =

> rabbits down blind holes that I spend days troubleshooting issues that
have nothing to do with my program. I =

> realize I will have to apply the discipline at some point...

Now is the best and easiest time to apply the (self) discipline, i.e.
before you get into bad habits. Besides those issues have plenty to do
with your code, they are (potential) bugs. Using strictures is
effectively asking perl to help you write better code. It also makes
your request for help look better when you ask on a public forum if you
make it clear that you asked perl for help first.

> for now, writing code on my own time/dime, I =

> persist with the bare minimum "-w". If you have dire warnings (hehe)
with regard to this approach, I'm all =

> ears.

The important thing is that you enable warnings. Having "use warnings;"
in your code makes it a bit more obvious than "-w" that you have done
so. If you can persuade you editor to do the work for you then "use
warnings;" becomes no more effort than "-w". What you do in private,
however, is up to you.

> =

> Yes, you are right, I added the comments to the listserv posting--
which were invalid in Perl-ese. =


Which illustrates why you should cut&paste your code rather than typing
it. It doesn't help your cause if people trying to help you have to fix
syntax errors before they can run your code.

> =

> BINGO! You pointed out my ASS-umption that there was a FALSE literal
defined inherently in Perl! :)

As I said "use strict;" would have given you a hint that something was
wrong with that.

In any event, I am glad that you have fixed your problem.

HTH

-- =

Brian Raven =


==================== =====3D=
================
Atos Euronext Market Solutions Disclaimer
==================== =====3D=
================

The information contained in this e-mail is confidential and solely for the=
intended addressee(s). Unauthorised reproduction, disclosure, modification=
, and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediat=
ely and delete it from your system. The views expressed in this message do =
not necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales with=
registration no. 3962327. Registered office address at 25 Bank Street Lon=
don E14 5NQ United Kingdom. =

Atos Euronext Market Solutions SAS - Registered in France with registration=
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 750=
09 Paris France.

L'information contenue dans cet e-mail est confidentielle et uniquement des=
tinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Tou=
te copie, publication ou diffusion de cet email est interdite. Si cet e-mai=
l vous parvient par erreur, nous vous prions de bien vouloir prevenir l'exp=
editeur immediatement et d'effacer le e-mail et annexes jointes de votre sy=
steme. Le contenu de ce message electronique ne represente pas necessaireme=
nt la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se =
situe 25 Bank Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e, e=
nregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro 4=
25 100 294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Hauss=
mann 75009 Paris France.
==================== =====3D=
================

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs