|
|
@@ -11,6 +11,7 @@ from parsers.episode import episodeParser
|
|
|
from parsers.lesezeichen import lesezeichenParser
|
|
|
from parsers.chapter import chapterParser
|
|
|
from parsers.player import playerParser
|
|
|
+from util.chromecast import ccast
|
|
|
|
|
|
|
|
|
baseurl = ''
|
|
|
@@ -147,13 +148,14 @@ def episode(sess,ep):
|
|
|
print('4 - go to next')
|
|
|
print('5 - go to previous')
|
|
|
print('6 - Details')
|
|
|
+ print('7 - Play on Chromecast')
|
|
|
print('99 - Exit')
|
|
|
path = 'anime/'+ep['name']+'/'
|
|
|
if not os.path.exists(path):
|
|
|
os.makedirs(path)
|
|
|
uin = input('$>: ')
|
|
|
if uin == '1':
|
|
|
- call(["vlc", link])
|
|
|
+ call(["vlc",'-f', link])
|
|
|
if uin == '2':
|
|
|
call(['curl',link,'-o',path+ep['num']+'.mp4'])
|
|
|
if uin == '3':
|
|
|
@@ -169,6 +171,15 @@ def episode(sess,ep):
|
|
|
prev['num'] = str(int(prev['num'])+1)
|
|
|
episode(sess,prev)
|
|
|
|
|
|
+ if uin == '7':
|
|
|
+ #TODO improve discovery and multiple favorites
|
|
|
+
|
|
|
+ cast = ccast(config['devices']['chromecast'])
|
|
|
+
|
|
|
+ if len(cast.getCasts()) <= 0:
|
|
|
+ print('no chromecast found')
|
|
|
+ cast.play(link,cast.getCasts()[0])
|
|
|
+
|
|
|
if uin == '99':
|
|
|
break
|
|
|
|