Simplify NetflixSession.parse_genres_for_video(). master
authorTilman Sauerbeck <tilman@code-monkey.de>
Sat, 12 Aug 2017 10:58:15 +0000 (12:58 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sat, 12 Aug 2017 11:01:06 +0000 (13:01 +0200)
commit00100bf1d63fcc4895f81aefbe8d79784f908330
treea5db284cbc0d9c4ca657743e8458c19fde5bc1da
parent385854355a756f1689ef897443876e4f75ace542
Simplify NetflixSession.parse_genres_for_video().

This method resolves genre references (IDs) to genre names.
Before this change, we would iterate the list of genre (names)
and then iterate the list of genre IDs to look for matches.
The same result can be established more efficiently by iterating
the genre references followed by lookups for their associated names.

Error handling for lookup failures has been left intact from the
original implementation.
resources/lib/NetflixSession.py