cjcodeproj / medialibrary

Python code to read XML media files
MIT License
2 stars 0 forks source link

Song support #170

Closed cjcodeproj closed 4 months ago

cjcodeproj commented 6 months ago

Create a class hierarchy to handle songs.

Create a code structure to handle the <elements> element, and the child elements <song> and <dialogue>.

cjcodeproj commented 4 months ago

Commit:

https://github.com/cjcodeproj/medialibrary/commit/a76cc48c7712d33ca08795c0a93465405f327d2c

cjcodeproj commented 4 months ago

Closing Notes

Complexity

What the code considers elements are tricky, because they have share attributes from the parent object that contain them.

For example, on a Van Halen CD, the album artist is obviously Van Halen. And if individual songs in the XML structure do not have <catalog> elements that identify the artist as Van Halen, then the Song object needs to reference the Album object and grab the artist values from that.

Which is good, because the code is capable of doing all the heavy lifting, and it's a better trade off than having more XML elements than necessary. I should only have to list the artist as Van Halen once.