Build movie library into flask web interface allows browsing and playing of movie.
[BLUE] . . nearly GREEN see ACTIONS -old README.md
Add user needs implementing.
Actor favourites needs implementing.
Turn and old tv (without a remote) and a 2.5 inch usb hard disc with DVD collection stored on it into a home cinema using a raspberry pi as a webserver, and an old tablet for a remote.
This developed into a system that allowed everyone to use their phone or tablet pick their favourite movies from the carousel. The combination of which would show up on the combined movie shortlist from which we would pick one.
I adapted it for seasonal holidays and other family gatherings!
- Status: Build as quickly / simply as possible . .
- Abstract
- Contents
- AIM:
- Quick start
- Clone onto a raspberry Pi
- Next steps
- Questions / Barriers
- How To's
A little python practice, scraping, flask, basic web.
Setting up on a local machine to experiment:
$ git clone https://github.com/UnacceptableBehaviour/movie_picker
$ cd into movie_picker repo
$ . venv/bin/activate
# run with option update - - - \ / - - specify directory where movies files are
$ ./moviepicker/moviepicker.py -u /Volumes/Osx4T/mov_2022
Once finished the DB filename displayed like so:
PICKLING before EXIT: /Volumes/Osx4T/mov_2022/__media_data2/medialib2.pickle
Copy path to bottom of file: ./movie_picker/db_paths.txt
EG
/Volumes/Osx4T/mov_2022/__media_data2/medialib2.pickle
A list of paths to search for DB file held in
./movie_picker/db_paths.txt
Lines starting with a # are ignored.
Movies found in the DB files will automatically be added to the carousels
This was a python/flask hello world project so it's still called hello (TODO rename).
Having built a DB
$ cd into moviepicker repo
$ . venv/bin/activate
$ ./hello.py
Navigate to URL indicated at boot (0.0.0.0):
- Running on http://127.0.0.1:52001
Plug the Pi into the TV (and network).
SSH into target device, clone the repo there.
Install VLC.
Point the db_paths.txt file at the relavant databases.
(the pathe must be visible from the Pi)
Run the flask server.
Use a tablet or phone to browse the carousel and select / play a movie.
Find UUID of device,
> sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL # list attached devices & mount point
UUID NAME FSTYPE SIZE MOUNTPOINT LABEL MODEL
sdb 465.8G MK5076GSX
564B-5772 └─sdb1 vfat 465.8G /media/pi/FAITHFUL500 FAITHFUL500
or
> sudo blkid # list bulk devices
/dev/sdb1: LABEL="FAITHFUL500" UUID="564B-5772" TYPE="vfat" PARTUUID="00095536-01"
> sudo mount /dev/sdb1 /home/pi/MMdia/ # source_device_mountpoint target_mount_point
# with this mount can view FAITHFUL500 remotely on osx
Next setup so mounts automatically on boot
> sudo nano /etc/fstab # edit file system table
# add following line
UUID=564B-5772 /home/pi/MMdia/ vfat defaults,auto,users,rw,nofail 0 0
^ID ^mount point ^FSTYPE
- There's still a few manul bits that need smoothing out.
- Implement ADD user button.
Comment out superfluous code, add TODOs to code make tidy up list.
Create JS lib for rest: Identify different devices - use JS fingerprint?
Add DEBUG - detected display size - debug mobile remote - look like in desktop mode?
Require user profile:
Allow toggling of favourite icon, seen it icon.
Point script at the right docs # DEFAULT_FILE (input)
# DEFAULT_README(output w TOC)
> create_TOC_for_md.py # run script
# paste output into .md file TOC
Available here: create_TOC_for_md.py
To create a link to a chapter in MD:
[Text to Display](#text-from-title)\
[Q's & How To's](#qs--how-tos)\
The text-from-title is the the text from the title downcased, with spaces replaced with a hyphen '-' and non alphanumeric characters removed. So "Q's & How To's" becomes '#qs--how-tos'
The '\' at the end of the line is same as
or CRLF. (New line)
To create a TOC, create a numbered list of links. Tab in next level with new numbers.
1. [Current status](#status)\
2. [Contents](#contents)\
3. [Next steps](#next-steps)\
4. [Completed](#completed)\
5. [Q's & How To's](#qs--how-tos)\
1. [Adding tabs to content links](#adding-tabs-to-content-links) \
2. [Auto generaging TOC](#auto-generaging-toc)\
6. [Tips on context doc](#tips)\
7. [References](#references)