I'm trying to save streams settings (e.g. audio/subtitle track numbers) on titleEnd system event and what I've noticed that Tosh player trigger this event after loading the new title, so I couldn't use currentTitle to collect settings because it already point to the new one.
Can anybody give an idea where is the best place to save these

Saving stream settings
jeremy2006
DanJL
Kamath Vikram
KitWest
Puh Sk8
sathupadikesavan
I'm not sure I follow - why are you listening for title_end instead of audio_track and subtitle_track
Unless you have complex rules for maintaining settings (or need to have a different saved value for each title), the player should attempt to select the correct track for you (see Peter Torr's blog about selected vs current tracks). So, you might not actually have to have any script for this at all.
Also, if there is code that does maintainence for multiple titles on a disc, its usually better to go with a playlist app rather than multiple title apps that all perform the same functions.
_Matt Smith _
JohnWilliams