The unicode fix is just a dict where each set of hex values are mapped to their equivalent Cyrillic character. I'm sure there is a better way to do it, but this is what I got working for me.
The dict is inside a function (russify... original right?) the loops through every key/value pair, replacing the hex mess with the right char. I'm guessing that other characters could be added by just extending the dict.
The linking of the cover image I removed (commented out) and converted it to reading from the mp3 tags, using the eyeD3 python library. It retrieves the image data, opens /tmp/cover and outputs the data into the file.
Actually, Songbird started out as a crossplatform music player from mozilla. They eventually discontinued the linux version as official releases but most of their developers are using linux so it is still possible to get a linux edition.
You'd be best understanding an existing branch layout etc including the bazaar and aur folders and what they do for builds
Once you have that nailed then get to grips with bazaar (versioning) and we can see to get you added to the team members so you can init/commit and push a branch up
Once the code and support files are looking right on the bazaar server we have a script you can use to pull down source, do a debian source package and upload to launchpad for building...this forms the start of package creation for ubuntu/debian etc.
Probably some details you need to get to grips with there...PM me for help on it, either way if it were me I would start by understanding an existing code branch and all that it entails...conkyRhythmbox might be a good choice
There must be something that does the job properly - you would hope anyway. For example I used urllib.unquote to handle anything in the past...but this must have issue with Russian chars....? I thought it coped but as I had issue with getting a coverart path in the first place so couldn't be sure...maybe I should try the Russian songs with a player such as Exaile to see how the code fairs...all needs time though which is in limited supply
I would be interested if your line here:
would still work if like this:Code:taglocation = self.russify(location.replace('file://', '').replace('%20', ' ')).encode('utf-8')
Code:taglocation = urllib.unquote(location).replace("file://", "").encode("utf-8")
MP3 image tag functions used on thier own wont support much as most mp3's I have (and lots of others I suspect) don't include embedded images and I for one don't want them to....
Sorry if I am coming across as a picky a$$hole, I don't mean to provoke etc, I am always looking for the longer term all encompassing solution so no more work will be required as the rolling out of a package update can be slow going and I like to minimise that
I hope you get where I am coming from with all this and maybe you have some ideas that would fit with my ideals...all help is appreciated even if it might not come across that way
edit: I wish rhythmbox would fetch cover art paths for me in the first place...then I could test this thing properly
Last edited by kaivalagi; May 31st, 2011 at 07:20 PM.
If I could code, I'd be right in there as thick as I am into conky. But alas, all I can do is beta test things and help that way. I'd love to take some of the workload off your shoulders. I'm still looking for a nice Python Book to buy. may have to wait until later this year when I head north for a holiday.
Last edited by Neon612; May 31st, 2011 at 09:37 PM.
Pay special attention to the "debian" folder and it's contents as well as the setup.py and changelog fileCode:bzr branch lp:~conky-companions/+junk/conkyrhythmbox
I learnt from example / trial error so I can't really point you towards any docs. Once you get the local files side of things sussed I can help with bzr command usage and launchpad setup (need a login and pgp/ssh keys setup for auth)
To be honest if I can't find a dynamic way of handling everything nicely then it wont handle it at all...you can only please some of the people some of the time
Maybe that will be easier.
OR - are you ready for this ..... Ta da!
Music software written in Python
Last edited by Sector11; May 31st, 2011 at 11:23 PM.
Simply change:toCode:location = props["location"]And changeCode:location = props["location"].encode('utf-8')toCode:taglocation = urllib.unquote(location).replace("file://", "").encode("utf-8")Code:taglocation = urllib.unquote(location).replace("file://", "")
And my russify function is not even needed