Remove site address from title of the songs in a Click
Before moving on with this I would before you can actually
do that in one click you have to take a little bit of pain to set up the
system, I promise it’s a one time setup and won’t poke you ever after ,just a
click and that
Ugly addition to the title and filename removed in a click.
So far if you are not getting as to what i am upto ; in plane and simple words:
many time you must have downloaded songs that has this ugly thing like
“songname_www.xyz.com” now what it
will do is that it will just remove that www.xyz.com stuff from the title and filename in a click.
Just follow the steps
To set up the
system to run the Script
1.
The file that does the magic is actually a
python script .so you must have Python Installed .if you are running on Linux
distro you are in luck, cause you already have it, in case you don’t download
and itstalle is from Here
2.
The next thing to do is to install the mutagen
module which is a module which can manipulate the meta tags in audio files .
3.
TO do so just download it from here , extract it
on desktop and then open command prompt or the terminal[in Linux]. Change the directory to where you extracted the zip. Eg. Type in cd desktop/mutagen
4.
The next thing is to install the module , in the
terminal type, python
setup.py install.
5.
The one time painful process is over , but
trust me having a python installation will always help to automate many thing
in future
The script
Here is the script
import os,re
from mutagen.easyid3 import EasyID3
def main():
filename=os.listdir('.')
repstr=" [www.DJMaza.Com]"
reptstr="- www.DJMaza.Com"
renameTitle(filename,reptstr)
renamefile(filename,repstr)
def renamefile(filename,repstr):
for name in filename:
newname=name.replace(repstr,"")
os.rename(name, newname)
def renameTitle(filename, reptstr):
for name in filename:
if (re.search('.mp3', name)):
audio=EasyID3(name)
titlename=audio['title'][0]
titlenew=titlename.replace(reptstr,"")
audio['title']=titlenew
audio.save()
if __name__=='__main__':
main();
the only thing you need to modify are two lines .
repstr=" [www.DJMaza.Com]" ,
replace this by opening the songs properties than from the filename
just copy what you want to delete and paste it exactly as it is there do not
try typing, you can miss whitesapces.
reptstr="- www.DJMaza.Com" , replace this by the
part that you want to remove from the title
of the song, to do this open the properties and in from title [not filename]
copy the extra to be removed and paste it.
Now save it and just copy and paste this to a folder where
all the songs from that site lie just double click and all the songs gets
properly renamed.
For any doubts you may post comments and will reply soon.

0 comments