Try to skip source selection for trailers

This commit is contained in:
angelblue05 2018-01-28 21:55:59 -06:00
parent b0a2ab1aae
commit ec2c3622f3
1 changed files with 6 additions and 1 deletions

View File

@ -87,12 +87,17 @@ class PlayUtils():
selected_source = media_sources[0]
if self.info.get('MediaSourceId'):
if 'MediaSourceId' in self.info:
for source in media_sources:
if source['Id'] == self.info['MediaSourceId']:
selected_source = source
break
elif (self.item['MediaType'] != 'Video' or self.item['Type'] == 'TvChannel' or
self.item.get('SourceType') != 'Library'):
# Do nothing
log.info("Special case, skip media sources selection.")
elif len(media_sources) > 1:
# Offer choices
sources = []