mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
ytparser/moviebrowser: add option for selecting prefered quality
Origin commit data
------------------
Branch: ni/coolstream
Commit: e01e96c1ac
Author: martii <m4rtii@gmx.de>
Date: 2013-06-09 (Sun, 09 Jun 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -59,19 +59,26 @@ void cYTVideoInfo::Dump()
|
||||
printf("===================================================================\n");
|
||||
}
|
||||
|
||||
std::string cYTVideoInfo::GetUrl(int fmt)
|
||||
std::string cYTVideoInfo::GetUrl(int fmt, bool mandatory)
|
||||
{
|
||||
yt_urlmap_iterator_t it;
|
||||
if (fmt) {
|
||||
if ((it = formats.find(fmt)) != formats.end())
|
||||
return it->second.GetUrl();
|
||||
return "";
|
||||
if (mandatory)
|
||||
return "";
|
||||
}
|
||||
if ((it = formats.find(22)) != formats.end()) // 720p
|
||||
if ((it = formats.find(22)) != formats.end()) // 720p MP4
|
||||
return it->second.GetUrl();
|
||||
if ((it = formats.find(37)) != formats.end()) // 1080p
|
||||
#if 0
|
||||
if ((it = formats.find(35)) != formats.end()) // 480p FLV
|
||||
return it->second.GetUrl();
|
||||
if ((it = formats.find(18)) != formats.end()) // 270p/360p
|
||||
if ((it = formats.find(34)) != formats.end()) // 360p FLV
|
||||
return it->second.GetUrl();
|
||||
#endif
|
||||
if ((it = formats.find(18)) != formats.end()) // 270p/360p MP4
|
||||
return it->second.GetUrl();
|
||||
if ((it = formats.find(37)) != formats.end()) // 1080p MP4
|
||||
return it->second.GetUrl();
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user