Re: [Rhythmbox-devel] Plugin to fix playlists



On Tue, Jan 31, 2012 at 11:47 AM, Petko <pditchev gmail com> wrote:
> On 01/22/2012 10:49 PM, Petko wrote:
>
>  Hey guys , . [...]
>
>
>  The plugin would rely on the consistent filenames . Simple cycle :
>
> For (every song in the playlist) {
>
> //get filename from the path recorded in the playlist
>
> //find the song in the library by filename
>
> //get the path ,stored in the library
>
> //record it back in the playlist
>
> }
>
>
>  Ok , from the lack of response and the looks of the Rhythmbox libraries I
> think there is little chance this function will be implemented in the core
> function that imports playlists.

I don't even understand what you're asking for here.  You want the
playlist code to do this for you?  To my mind this is something better
implemented in a plugin.

> So since I still haven't understood the RBs
> database , signals .... well a long list of things , I intend to write a
> plugin and hope that it gets integrated (upon a error (missing file) when
> importing a playlist - prompt to fix the playlist using that algorithm) .
>   So I'm writing mainly because I have some questions . I pretty much got
> how plugins work . The algorithm's pretty much set :
>
> 1.prompt for playlist - I honestly have no idea how to do it . I've done
> OpenGL , but no real GUI in GTK . Still that's the simplest problem .

Read the introductory documentation for gtk. There's nothing special
about using gtk within rhythmbox.

> 2.here's a big pickle - how do I get the playlist parser to give me the
> playlist items' URI-s

Which playlist parser?  What sort of playlists are you talking about?

> 3.Last part I figured out : probe every DB entery for its location , parse
> it through g_filename_from_uri , compare the filename to the item given from
> the playlist, if there's a match -> add it to the playlist

The database really isn't built for this sort of thing, so you're
going to end up just iterating through the entire thing. This will be
slow.

> Where I'll have a big problem is figuring out dependencies and communication
> with the shell . All and all I'd be happy to get some help around the RB
> source.

If you ask specific questions I can answer them. I can't answer "I
need some help".


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