• 1
  • 12
  • 13
  • 14(current)
  • 15
  • 16
  • 24
Managing music albums Box-Sets properly with KODI library feature
(2019-12-03, 02:41)HeresJohnny Wrote: That's aesthetically unpleasing... all the MB tags use natural writing (in case this ever gets adopted). Can't you make it case insensitive on the Kodi side?

maybe in MusicDatabase here?
Code:
if (strType.find("boxset") != std::string::npos) //boxset flagged in album type
bBoxedSet = true;

scott s.
.
Reply
Probably I should have made it case insensitive in the first place.  However, I can't honestly say that I spend much time looking at the tags in my files (unless they need fixing) or that I'm bothered about whether or not they are aesthetically pleasing.  I am bothered about whether or not they produce the intended results.

It's a simple enough fix though so I'll see if I can include it in the json-rpc changes that I'm currently working on.
Learning Linux the hard way !!
Reply
@black_eagle @DaveBlake

In Widelist view all my single disk albums that have NOT been successfully scraped are displaying Disk 0

Image

As these are single disk albums they have no Disk number set.

Before the boxset change if there was no Album Info scraped it would have displayed a track listing as follows:

Image

Where is this Disk number even coming from? I don't see an Estuary change in the PR and this sort of info should be handle by an infobool to give the choice to display or not, as not particularly keen on it even where I have multi-disk albums with disk number set as in

Image

Is this an unintentional regression as I prefer how it was before.
Reply
This seems to be the part of Estuary no longer working for the track info when Album has no scraped info https://github.com/xbmc/xbmc/blob/master...#L245-L267

Did something change that could affect <visible>!String.IsEmpty(ListItem.DBID)</visible>

[EDIT]

Ok it seems that the Disk label is returned by $INFO[ListItem.Label] at https://github.com/xbmc/xbmc/blob/master...t.xml#L264

So why is that now returning Disk numbers and not the tracksHuh
Reply
@jjd-uk @black_eagle I can see what is happening.
Tech warning: ordinary users look away
The album node now has disc node as default child, which CGUIWindowMusicNav::GetDirectory switches to be song node when there is only one disc (much the same as TVshow lists gets flattened into episodes rather than seasons if you only have one season). Here Estuary has a second item list, a chlid of the main list of albums. But processing does not go through CGUIWindowMusicNav::GetDirectory hence it is a list of discs (the defaukt child) , not a list of songs. Need to have a think about how such secondary lists can tell Kodi that what is wanted is songs not discs.

BTW @jjd-uk to see "disc 0" you must have music files tagged without disc numbers

EDIT:
That second itemlist is given ListItem.FolderPath with values like musicdb://albums/2002, and needs to be given musicdb://albums/2002/-1/ to get songs rather than discs.  Not sure how to do that in the skin, but it must be possible to append "-1" to the album item path (allowing for options of course).

Where in the skin? Well  https://github.com/xbmc/xbmc/blob/dd178e...ml#L20-L23  is where the related var currently gets set
Reply
If you open the album, the track list is shown for each disc.

Image

To be honest, that's where I'd expect it to be. First screen shows discs, opening it shows all the discs (if more than one) and the track list for each disc. Not that it's a particularly good track list as it doesn't scroll Huh Only one disc goes straight to tracks.

@DaveBlake, that path (ListItem.FolderPath) is used for sorting the items AFAICS https://github.com/xbmc/xbmc/blob/dd178e...s.xml#L172
Learning Linux the hard way !!
Reply
(2019-12-06, 20:20)black_eagle Wrote: If you open the album, the track list is shown for each disc.

Agreed for multi-disc albums that might make sense as you show it.

However single disc albums are also being affected (in my case these have no disc number tag), as there is no disc view you should see the tracks at the album level as previously.

What about if "Split albums into individual discs" is disabled? so again no disc level so tracks should be displayed at album level.

Why is an ListItem.Label being returned of Disk 0 if there is no disk number tag? surely nothing should be returned in this case.
Reply
And just to confirm, tracks do appear at the disc level for multi-disc albums.

Image

Seems we have some of the same taste in music Big Grin

So it's behaviour solely for single disc albums that might need to be addressed, either in Estuary or core.
Reply
(2019-12-06, 21:09)jjd-uk Wrote: Why is an ListItem.Label being returned of Disk 0 if there is no disk number tag? surely nothing should be returned in this case. 
All songs have a disc number stored, if you miss that tag data then it is taken as 0

Otherwise, yes somehow we need albums with one disc (even if that has number 0) to show a track list, but those with many discs to show a disc title list, in that side panel. How we control the container to do that i am no so clear. The skin in effect presents core with a path that defines what it wants to display in that panel, how is core to know it realy wants various things. Anyway time to eat.
Reply
(2019-12-06, 21:22)DaveBlake Wrote:
(2019-12-06, 21:09)jjd-uk Wrote: Why is an ListItem.Label being returned of Disk 0 if there is no disk number tag? surely nothing should be returned in this case. 
All songs have a disc number stored, if you miss that tag data then it is taken as 0

Bugger, I was hoping something like

<visible>String.IsEmpty(ListItem.DiscNumber)</visible>

might remove the Disc 0 labels.
Reply
(2019-12-06, 21:09)jjd-uk Wrote: However single disc albums are also being affected (in my case these have no disc number tag), as there is no disc view you should see the tracks at the album level as previously.

Yes, that does make sense.
(2019-12-06, 21:09)jjd-uk Wrote: What about if "Split albums into individual discs" is disabled? so again no disc level so tracks should be displayed at album level.

Estuary still displays the 'Disc n' on the left, rather than track listing.  Opening the album works as expected, ie no discs just straight to tracks.  I'm still not 100% sure if this is a core thing or a skin thing.  Not knowing much about skinning, I could do with some input here from a skinner.  Perhaps @scott967  might have some ideas ?
(2019-12-06, 21:09)jjd-uk Wrote: Why is an ListItem.Label being returned of Disk 0 if there is no disk number tag? surely nothing should be returned in this case.
Because the default return value of field_value::get_asInt() is zero if none of the conditions are satisfied.  So get_asInt() either returns the numeric value in the database, or in the event of no value, returns 0. 

Query is here https://github.com/xbmc/xbmc/blob/b238c2....cpp#L4791

Definition of .get_asInt() is here https://github.com/xbmc/xbmc/blob/b238c2...#L386-L421

Means an empty/null value returns a disc number of zero.
Learning Linux the hard way !!
Reply
(2019-12-06, 21:38)black_eagle Wrote: I'm still not 100% sure if this is a core thing or a skin thing

Same here.

I can handle any Estuary changes if it's possible to get right behaviour without core changes if someone can point me in the right direction.

@ronie your thoughts would be appreciated.
Reply
How is Disc number stored? is it an integer or string?

edit: Nevermind stupid question it's a string/
Reply
(2019-12-06, 21:51)jjd-uk Wrote: How is Disc number stored? is it an integer or string?

Its an integer.  Its stored as part of the track number, specifically iDisc = iTrack >> 16.  So shift the iTrack value to the right by 16 bits and take the remaining value as the disc number.

EG, track 1, Disc 1 is stored as 65537.  Track no = iTrack & 0xFFFF. Track 1, disc 2 == 131073. etc etc
Learning Linux the hard way !!
Reply
Stop barking up the wrong tree guys, disc number is a song or disc property, not an album property.

The skin is in effect passing an album property (ListItem.FolderPath) to a container control which then makes a list of children derrived fom that path which is now discs. What is needed is for the skin to use other album properties like totaldiscs (ListItem.TotalDiscs) and adjust what it passes to the panel container so that it shows songs when totaldiscs = 1 or "Split albums into individual discs" is disabled, and discs otherwise. I'm hoping that skins have access to settings?

What appears on that panel is already conditional (album desc if there is one otherwise container with list of children), so it is about making the container contents conditional on ListItem.TotalDiscs)

EDIT
Something like this in variables.xml is what I am thinking
Code:

<variable name="InfoListPathVar">
....
        <value condition="String.IsEqual(ListItem.DbType,album) + Integer.IsLess(ListItem.TotalDiscs,2) ">$INFO[ListItem.FolderPath]-1/</value>
</variable>
Reply
  • 1
  • 12
  • 13
  • 14(current)
  • 15
  • 16
  • 24

Logout Mark Read Team Forum Stats Members Help
Managing music albums Box-Sets properly with KODI library feature0