if not info:
return False
- if self.duration > var.config.getint('bot', 'max_track_duration') != 0:
+ if self.duration > (var.config.getint('bot', 'max_track_duration') * 60) != 0:
# Check the length, useful in case of playlist, it wasn't checked before)
log.info(
"url: " + self.url + " has a duration of " + str(self.duration) + " min -- too long")
for i in range(attempts):
try:
info = ydl.extract_info(self.url, download=False)
- self.duration = info['duration'] / 60
+ print('info:', info)
+ self.duration = info['duration']
self.title = info['title']
succeed = True
return True