github.com/andrew00x/gomovies@v0.1.0/README.md (about)

     1  # gomovies
     2  Web interface for [omxplayer](https://github.com/popcornmix/omxplayer)
     3  
     4  ## Installation on local PC (Raspberry PI)
     5  It requires setup Golang environment, usage of (Remote installation](#Remote installation on Raspberry PI) is preferable
     6  * Install [omxplayer](https://github.com/popcornmix/omxplayer)
     7  * Clone this repository to Go workspace on Raspberry
     8  * Build
     9    ```
    10    pi@raspberrypi:~$ make
    11    ``` 
    12  * Configure
    13    * Create in directory *$HOME/.gomovies/* file *config.json* with following content (minimal required):
    14      ```
    15      {
    16      "dirs": [
    17          "/media/pi/disk1/movies/",
    18          "/media/pi/disk2/movies/"
    19          ...
    20      ]
    21      ```
    22    * Supported configuration options
    23      * Required
    24        * **dirs** - list of directories with video files
    25      * Optional
    26        * **web_port** - http port, default *8000*
    27        * **video_file_exts** - extensions of video files, default is ```[".avi", ".mkv"]```
    28        * **tmdb_api_key** - api key of [The Movie Data Base (TMDb)](https://www.themoviedb.org/documentation/api). It is used for getting details about movies.
    29        * **tmdb_poster_small** - size of small poster, default is ```w92```, see [TMDb Images](https://developers.themoviedb.org/3/getting-started/images)
    30        * **tmdb_poster_large** - size of large poster, default is ```w500```, see [TMDb Images](https://developers.themoviedb.org/3/getting-started/images)
    31        * **torrent_remote_ctrl_addr** - address for remote control of torrent client, rtorrent is supported for now      
    32  * Start 
    33    ```
    34    pi@raspberrypi:~$ ./gomovies
    35    ```
    36    Or in background
    37    ```
    38    pi@raspberrypi:~$ nohup ./gomovies &
    39    ```
    40  * Help 
    41    ```
    42    pi@raspberrypi:~$ make help
    43    ```
    44  
    45  ## Remote installation on Raspberry PI
    46  It requires [Ansible](https://www.ansible.com/)
    47  * Install Ansible, [how](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html?extIdCarryOver=true&sc_cid=701f2000001OH7YAAW)
    48  * Clone this repository
    49  * Update file *init/ansible/raspberry.ini* with hostname of remote Raspberry PI, [how](https://www.ansible.com/overview/how-ansible-works)
    50  * Build for Raspberry architecture. Golang installation is not needed, build will be done inside docker container
    51    ```
    52    andrew:~$ make build-rpi3
    53    ```
    54  * Update configuration template, updating of **"dirs"** is needed, but can be done after installation to Raspberry.
    55  * Install all components at once. Next will be installed: *omxplayer*, *gomovies*, *config.json*, *systemd service*. **NOTE**: Old configuration will be lost
    56    ```
    57    andrew:~$ make install-rpi3-all TMDB_API_KEY=<TMDb API access key>
    58    ```
    59    * Options:
    60      * TMDB_API_KEY (optional) - API key to access The Movie DB, e.g. `TMDB_API_KEY=a1b2c3d4e5f6i7`
    61      ```
    62      andrew:~$ make install-rpi3-all TMDB_API_KEY=a1b2c3d4e5f6i7
    63      ```
    64  * Also all component can be installed separately.
    65    ```
    66    andrew:~$ make install-rpi3-player     # install omxplayer
    67    andrew:~$ make install-rpi3-bin        # install gomovies binaries
    68    andrew:~$ make install-rpi3-config     # install gomovies config. Old configuration will be lost. Supported option TMDB_API_KEY
    69    andrew:~$ make install-rpi3-systemd    # install systemd service to manage gomovies app
    70    ```
    71  
    72  ## Control gomovies service
    73  * Start
    74   ```
    75   andrew:~$ make service-start
    76   ```
    77  * Restart
    78   ```
    79   andrew:~$ make service-restart
    80   ```
    81  * Stop
    82   ```
    83   andrew:~$ make service-stop
    84   ```
    85   
    86  ## Other
    87  Android Application [GoMoviesDroid](https://github.com/andrew00x/GoMoviesDroid)