2017-06-05, 19:18
2017-06-05, 19:43
In the code. For movies you can find it at https://github.com/xbmc/xbmc/blob/master...ase.h#L176. The other video types are covered further down in the same header file. And yes, it's ugly
2017-06-05, 19:50
Cool, thanks. And yes, the cXX idea is... audacious
2017-06-05, 23:39
Shouldn't this be fixed? Code obfuscation is bad.
2017-06-05, 23:59
(2017-06-05, 23:39)nickr Wrote: [ -> ]Shouldn't this be fixed? Code obfuscation is bad.Not really. It just requires a complete database and interface layer rewrite
2017-06-06, 11:38
2017-06-07, 09:33
it has worked for 10 years, allowing multiple redesigns without completely rewriting the db. sorry, i do not agree that it's ugly.
2017-06-08, 07:53
I tend to think that field names should in same way reflect the data within. c01 means nothing.
2017-06-08, 07:57
Its called generalisation - i even tend to say that this is a db pattern
2017-06-08, 09:15
some details:
we use the same structure for all kinds of contents (movies, episodes, shows, mvideos)
in the code we map from these columns directly to struct members, https://github.com/xbmc/xbmc/blob/master...ase.h#L176 and https://github.com/xbmc/xbmc/blob/master...ase.h#L206
this way we can easily read from db directly into the info structs, https://github.com/xbmc/xbmc/blob/master....cpp#L2199
and we can change the contents of a column as we see fit, removing/adding info without rewriting the entire db.
the price is small on the code side, and it grants flexibility and less code. the displayed names in a db viewer is irrelevant compared to the code advantages.
we use the same structure for all kinds of contents (movies, episodes, shows, mvideos)
in the code we map from these columns directly to struct members, https://github.com/xbmc/xbmc/blob/master...ase.h#L176 and https://github.com/xbmc/xbmc/blob/master...ase.h#L206
this way we can easily read from db directly into the info structs, https://github.com/xbmc/xbmc/blob/master....cpp#L2199
and we can change the contents of a column as we see fit, removing/adding info without rewriting the entire db.
the price is small on the code side, and it grants flexibility and less code. the displayed names in a db viewer is irrelevant compared to the code advantages.