StreamHD/ps3mediaserver — comment on commit fb9718483d2d18ee971d8099a579ddcdd071533d
File:  line 0
By StreamHD:

Plugins may need to be updated for compatibility with this method:
replace all instances of "ArrayList" with instances of "DLNAMediaSubtitleList"

I think it could be beneficial to wrap several ArrayLists, one for each type of subtitle, into this class. It would simplify code when searching for specific types/languages of subtitles, especially in more complex cases where a renderer supports only a partial set of the available subtitles.

It may also be possible to determine the highest priority/default subtitle in real-time while subs are being added to the collection. This should reduce the [subtitles code in Player.java] (https://github.com/ps3mediaserver/ps3mediaserver/blob/master/src/main/java/net/pms/encoders/Player.java#L188), and simplify the implementation of subtitle selection logic in [Request.java] (https://github.com/ps3mediaserver/ps3mediaserver/blob/master/src/main/java/net/pms/network/Request.java#L211)/[RequestV2.java] (https://github.com/ps3mediaserver/ps3mediaserver/blob/master/src/main/java/net/pms/network/RequestV2.java#L293).