Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read/write MP3 tags
#18
Hi Gintaras and all QM fellows. Happy year for everybody!

I have several mp3 files with spam in almost all the tag fields, something like BuySnakeOil.com.

I would like to remove all these strings. I used your last example, the macro removes the strings of few files but suddenly shows:

Error (RT) in MP3 Tags: Exception 0xC0000005. Access violation. Cannot write memory at 0x4. In id3com.dll at 0x35350C6 (0x3520000+0x150C6). ?
Exception in destructors of local variables of MP3 Tags.

Any help, please!

Macro MP3 Tags
Code:
Copy      Help
str spam1=" - www.SPAM.com"
str spam2="www.moreSPAM.com"

str spam.from(spam1 "|" spam2)

out
typelib Id3Lib "id3com.dll"

Dir d
foreach(d "$desktop$\MP3\*.mp3" FE_Dir 0x4)
,str sPath=d.FileName(1)
,str s=sPath
,if sPath.replacerx(spam)
,,ren s sPath
,out "--- %s ---" sPath
,Id3Lib.ID3ComTag t._create
,BSTR b=sPath
,t.Link(&b)
,;out t.NumFrames
,Id3Lib.ID3ComFrame f
,int i j
,for i 0 t.NumFrames
,,f=t.FrameByNum(i)
,,out f.FrameName
,,Id3Lib.ID3ComField fi=f.Field(Id3Lib.ID3_FIELD_TEXT)
,,;Id3Lib.ID3ComField fi=f.Field(Id3Lib.ID3_FIELD_DESCRIPTION)
,,if(fi)
,,,for j 1 fi.NumTextItems+1
,,,,s=fi.Text(j)
,,,,if s.replacerx(spam)
,,,,,BSTR bs=s
,,,,,fi.Text(j)=bs
,,,,s-"[9]"
,,,,out s
,t.SaveV1Tag
,t.SaveV2Tag


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)