From d9dba801cf748af99b1c29003887022288a9e233 Mon Sep 17 00:00:00 2001 From: Paul M Date: Mon, 2 Nov 2020 12:14:55 -0600 Subject: [PATCH 1/6] Update README.md Initial Readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index d755a02..b36eeb1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # rpimc Raspberry PI Medial Center + +Designed to be used with a google chromecast. Componets seperated into branches. + +# Frontend +A react native android application, acts as a remote control + +# Backend +A Python based web service and controller chromecasts From a71876c7176ec6b50fa0763653a712eea8d67502 Mon Sep 17 00:00:00 2001 From: Paul M Date: Mon, 2 Nov 2020 12:20:06 -0600 Subject: [PATCH 2/6] Add files via upload initial backend upload --- csrv.py | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 csrv.py diff --git a/csrv.py b/csrv.py new file mode 100644 index 0000000..035cbfd --- /dev/null +++ b/csrv.py @@ -0,0 +1,68 @@ +from twisted.web.static import File +from klein import run, route +from klein import Klein +import pychromecast +import time +import os +import json + + +app = Klein() + +chromecasts = pychromecast.get_chromecasts() +[cc.device.friendly_name for cc in chromecasts] +cast = next(cc for cc in chromecasts if cc.device.friendly_name == "living room") +cast.wait() +print(cast.status) # Has display name and status text +mc = cast.media_controller + +@route('/movies/', branch=True) +def static(request): + return File("./movies") + +@route('/devices/') +def dlist(request): + + return mc + +@route('/play/') +def crun(request,fn): + mc.play_media('http://192.168.1.158:8080/movies/' + fn, 'video/mp4') + mc.block_until_active() + mc.pause() + time.sleep(2) + mc.play() + return 'Play' + +@route('/pause/') +def cpause(request): + mc.pause() + return 'Pause' + +@route('/resume/') +def cres(request): + mc.play() + return 'Resuming' + +@route('/stop/') +def cstop(request): + mc.stop() + return 'STOP!!!' + +@route('/list/') +def clist(request): + path = './movies' + files = os.listdir\ + (path) + e = [] + d = {'data' : e } + for x in range(len(files)): + #e.append("movie") + e.append(files[x]) + return json.dumps(d) + +@route('/') +def home(request): + return 'Welcome to the RPI Python based Chromecast Media Service! Please use the HTTP API!' + +run("192.168.1.158", 8080) From 984b62d5b0a7c44e690ad2c691161a4011c47361 Mon Sep 17 00:00:00 2001 From: Paul M Date: Mon, 2 Nov 2020 12:24:59 -0600 Subject: [PATCH 3/6] Update csrv.py Added a few comments on whats required to run this script --- csrv.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/csrv.py b/csrv.py index 035cbfd..aa37fcf 100644 --- a/csrv.py +++ b/csrv.py @@ -1,3 +1,4 @@ +# Required Klein and Pychromecast modules from twisted.web.static import File from klein import run, route from klein import Klein @@ -11,7 +12,7 @@ app = Klein() chromecasts = pychromecast.get_chromecasts() [cc.device.friendly_name for cc in chromecasts] -cast = next(cc for cc in chromecasts if cc.device.friendly_name == "living room") +cast = next(cc for cc in chromecasts if cc.device.friendly_name == "living room") # You may need to change to your chromecast name for now cast.wait() print(cast.status) # Has display name and status text mc = cast.media_controller @@ -27,7 +28,7 @@ def dlist(request): @route('/play/') def crun(request,fn): - mc.play_media('http://192.168.1.158:8080/movies/' + fn, 'video/mp4') + mc.play_media('http://192.168.1.158:8080/movies/' + fn, 'video/mp4') # Update this IP to match yours mc.block_until_active() mc.pause() time.sleep(2) @@ -65,4 +66,4 @@ def clist(request): def home(request): return 'Welcome to the RPI Python based Chromecast Media Service! Please use the HTTP API!' -run("192.168.1.158", 8080) +run("192.168.1.158", 8080) # Obviously you need to change that IP to your local one From c105995d6d65acfe31b686b69179b19a0f7de0c5 Mon Sep 17 00:00:00 2001 From: Paul M Date: Mon, 2 Nov 2020 16:48:07 -0600 Subject: [PATCH 4/6] Update README.md Readme clarification --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b36eeb1..1205afd 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,17 @@ # rpimc Raspberry PI Medial Center -Designed to be used with a google chromecast. Componets seperated into branches. +Designed to be used with a google chromecasts. Componets seperated into branches. -# Frontend -A react native android application, acts as a remote control +# Frontend Branch +A react native android application, acts as a remote control. This is built using +Expo. -# Backend +# Backend Branch A Python based web service and controller chromecasts + +# Notes +Example for cloning the frontend +git clone -b frontend https://github.com/kake26/rpimc.git + +Some values still hardcoded as its a work in progress. 1.0 Release will be soon. From c6c5868cc20f30af72d169b2ec0ec56445dfee11 Mon Sep 17 00:00:00 2001 From: kake26 Date: Tue, 11 Jan 2022 04:23:38 +0100 Subject: [PATCH 5/6] Update 'README.md' Update to readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1205afd..0d429a1 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ Raspberry PI Medial Center Designed to be used with a google chromecasts. Componets seperated into branches. +# Current Status as of 1/10/22 + +Allot of recent work on the Frontend. A large part due to having to update the code to a newer version of expo. Backend is ok for the most part a few items to do. See issues for a break down. + # Frontend Branch A react native android application, acts as a remote control. This is built using Expo. From b9e24c4ca62a4df72dfc0647e2e5126431ed0e1f Mon Sep 17 00:00:00 2001 From: kake26 Date: Fri, 18 Nov 2022 22:53:54 +0000 Subject: [PATCH 6/6] Update 'LICENSE' Fixing license values --- LICENSE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index f288702..1e4f560 100644 --- a/LICENSE +++ b/LICENSE @@ -631,8 +631,9 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - Copyright (C) + Raspberry Pi Media center + + Copyright (C) 2020 Paul Malcher This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by