Re: Conduit code submission



Hi,

On Fri, Oct 17, 2008 at 11:50 AM, John Stowers <john stowers gmail com> wrote:


On Fri, Oct 17, 2008 at 4:16 AM, James Ralston <jralston mindspring com> wrote:
John,

Hi James, thanks for your mail
 

I'd like to submit some changes that I made to RhythmboxModule.py.  I've
added the ratings, play-count, and (partial) cover-location tags to the
code.

Cool, that is good to hear.

Good idea. It's something I've wanted to add for a while, but never got to it. I'm glad you did.
I'm curious how you did it, did you used the methods in the Audio class (get_audio_rating, get_audio_cover_location)?
Something I should have documented better is how to create these kind of extensions. The way I planned was that a dataprovider would override the get_media_tags from the Audio class.
 




I know that there is an ongoing D-Bus version of the module, but I
wasn't sure if it would work from the command line if Rhythmbox isn't
already running.  I couldn't get it to work even when it was
running...not a complaint...since the code is probably still in flux.

Yeah, the DBus stuff require some modifications to the Rhythmbox application, of which I am not sure about the status. I have cc'd alexandre who knows most about this part of the application.

The DBus interface is stalled right now. My version was created as a Python plugin, and as such had some limitations, such as bad performance, and unstable IDs.
A Rhythmbox developer said he was creating another DBus interface built into Rhythmbox, written in C, with much better performace. But the last word I got was it was still incomplete, and I don't have the necessary knowledge in the Rhythmbox internals to work on it.
 




My questions: Are you interested in the code changes? If so, should I
send the modified file (with the generated CHANGELOG file) straight to
you?  Or, is there another (preferred) method for patch/code
submissions?

Usually the best way is to create a bug in bugzilla [1], and attach the patch to that bug. If you need any more help creating the patch, then let me know.

If you create the bug I'll be glad to review it, i'm quite familiar with the Rhythmbox module, and I can give some help if it's needed.
 




BTW, the modified code is based on SVN change set 1765 (Monday).

Thanks in advance,
James

P.S. I'm also considering writing a MusicFolderTwoWay.  I need it to
keep my mass storage device based phone synchronized and organized.  The
idea is to create <artist>/<album>/<tracks> folder structure from the
media tags. And, (optionally) create the original playlist (pls or m3u)
in the top level folder.

Thats a good idea. Alexandre, do you have any thoughts on this?

It's a good idea indeed. I would advise you to use standard methods in the Audio class (get_audio_title, get_audio_artist, get_audio_album, etc), so it should work with all media providers, when they implement support for get_media_tags.
You'll notice the way it works with Rhythmbox is that these tags are loaded from the file, so it'll be very slow everytime a folder is scanned. But using the Rhythmbox library, or the DBus API, it can be made much faster, because the tags are already in the database. Again, this kind of information should be added in get_media_tags.
If all of this works, it's only a matter of creating folders from get_audio_artist(), get_audio_album() and copying the track to that folder. You can use the Folder provider as a base class.
However maybe you would like to create only a source, insted of two-way, to make it simpler.
 

Let me know if you need any help.

Bye.

--
Alexandre Rosenfeld

USP São Carlos - EESC/ICMC
Engenharia de Computação 06
(Computer Engineering Student)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]