From 896de47a84dfd8a3ef3bc1427eb9e7804907236b Mon Sep 17 00:00:00 2001 From: palaviv Date: Sat, 29 Oct 2016 16:30:22 +0300 Subject: [PATCH] Add title --- caster.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/caster.py b/caster.py index 7338cc6..42d0590 100755 --- a/caster.py +++ b/caster.py @@ -5,6 +5,7 @@ from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import threading import socket +import os from six import b import pychromecast @@ -95,7 +96,7 @@ def main(): mc = dev.media_controller media_url = "http://{IP}:{PORT}/{URI}".format(IP=server_ip, PORT=server.server_port, URI=file_path) - mc.play_media(media_url, 'video/mp4') + mc.play_media(media_url, 'video/mp4', title=os.path.basename(file_path)) handle_input(server_thread, dev, mc)