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

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    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,257
    2,533
    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,257
    2,533
    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,257
    2,533
    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,257
    2,533
    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,257
    2,533
    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

    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select "Internal DirectShow player" as music output, but then you lose gapless playback. If you you don't have multichannel music you can choose WASAPI as the output and set the number of speakers to stereo. I have...
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select...
    Not sure if this a a bug/config/settings problem. I am running a media portal 2.5 server with 2.41 client but it seems I get the...
    Replies
    1
    Views
    656
    I currently have two Quatros running, one connect, one duo using OTA antennae, mostly UHF fringe area, mostly cat5 local network. Hauppauge card retired long ago. I have also retired very early SD units, the Quatros seem to work much better than the older units. Go to SD's support website and download and install the windows...
    I currently have two Quatros running, one connect, one duo using OTA antennae, mostly UHF fringe area, mostly cat5 local network...
    I am currently using a Hauppauge WinTV QuadHD PCIe card on MP1 (1.37) for DVB-T, but 2 of the tuners have died. Thinking about...
    Replies
    3
    Views
    1K
    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team will create a Jira ticket, and for each ticket, you’ll make the changes and submit a pull request. This will be transparent and straightforward.
    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team...
    I'm very glad to see that mediaportal 1 is on github, where ordinary devs with github accounts can make contributions. Please can...
    Replies
    7
    Views
    1K
    For music you may use --> https://www.team-mediaportal.de/erweiterungen/musik/global-search With GlobalSearch you can search for any entry in your music database: Artist, Album, Title, Lyrics... I'm afraid there is no such plugin :unsure:
    For music you may use --> https://www.team-mediaportal.de/erweiterungen/musik/global-search With GlobalSearch you can search for...
    HI, I'm new to MediaPortal and have a question about searching for data. I have an extensive collection of music, films, and TV...
    Replies
    1
    Views
    3K
    I do have most of my Music tagged with Lyrics and it works with My Lyrics. If I remember correctly, you have to set: <Don't search songs with Lyrics in Music tag>
    I do have most of my Music tagged with Lyrics and it works with My Lyrics. If I remember correctly, you have to set: <Don't search...
    Hi. Setting up MyLyrics now. I got version 2.2.2.295 from My Lyrics 2.2.0 for MP 1.10 Final, and above (31-12-2014) . I'm planning...
    Replies
    1
    Views
    3K
    Top Bottom