I'd like to help with the music part of MP - some questions (1 Viewer)

JulianBuss

Portal Pro
November 14, 2004
136
2
Hi,

I've downloaded the source of MP and managed to compile it in the VC#Express. Now I'm looking around in the source and feeling a little lost on the first sight :)

As a starter I want to understand how a (music) view with thumbnails work. I've already found the GUIListControl.cs. There is a _listItems field which contains a list of GUIListItems. I think the _listItems contains the elements the view should display. Is that correct?

What I don't understand: where is the _listItems filled? I only see the initalization with an empty list, I don't see where it's filled with elements... or am I completely wrong?

My target is to display thumbails in parent folders, which don't display thumbnails at the moment.
 

rydberg

New Member
April 10, 2005
1
0
Hi,

As I understand it the listitems are filled in GUIMusicGenres.LoadDirectory and GUIMusicFiles.LoadDirectory.

I 'm also a new developer and has started some work in the MyMusic section.
Here is a list of what I have done, so you don't start with the same changes: :wink:
* Possibility so sort by artist, almost all the code was already there, just didn't show in the UI.
* Sort by artist now sorts by Artist, Album.
* When you view albums in icon or big icon mode the name of the icon is "Album" by "Artist" insted of just "Ablum".
* Rememebers sort by.
* Rememebers the views, if you choose big icons it will now stick, even if you close mp.

I will upload these changes via patch in SourceForge as soon as I have done more testing and optimizations.
 

JulianBuss

Portal Pro
November 14, 2004
136
2
thanks for the reply! I'm very glad there's another new dev in the music section... :) I will check your suggestions later...

I described my wishes for the music section in the "help to improve myMusic" thread:

1.) In all views, Coverart is only showed when I'm at the album level. When I for example have the "gerne" view, the gerne items have no coverart at all, which does not look nice. So if you have no coverart for a view item, you should take the covert from the first or last album contained in this part of the view (for example I have the genre "Pop", so you can take the converart from the first album with the genre "Pop").

Meedio does that and it's very nice and improves the coolness factor.

2.) I can restrict views with the "=" or "like" operator, that's similar to Meedio. But I cannot hide a selection Sad So I have my music tagged with genres like "Pop entry", "Pop party", "Pop live" and so on.
Now I want a view which lists all albums having a genre "Pop*", so that I can browse through every which is pop music.

When I enter the "like" operator with the "Pop%" argument, MP shows me a view starting with the elements "Pop entry", "Pop party", "Pop live" etc. But I don't want to see them, because I don't know in which "sub-genre" the album I search is.

So in short: I miss the possiblity to simply restrict a view without "seeing" the restriction. You could do that by implementing a list type "hidden".

So I will try to implement these both after I understood the code :)
 

JulianBuss

Portal Pro
November 14, 2004
136
2
to keep you informed: I implemented the missing code so that "genre" and "artists"-folders having a thumb, too. After some testing I found that the basic code is already there; in the "thumbs/music" directory there are subdirs for "gerne" and "artists". When a jpg for each genre / artist is available there, the folder in the "gerne" or "artist" view will display it.

So all I had to do was to modify the "update music database" stuff so that coverart is being created in this "thumbs/music/genre" and "thumbs/music/artists" directory. That was easy, because there was already similar code in the MediaPortal.Music.Database.MusicDatabase -> UpdateSong method.

A problem still exists if for example an artist is named "AC/DC", and the "/" is not allowed in a filename. But I will think about that later.
 

CHli

Portal Pro
July 5, 2005
1,251
14
Switzerland
Home Country
Switzerland Switzerland
JulianBuss said:
to keep you informed: I implemented the missing code so that "genre" and "artists"-folders having a thumb, too. After some testing I found that the basic code is already there; in the "thumbs/music" directory there are subdirs for "gerne" and "artists". When a jpg for each genre / artist is available there, the folder in the "gerne" or "artist" view will display it.

So all I had to do was to modify the "update music database" stuff so that coverart is being created in this "thumbs/music/genre" and "thumbs/music/artists" directory. That was easy, because there was already similar code in the MediaPortal.Music.Database.MusicDatabase -> UpdateSong method.

A problem still exists if for example an artist is named "AC/DC", and the "/" is not allowed in a filename. But I will think about that later.

There should already be some code to treat the / * , etc... in filename because for TV logo the politics is to use _ (underscore) for all non legal characters in filename.
 

JulianBuss

Portal Pro
November 14, 2004
136
2
I found the code, thanks. My modification is complete. Now I have to learn how to submit this changes as patch... but I'm glad my very first useful code contribution is finished :)
 

Taipan

Retired Team Member
  • Premium Supporter
  • February 23, 2005
    2,075
    44
    Melbourne
    Home Country
    Australia Australia
    JulianBuss said:
    Now I have to learn how to submit this changes as patch... but I'm glad my very first useful code contribution is finished :)
    I assume that you are aware that SteveV is doing a lot of work on the My Music section too, so I assume you are coordinating your changes with him?

    I would hate to see your hard work get lost in other changes that are already underway... :(
     

    JulianBuss

    Portal Pro
    November 14, 2004
    136
    2
    yes, I'm aware of that. I posted my feature requests in Steve's Mega-Post first, but did not receive an answer. So I assume he is too busy to code that. But I will post information about my patch to Steve's post to keep him informed.
     

    Users who are viewing this thread

    Top Bottom