[Blog] Music Section gets some TLC (1 Viewer)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Re: Re : Music Section gets some TLC

    With some skins (like streamedmp) you get the last added albums into the basic home screen. Is there a way (like movingpictures) to sort albums by last added date into the music database?

    In the list on the home page or in the database views? Not sure about the home page stuff as that is all done outside of the music plugin. You can create a database view of albums sorted by date though
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    @jameson_uk
    I've a question regarding the music library. I'm currently playing with some ASP.Net stuff and thought it would be nice to look at the media databases of MP as a source of information... While the most databases are easy to use the music database layout is not that nice ;) Will there be any change in the upcoming 1.x releases?

    Unlikely to be any changes as the really messy code that has built up over the years depends on it and I really don't fancy trying to rewrite the music view handler from scratch.

    That said the database is kind of like the that out of necessity The main issue is that you can have multiple values stored in artist/album artist/composer/genres.... tables. This multi-value / single field thing does not really agree with relational theory ;)

    Not sure what changes you would want to see? The Tracks table contains all your tracks and most of the info about those tracks. Multi-artist fields are stored in their own tables as unique values. This is meant to make it easier to get say an A-Z listing of artists because we need to store multiple values in one field in the tracks tables you have
    Code:
    | artist a | artist b |
    which makes that sort of query pretty difficult
     

    Mike Lowrey

    Portal Pro
    February 4, 2009
    638
    124
    Berlin
    Home Country
    Germany Germany
    Not sure what changes you would want to see?
    Well a "relational theory" compatible layout would be great :D My problem is mainly the massive amount of work arounds to (as an example) simply get the artist's albums.

    Another thing is why are two of this characters '|' in each strAlbumArtist row?
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Not sure what changes you would want to see?
    Well a "relational theory" compatible layout would be great :D My problem is mainly the massive amount of work arounds
    What particular workaround? Below might explain...

    to (as an example) simply get the artist's albums.
    Another thing is why are two of this characters '|' in each strAlbumArtist row?

    The issue is the many to many relationship between tracks and album artists.

    The | characters are to separate different values so to get a list of albums for an album artist you use

    Code:
    Select distinct strAlbumName from Tracks where strAlbumArtist like '%| artist |%'

    so if you have say the collaboration between Linkin Park and Jay-Z the album artist field could be | Linkin Park | Jay-Z | and hence the above query for both artists will still return the album.

    An intersection table between Tracks and the multi-value tables would be much better database design but it would need large amount of code changes (there are about 1000 lines in MusicViewHandler.cs that would need updating
     

    Mike Lowrey

    Portal Pro
    February 4, 2009
    638
    124
    Berlin
    Home Country
    Germany Germany
    ah thanks that explains a lot.... Haven't thought about many to many relationship because normally i take mixed album artists as separate artist ;)

    Regarding the amount of work it was what i have suspected cause this also explains why it's so complex to expand the the filter options(like we've already discussed in the music section thread)
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    ah thanks that explains a lot.... Haven't thought about many to many relationship because normally i take mixed album artists as separate artist ;)
    Me too... for album artist, if it is a compilation I set this to "Various Artists". I sometimes do use multiple artists sometimes but normally can't be bothered...

    [quorte]Regarding the amount of work it was what i have suspected cause this also explains why it's so complex to expand the the filter options(like we've already discussed in the music section thread)[/QUOTE]
    Some filters have been updated a bit so some things that did not work before will do now but there is not a massive change here.

    Even if the database has a nicer structure (this would have to be similar to MediaMonkey http://www.mediamonkey.com/wiki/images/MM3DBStructure.PNG) then this can actualy make querying the data more complicated. eg. say you want a list of albums for a particular genre with all artists beginning with A you actually have to join together six tables and when you combine this the dynamic view stuff it can get pretty messy and confusing.

    I want to improve setting up and configuring of views for 1.3 but I don't plan on changing the database structure (unless there is a good reason to)
     

    TiboTv

    Portal Pro
    June 22, 2009
    244
    39
    Home Country
    Belgium Belgium
    Re : Re: Re : Music Section gets some TLC

    In the list on the home page or in the database views? Not sure about the home page stuff as that is all done outside of the music plugin. You can create a database view of albums sorted by date though

    Yes it's listed in home page by the skin (in basichome page exactly). I know that we can create a view of albums sorted by date but it's sorted by publishing date of the album (the information is coming from IDtag) and not by database adding date (when a database refresh or scan results of adding files to the database)
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Re: Re : Re: Re : Music Section gets some TLC

    Yes it's listed in home page by the skin (in basichome page exactly).
    If you want to change the sort here the plugin needs to sort that (I get a bit lost as to whether this is fanart handler, infoservice or what now...)

    I know that we can create a view of albums sorted by date but it's sorted by publishing date of the album (the information is coming from IDtag) and not by database adding date (when a database refresh or scan results of adding files to the database)
    There are two sorts, one is year and one is date (which can now be set as last-modified date, created date or first date MP found out about the file).

    I have a feeling that the year and date sorts were there previously (kind of lost track of whether this was changed for 1.2 or whether that was there already... I certainly have an albums by age view which lists all albums in order of created date (in the database)
     

    TiboTv

    Portal Pro
    June 22, 2009
    244
    39
    Home Country
    Belgium Belgium
    Re : Re: Re : Music Section gets some TLC

    In the list on the home page or in the database views? Not sure about the home page stuff as that is all done outside of the music plugin. You can create a database view of albums sorted by date though

    Yes it's listed in home page by the skin (in basichome page exactly). I know that we can create a view of albums sorted by date but it's sorted by publishing date of the album (the information is coming from IDtag) and not by database adding date (when a database refresh or scan results of adding files to the database)

    I've made some tests this evening... and by creating a view with parameter "recently added", "list view", sort by "date" I can get the list of last added song sorted by adding date.
    I don't find a way to make it by album... I think it isn't possible and this job is done by a plugin (pretty sure that it's done by InfoService)

    I've got an other remark concerning music views : I don't find a way to set a default view on MP starting. eg : if you set "album" view in MP and then restart it, the default view stays on "album" and not on "artist".
    It seems that there's no way into MP Configuration to set the "default startup view" for music section.

    Could you confirm it? If it's true, it could be a small but good improvement :)
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Re: Re : Re: Re : Music Section gets some TLC

    I've made some tests this evening... and by creating a view with parameter "recently added", "list view", sort by "date" I can get the list of last added song sorted by adding date.
    I don't find a way to make it by album... I think it isn't possible and this job is done by a plugin (pretty sure that it's done by InfoService)
    The infoservice thing only changes what you can see on the home page and is not related with the music plugin.

    To create an album by date view you can create a view like this
    album | sort by date desc
    tracks | sort by track

    I've got an other remark concerning music views : I don't find a way to set a default view on MP starting. eg : if you set "album" view in MP and then restart it, the default view stays on "album" and not on "artist".
    It seems that there's no way into MP Configuration to set the "default startup view" for music section.

    Could you confirm it? If it's true, it could be a small but good improvement :)

    In 1.2 you can use parameters to open up music plugin. This means that (dependent on skin) you can set a link to open music at the same view each time.
     

    Users who are viewing this thread

    Similar threads

    You can always try, select any window, turn off the Media Portal, change the ID of the selected one to the desired one (plugin) and check.
    You can always try, select any window, turn off the Media Portal, change the ID of the selected one to the desired one (plugin) and...
    I don't have a TV card in my HTPC setup, so I really only use plugins that browse and show media files, like MP TV-Series, Moving...
    Replies
    5
    Views
    377
    Ok .. Thanks for the suggestion about the screensaver..i went and deliberately unticked the screensaver on a fresh install ( no joy ..same issue ) and the issue within 40 seconds now so I did a full Mediaportal uninstall and then clean install x64 Mediaportal 1.30 and clean rebuild of databases.....still having this issue and I...
    Ok .. Thanks for the suggestion about the screensaver..i went and deliberately unticked the screensaver on a fresh install ( no joy...
    Hi, I use Mediaportal 1 a lot and have created a lot of Fanart jpegs for my music soundtracks but just in the last 2 weeks I have...
    Replies
    12
    Views
    429
    MP1 MP2 1.32 StreamedMP Latest Music DE
    No one can help me here?
    No one can help me here?
    In StreamedMP I have the most recently added films (Moving Pictures) and also TV recordings on the home screen. But I made the...
    Replies
    5
    Views
    736
    • Sticky
    MP1 MP2 [News] MediaPortal 2 - 2.5 Release DE
    Will be version 2.5.1 ready quite soon? I read somewhere it will be a bugfix release, no new features are probably not in focus.
    Will be version 2.5.1 ready quite soon? I read somewhere it will be a bugfix release, no new features are probably not in focus.
    We are proud to present MediaPortal 2.5 MediaPortal 2.5 is a full-blown media center software that addresses most common user...
    Replies
    70
    Views
    6K
    Hi CyberSimion Have now got MP 1.31 working ok Stopped Network Adaptor waking computer (Computer now not waking from sleep other than to record scheduled programs) Activated Power Scheduler and ticked all boxes under EPG tag (XmLTv guide now downloaded and installed as scheduled) I think my problem with MP 1.32 install re scheduled...
    Hi CyberSimion Have now got MP 1.31 working ok Stopped Network Adaptor waking computer (Computer now not waking from sleep other...
    I have just installed MP 2.4 I have set up for ICE TV XMTV guide Followed all instructions for set up ( as for MP 1 ) Guide...
    Replies
    14
    Views
    1K
    Top Bottom