Rewrite YouTube.choose_best as YouTube.ch_best
commit3ae7c259f5d3f20f40d7dd03bcb9456fe9fe4b9b
authorToni Gundogdu <legatvs@gmail.com>
Mon, 30 Jul 2012 18:53:05 +0000 (30 21:53 +0300)
committerToni Gundogdu <legatvs@gmail.com>
Mon, 30 Jul 2012 19:04:29 +0000 (30 22:04 +0300)
treee751fa329fb7412b8d2ec0b6cd01d6c24ae8ef52
parentd1d108618a3eed13ff11be00e13d51cc42a43fa9
Rewrite YouTube.choose_best as YouTube.ch_best

The library no longer expects the media scripts to set both 'default'
and 'best' media streams. Instead, only the 'best' quality stream is set
if there are >1 streams available. The media script is still responsible
to determine the best media stream.

NOTES:
  - Format IDs are now "media stream format IDs" ("fmt_id") which are used
    to identify the media streams (when there are >1)

  - If there is only one media stream available, it is not necessary to
    set any media stream format IDs ("fmt_id")

  - default stream is whatever the media script sets as the first stream
    in the returned qargs.streams

  - best is now a flag (boolean)
share/lua/media/youtube.lua