Skip to content

Commit

Permalink
merge feature: support for screensaver media
Browse files Browse the repository at this point in the history
add screensaver images to media/README
add search term `screensaver`
  make it default in config files
include media/screensaver/* in releases

    tweak config files

PC config file: use --quiet option to mpv
comment: video scaler script only for RasPi

docs:
  add changelog
  update install/ dir README
  README: add Discord link to help section
    update tested hardware & Recalbox versions
  manual install docs: add step to remove ZIP file
  improve configuration docs
  include all docs in releases

  init script: start program with python3 -m dynquee
  • Loading branch information
poppadum committed Mar 18, 2023
1 parent 012742f commit 15db163
Show file tree
Hide file tree
Showing 19 changed files with 128 additions and 11 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The logs should provide some clues as to what is wrong.

If you are having trouble getting *dynquee* to start on PC, also check the file `/tmp/dynquee_start.log`.

If you still can't get it working, post on the [Recalbox forum][recalbox-forum-commproj] and I will try to help.
If you still can't get it working, post on the [Recalbox forum][recalbox-forum-dynquee] or [message me on Discord][discord-poppadum] and I will try to help.
Please paste your config file and debug log file on [pastebin][pastebin] and provide a link when reporting issues.

---
Expand Down Expand Up @@ -165,6 +165,7 @@ This project is released under the [MIT Licence][licence].
[artwork-readme]: artwork/README.md
[config-guide]: doc/config.md
[dinky-definition]: https://dictionary.cambridge.org/dictionary/english/dinky
[discord-poppadum]: https://discord.com/users/1086033618532565032
[DV190FBM]: https://www.panelook.com/DV190FBM-NB0_BOE_19.1_LCM_overview_32860.html
[emulationstation]: https://wiki.recalbox.com/en/basic-usage/getting-started/emulationstation
[install-different-device]: doc/Running_on_separate_device.md
Expand All @@ -182,7 +183,7 @@ This project is released under the [MIT Licence][licence].
[pimarquee2]: https://github.com/losernator/PieMarquee2
[project-image]: dynquee.png
[recalbox]: https://www.recalbox.com
[recalbox-forum-commproj]: https://forum.recalbox.com/category/13/community-projects
[recalbox-forum-dynquee]: https://forum.recalbox.com/topic/29921/
[recalbox-mqtt]: https://wiki.recalbox.com/en/advanced-usage/scripts-on-emulationstation-events#mqtt
[recalbox-ssh]: https://wiki.recalbox.com/en/tutorials/system/access/root-access-terminal-cli
[retropie]: https://retropie.org.uk/
Expand Down
Binary file added artwork/screensaver/screensaver.01.xcf
Binary file not shown.
Binary file added artwork/screensaver/screensaver.02.xcf
Binary file not shown.
2 changes: 2 additions & 0 deletions build/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ clear_framebuffer.sh
play_video_scaled.sh
LICENSE.txt
README.md
changelog.md
media/generic/
media/publisher/*
media/startup/*
media/system/*
media/screensaver/*
media/default.png
media/README.md
logs/
Expand Down
5 changes: 3 additions & 2 deletions doc/Running_on_separate_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,17 @@ sudo apt install python3 python3-paho-mqtt fbi ffmpeg
cd /opt/dynquee
```

1. Download the latest *dynquee* release and unzip it:
1. Download the latest *dynquee* release, unzip it and tidy up:
```sh
sudo wget -O dynquee.zip https://github.com/poppadum/dynquee/releases/latest/download/dynquee.zip
sudo unzip dynquee.zip
sudo rm dynquee.zip
```


### Configure

1. Copy the config file for remote running:
1. Copy the config file for running on a separate machine:
```sh
sudo cp -f install/dynquee-remote.ini ./dynquee.ini
```
Expand Down
80 changes: 80 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Change Log

## v0.9.7
New feature: can now show media files while screensaver active (configurable)


### Changes
- PC config file uses `--quiet` option to `mpv` to reduce log noise

#### Documentation improvements
- add Changelog
- add Discord link to help section of README
- manual install instructions: add step to remove release ZIP file
- update `install/README.md` and `media/README.md`


## v0.9.6
Add support for Recalbox on PC

### PC Support
- README applies to RasPi & PC
- update install script to detect if we're installing on Raspberry Pi or PC
- add manual install guide for PC
- add script to assist user finding video outputs
- add PC-specific config file
- update 'after upgrade' instructions

### Changes
- include all docs in releases
- init script: start program with python3 -m dynquee
- make scaled video play script executable


## v0.9.5 pre-release
### Additions
- add support for running on a non-Recalbox machine
- add support for compound search rules
- add console images from recalbox-next theme
- add startup images
- add config file entry to control time between files in slideshow


### Fixes
- install script: add link to latest release
- interpolation in config files was broken

- event handling
- now stores ES state before sleep, restores on wakeup
- event after 'endgame' now always changes state
- was not seeing a state change when a game exited and
`gamelistbrowsing` change rule was `system/game`

- slideshow fixes:
- now clears marquee screen when a video exits
- was starting next slideshow before current slideshow had exited
- now moves to next file when video finishes
- uses `WaitableEvent` class by [Radek Lát](https://lat.sk)
- single image slideshow was calling viewer many times per second

### Changes
- make default marquee size 1280x360
- config file now defines one media change rule per action
- add bash helper script to play videos scaled to marquee size
- artwork:
- fix incorrect system name: `oric` -> `oricatmos`
- add BUILD file to release archive to identify installed version
- improve log output
- move install & init scripts to `install/`
- exits with non-zero return code on uncaught exception

#### Documentation improvements
- add local & remote install script URLs to README.md
- much more detailed comments in config file
- document how to restore init script after Recalbox upgrade
- add explanation of media scaling to configuration guide


## v0.9.4 pre-release

## v0.9.3 pre-release
4 changes: 4 additions & 0 deletions doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ A search rules consists of one or more of the following search terms:
* `genre`: media relating to genre of game e.g. shooters, platform games
* `system`: media relating to game system e.g. Sinclair Spectrum or SNES banner
* `generic`: generic media unrelated to a game, system or publisher
* `screensaver`: media to be shown when EmulationStation goes to sleep
and the screensaver is active
* `blank`: blank the display e.g. when EmulationStation goes to sleep

Search terms can be combined at the same precedence level with the `+` character
Expand Down Expand Up @@ -117,6 +119,8 @@ the file name must start with Emulation Station's internal system name (use the
If you have designed custom artwork for your Recalbox, place it here.
Filename does not matter, but use the appropriate file extension e.g. `generic/my_games_machine.mkv`

- `screensaver/` is for files to show when EmulationStation goes to sleep and activates the screensaver

Feel free to delete any of the included media files you don't want, but I recommend you leave `media/default.png` (or replace it with your own custom image) as a file of last resort.


Expand Down
3 changes: 2 additions & 1 deletion doc/manual_install_pc.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ If you're installing on a separate machine, see [the guide for running on a sepa
cd /recalbox/share/dynquee
```

1. Download the latest *dynquee* release and unzip it:
1. Download the latest *dynquee* release, unzip it and tidy up:
```sh
wget -O dynquee.zip https://github.com/poppadum/dynquee/releases/latest/download/dynquee.zip
unzip dynquee.zip
rm dynquee.zip
```

## Identify Video Outputs
Expand Down
3 changes: 2 additions & 1 deletion doc/manual_install_rpi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ If you're installing on a separate machine, see [the guide for running on a sepa
cd /recalbox/share/dynquee
```

1. Download the latest *dynquee* release and unzip it:
1. Download the latest *dynquee* release, unzip it and tidy up:
```sh
wget -O dynquee.zip https://github.com/poppadum/dynquee/releases/latest/download/dynquee.zip
unzip dynquee.zip
rm dynquee.zip
```


Expand Down
5 changes: 4 additions & 1 deletion dynquee.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ default_image = default.png
# * genre: media relating to genre of game e.g. shooters, platform games
# * system: media relating to game system e.g. Sinclair Spectrum or SNES banner
# * generic: generic media unrelated to a game, system or publisher
# * screensaver: media to be shown when the screensaver is active
# * blank: blank the display e.g. when EmulationStation goes to sleep
# (note: `blank` causes dynquee to stop processing a precedence rule)
#
Expand All @@ -91,7 +92,9 @@ default_image = default.png
rungame = rom publisher system genre scraped generic
gamelistbrowsing = system generic
systembrowsing = generic
sleep = blank
sleep = screensaver
# If you want to blank the marquee when the screensaver is active use:
#sleep = blank
# default precedence to use if action does not match one of those above
default = generic

Expand Down
1 change: 1 addition & 0 deletions dynquee.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ class MediaManager(object):
'genre': "genre/{genre}.*",
'system': "system/{systemId}.*",
'generic': "generic/*",
'screensaver': "screensaver/*",
'startup': "startup/*" # files to show on startup
}
"glob patterns to find media files for each search term"
Expand Down
9 changes: 8 additions & 1 deletion install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
Contains install scripts and helper files.

- `install.sh` installs *dynquee* on Recalbox
- `dynquee-pc.ini`: config file for Recalbox PC
- `S32dynquee`: init script for Recalbox RasPi
- `startup_pc.sh`: startup script for Recalbox PC

- `install-remote.sh` installs *dynquee* on a non-Recalbox machine
- `dynquee-remote.ini`: config file for non-Recalbox machines
- `S32dynquee`: init script for Recalbox
- `dynquee.service`: systemd unit file for non-Recalbox machines

- `find_marquee_output.sh`: helps user discover video outputs on Recalbox PC
- `after_recalbox_upgrade.sh`: run this after a Recalbox upgrade to restore dynquee
- `install_common.sh`: library functions for install/upgrade scripts
5 changes: 4 additions & 1 deletion install/dynquee-pc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ default_image = default.png
# * genre: media relating to genre of game e.g. shooters, platform games
# * system: media relating to game system e.g. Sinclair Spectrum or SNES banner
# * generic: generic media unrelated to a game, system or publisher
# * screensaver: media to be shown when the screensaver is active
# * blank: blank the display e.g. when EmulationStation goes to sleep
# (note: `blank` causes dynquee to stop processing a precedence rule)
#
Expand All @@ -91,7 +92,9 @@ default_image = default.png
rungame = rom publisher system genre scraped generic
gamelistbrowsing = system generic
systembrowsing = generic
sleep = blank
sleep = screensaver
# If you want to blank the marquee when the screensaver is active use:
#sleep = blank
# default precedence to use if action does not match one of those above
default = generic

Expand Down
5 changes: 4 additions & 1 deletion install/dynquee-remote.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ default_image = default.png
# * genre: media relating to genre of game e.g. shooters, platform games
# * system: media relating to game system e.g. Sinclair Spectrum or SNES banner
# * generic: generic media unrelated to a game, system or publisher
# * screensaver: media to be shown when the screensaver is active
# * blank: blank the display e.g. when EmulationStation goes to sleep
# (note: `blank` causes dynquee to stop processing a precedence rule)
#
Expand All @@ -91,7 +92,9 @@ default_image = default.png
rungame = rom publisher system genre scraped generic
gamelistbrowsing = system generic
systembrowsing = generic
sleep = blank
sleep = screensaver
# If you want to blank the marquee when the screensaver is active use:
#sleep = blank
# default precedence to use if action does not match one of those above
default = generic

Expand Down
2 changes: 2 additions & 0 deletions media/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- `startup/startup.0[12].png`: default startup images which reuse elements of Recalbox startup screen

- `screensaver/screensaver.0[12].png`: default images shown when screensaver is active

- `system/*.png`: system logos and banners. Includes
- system logos from [`recalbox-next`](https://gitlab.com/recalbox/recalbox-themes/-/tree/master/themes/recalbox-next) theme
- platform logos from [Dan Patrick's v2 Platform Logos](https://archive.org/details/console-logos-professionally-redrawn-plus-official-versions)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion tests/test_dynquee.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ default_image = default.png
# * genre: media relating to genre of game e.g. shooters, platform games
# * system: media relating to game system e.g. Sinclair Spectrum or SNES banner
# * generic: generic media unrelated to a game, system or publisher
# * screensaver: media to be shown when the screensaver is active
# * blank: blank the display e.g. when EmulationStation goes to sleep
# (note: `blank` causes dynquee to stop processing a precedence rule)
#
Expand All @@ -91,7 +92,9 @@ default_image = default.png
rungame = rom publisher system genre scraped generic
gamelistbrowsing = system generic
systembrowsing = generic
sleep = blank
sleep = screensaver
# If you want to blank the marquee when the screensaver is active use:
#sleep = blank
# default precedence to use if action does not match one of those above
default = generic

Expand Down
5 changes: 5 additions & 0 deletions tests/test_dynquee.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ def test_getStartupMedia(self):
startupMedia.sort()
self.assertEqual(startupMedia, ['./tests/media/startup/startup01.png', './tests/media/startup/welcome.mp4'])

def test_getScreensaverMedia(self):
self.assertEqual(
self.mm.getMedia({'Action': 'sleep'}),
['./tests/media/screensaver/screensaver.01.png', './tests/media/screensaver/screensaver.02.png']
)


class TestSlideshow(unittest.TestCase):
Expand Down

0 comments on commit 15db163

Please sign in to comment.