mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
Detect livestreams in the detectType method
This commit is contained in:
@@ -74,8 +74,9 @@ class Utils {
|
||||
static detectInfoType(infoQueryResult) {
|
||||
if(infoQueryResult == null) return false;
|
||||
if(Object.keys(infoQueryResult).length === 0) return false;
|
||||
if (infoQueryResult._type != null && infoQueryResult._type === "playlist") return "playlist";
|
||||
if (infoQueryResult.entries != null && infoQueryResult.entries.length > 0) return "playlist";
|
||||
if(infoQueryResult.is_live != null && infoQueryResult.is_live === true) return "livestream";
|
||||
if(infoQueryResult._type != null && infoQueryResult._type === "playlist") return "playlist";
|
||||
if(infoQueryResult.entries != null && infoQueryResult.entries.length > 0) return "playlist";
|
||||
return "single";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user