User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sun Dec 15, 2019 8:47 pm

The radio station playlists are specific for each language.

Koepisch
Posts: 23
Joined: Fri Mar 18, 2016 10:41 pm

Re: Peppy player

Tue Dec 17, 2019 7:43 pm

Hi peppy.player,

where can i set the fontsize of the filebrowser tile text? I'm using a 2rowx4column setup and the text is really huge. Only 8 characters are visible at 7" screen.

EDIT: Currently i make the boot splash screens for my son. I have a few ones and want to switch them at every start. I think that would be a perfect task for the shutdown script (rename the files). I hope that i can do that by myself!

Regards.
Koepisch.

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Wed Dec 18, 2019 1:32 am

Hi Koepisch,

You can reduce the font size by changing the number for 'label_text_height' in file /home/pi/Peppy/ui/factory.py line #1106:
https://github.com/project-owner/Peppy/ ... y.py#L1106
It's percent and can be in range 0-100. I'll make it customizable in the next release.

Regarding different splash images, yes you can place that logic in the shutdown script. Just remember that it will be called only during "graceful" shutdown - when you click twice on the shutdown icon/button. There is no way to call it if you just switch off the power.
You can find the description of the scripts here:
https://github.com/project-owner/Peppy. ... wn-Scripts
The template scripts are located in the folder /home/pi/Peppy/scripts. You can modify shutdown.py and define it's filename (without path) in the config.txt in [scripts] section:
shutdown.script.name = shutdown.py

Best Regards

Koepisch
Posts: 23
Joined: Fri Mar 18, 2016 10:41 pm

Re: Peppy player

Wed Dec 18, 2019 6:58 am

Hi peppy,

thanks a lot for the fast support (everytime). I think i get all the things done till christmas. Really nice!

Peppy works also in a BerryBoot multi-OS setup. I had to create a new peppy image with the SquashFS filesystem first (done at RPI). It had a very usefull feature, that you can backup, reset, reload your peppy image with a mouse click only.

EDIT:
The images for BerryBoot are quite small. Perhaps you can use the BerryBoot System as the default loader (only with one option and zero boot delay)
2019-12-18 20_39_39-F__.png
2019-12-18 20_39_39-F__.png (7.38 KiB) Viewed 1233 times
Regards,
Koepisch
Last edited by Koepisch on Wed Dec 18, 2019 7:43 pm, edited 2 times in total.

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Wed Dec 18, 2019 7:25 pm

Hi Koepisch,

Good to know that you completed your new projects. You have one entry in the Gallery already:
https://github.com/project-owner/PeppyP ... ch-germany
If your new project(s) have different setup and you don't mind to share them I will be glad to place it in the Gallery as well.

Disk image creation process which I use right now is very time consuming. Here are the main steps:
- on fresh Raspbian OS install player and all player dependencies, configure player for headless mode, test. Use 8 GB SD flash.
- download image from 8 GB SD card to Windows machine
- insert into RPi 16 GB card with regular Raspbian OS and pishrink.sh script
- from Windows machine upload to RPi the disk image (8 GB)
- compress image using pishrink (8 GB -> 4 GB)
- download compressed image to Windows machine again
- zip the compressed image (4 GB -> 1.8GB)

All this is necessary to make disk image file less than 2GB. This is maximum single file size which you can store on github.
The same procedure should be repeated 6 times for 6 different disk images. It would be great to eliminate the time for disk image creation. If you know any way please let me know.
I tried to come up with some possible solutions here:
https://forum-raspberrypi.de/forum/thre ... post406694

Bets Regards

MrGibbage
Posts: 36
Joined: Wed Apr 03, 2013 2:57 pm

Re: Peppy player

Thu Dec 19, 2019 1:28 am

I'm trying to build a portable music player it will be a stand-alone system, playing music at my work desk through the headphone jack connected to some computer speakers. I have this 3.5 inch LCD display:
https://www.amazon.com/STARTO-Raspberry ... B07S695VQM
It's not clear in any of the pictures, but the screen only attaches to the GPIO pins.

For now I don't even have the screen attached, but I would like to know if this display will work or should I be looking for a different one.
It comes with some instructions:
git clone https://github.com/lcdwiki/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show
sudo ./MHS35-show

The last command runs a bunch of scripts to make changes to the display setting, I suppose. I tried it once and it worked, but for now I am starting over with a newly flashed card and I have not run any of those commands yet. For now, I'd like to know if we think this display will work or not.

In the meantime, I do have a problem. I am following the expert install steps and I am stuck here:

Code: Select all

libsdl1.2debian_1.2.15+veloci1-1_arm 100%[=====================================================================>] 158.47K   645KB/s    in 0.2s    

2019-12-18 20:04:46 (645 KB/s) - ‘libsdl1.2debian_1.2.15+veloci1-1_armhf.deb’ saved [162272/162272]

[email protected]:~ $ sudo dpkg -i libsdl1.2debian_1.2.15+veloci1-1_armhf.deb 
(Reading database ... 96761 files and directories currently installed.)
Preparing to unpack libsdl1.2debian_1.2.15+veloci1-1_armhf.deb ...
Unpacking libsdl1.2debian:armhf (1.2.15+veloci1-1) over (1.2.15+dfsg2-4+rpt2) ...
dpkg: dependency problems prevent configuration of libsdl1.2debian:armhf:
 libsdl1.2debian:armhf depends on libts0 (>= 1.0); however:
  Package libts0 is not installed.

dpkg: error processing package libsdl1.2debian:armhf (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.28-10+rpi1) ...
Errors were encountered while processing:
 libsdl1.2debian:armhf
[email protected]:~ $ 
I didn't see anyone here mentioning libts0, so I didn't know if I should try installing it or what.

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Thu Dec 19, 2019 5:39 am

Which OS do you use?
I believe you can ignore those error messages and run command:
sudo apt-get -f install
it should fix tall problems.
The thread about patch is here:
https://www.raspberrypi.org/forums/view ... 2&t=250001

Regarding the screen, it's hard to say. If it can work with a regular Raspbian Lite OS then more likely it will work with the player too. The easiest way to test it would be to install the headless disk image and then install and run those LCD-show scripts for that display. All disk images are here:
https://github.com/project-owner/PeppyP ... isk-Images

Please keep me informed.
Best Regards

MrGibbage
Posts: 36
Joined: Wed Apr 03, 2013 2:57 pm

Re: Peppy player

Thu Dec 19, 2019 10:09 pm

I was using the latest Raspian, downloaded yesterday.

I tried using the headless Peppy. I installed it, but did not have the display connected. I opened up the server web page and browsed around, but didn't change anything. I ssh'ed in and ran the commands for the screen and rebooted. I connected the screen and I could see the console start up commands but it eventually stopped. No graphical display or anything. I then tried going to the server config web page and that isn't running any more. I guess whatever the screen install did, it also disabled the web server. I ssh'ed in again and ran netstat and sure enough, no server running.

So now I have no (graphical Peppy) display and no web server running. I think maybe my screen isn't going to cut it.

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Fri Dec 20, 2019 12:24 am

It looks like the player didn't start properly. You can check if the python process is running using ssh session:
ps -elf | grep python
More likely it's not running. I would recommend to make the following changes:
- disable headless mode in file /home/pi/Peppy/config.txt:
headless = False
- enable file logging in the same file:
file.logging = True
That should make it working after rebooting. If not check what's the log file saying:
/home/pi/Peppy/peppy.log

Please let me know the result.

MrGibbage
Posts: 36
Joined: Wed Apr 03, 2013 2:57 pm

Re: Peppy player

Fri Dec 20, 2019 12:46 am

Thanks for the help, my friend! It means a lot to me :)

Changes made, rebooted, still nothing:

Code: Select all

[email protected]:~ $ netstat -tan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0    176 192.168.0.113:22        192.168.0.48:55893      ESTABLISHED
tcp6       0      0 :::22                   :::*                    LISTEN
[email protected]:~ $ ps -elf | grep python
0 S pi         812   643  0  80   0 -  1837 pipe_w 00:41 pts/0    00:00:00 grep --color=auto python
[email protected]:~ $ cd Peppy/
[email protected]:~/Peppy $ ls -la
total 456
drwxr-xr-x 17 pi pi   4096 Dec 20 00:42 .
drwxr-xr-x 11 pi pi   4096 Dec 19 21:35 ..
-rw-r--r--  1 pi pi   1440 Dec  5 18:46 cert
-rw-r--r--  1 pi pi   2262 Dec 20 00:39 config.txt
-rw-r--r--  1 pi pi    517 Dec  5 18:46 current.txt
drwxr-xr-x  3 pi pi   4096 Dec  5 18:55 event
drwxr-xr-x  2 pi pi   4096 Dec  5 18:46 font
drwxr-xr-x  8 pi pi   4096 Dec  5 18:46 .git
drwxr-xr-x  2 pi pi   4096 Dec  5 18:46 icons
-rw-r--r--  1 pi pi   1367 Dec  5 18:46 index.html
-rw-r--r--  1 pi pi   1675 Dec  5 18:46 key
drwxr-xr-x  8 pi pi   4096 Dec  5 18:46 languages
-rw-r--r--  1 pi pi  35141 Dec  5 18:46 LICENSE
-rw-r--r--  1 pi pi 122642 Dec  5 18:46 peppy.ico
-rw-r--r--  1 pi pi  79304 Dec  5 18:46 peppy.py  # no peppy.log
-rw-r--r--  1 pi pi  79304 Dec  5 18:46 peppy.pyw
drwxr-xr-x  4 pi pi   4096 Dec  5 18:55 player
-rw-r--r--  1 pi pi   1497 Dec  5 18:48 players.txt
drwxr-xr-x  2 pi pi   4096 Dec  5 18:46 podcasts
-rw-r--r--  1 pi pi   5659 Dec  5 18:46 README.md
-rw-r--r--  1 pi pi    100 Dec  5 18:46 release.txt
drwxr-xr-x 11 pi pi   4096 Dec  5 18:55 screensaver
drwxr-xr-x  2 pi pi   4096 Dec  5 18:46 scripts
-rw-r--r--  1 pi pi  19159 Dec  5 18:46 splash-800.png
-rw-r--r--  1 pi pi  11700 Dec  5 18:46 splash.png
-rw-r--r--  1 pi pi    368 Dec  5 18:46 storage
drwxr-xr-x  2 pi pi   4096 Dec  5 18:46 streams
drwxr-xr-x 11 pi pi   4096 Dec  5 18:55 ui
drwxr-xr-x  3 pi pi   4096 Dec  5 18:55 util
drwxr-xr-x  3 pi pi   4096 Dec  5 18:46 voiceassistant
drwxr-xr-x  5 pi pi   4096 Dec  5 18:55 web
drwxr-xr-x  5 pi pi   4096 Dec  5 18:55 websiteparser
[email protected]:~/Peppy $ head -30 config.txt
[screen.info]
width = 480
height = 320
depth = 32
frame.rate = 30
hdmi = False
no.frame = False
flip.touch.xy = False
multi.touch = False

[usage]
touchscreen = True
mouse = True
lirc = False
rotary.encoders = False
web = True
stream.server = False
browser.stream.player = False
voice.assistant = False
headless = False
vu.meter = False
album.art = True
auto.play = True
long.press.time.ms = 700
poweroff = True
check.for.updates = False

[logging]
file.logging = True
log.filename = /home/pi/Peppy/peppy.log
[email protected]:~/Peppy $
Not getting a peppy.log file though.
The touch screen is still showing just the console text from boot up.

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Fri Dec 20, 2019 1:26 am

Sometimes LCD-show creates new /etc/rc.local file. The player starts from that file. Please make sure that it doesn't have the line:
fbcp &
If it does comment it out or delete. Also make sure that the player startup line is there:
su pi -c 'cd /home/pi/Peppy; openvt -s -- python3 peppy.py'
Use 'sudo' to edit that file. For example:
sudo nano /etc/rc.local

MrGibbage
Posts: 36
Joined: Wed Apr 03, 2013 2:57 pm

Re: Peppy player

Fri Dec 20, 2019 2:50 am

We're getting somewhere!

I can see the screen on the display now, and the webserver works too.
The touchscreen works for disabling the screensaver, but I can't tap on the controls. I can click on the controls from the web browser on my computer and the touch screen responds accordingly.

I am copying some music over now to see if the music player works.

Here's the first few lines of my config.txt:

Code: Select all

[email protected]:~ $ head -n 30 Peppy/config.txt
[screen.info]
width = 480
height = 320
depth = 32
frame.rate = 30
hdmi = False
no.frame = False
flip.touch.xy = False
multi.touch = False

[usage]
touchscreen = True
mouse = True
lirc = False
rotary.encoders = False
web = True
stream.server = False
browser.stream.player = False
voice.assistant = False
headless = False
vu.meter = False
album.art = True
auto.play = True
long.press.time.ms = 700
poweroff = True
check.for.updates = False

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Fri Dec 20, 2019 3:59 am

That's really good progress. To make the touchscreen working complete the following steps:
Create the file
sudo nano /etc/udev/rules.d/95-ads7846.rules
with content:

SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="ADS7846 Touchscreen", SYMLINK+="input/touchscreen"

Then run:
sudo apt-get install libts-bin

Reboot:
sudo reboot

After completing these steps the input device 'touchscreen' should appear in the folder /dev/input. If this is the case you can calibrate the screen by running command:
sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate

You should probably disable the player for this procedure - comment it out in /etc/rc.local before rebooting.

MrGibbage
Posts: 36
Joined: Wed Apr 03, 2013 2:57 pm

Re: Peppy player

Fri Dec 20, 2019 10:31 am

Success!!!

Everything is working now. I may have some questions later about controls and using it, but for now, I am a happy customer!

Thanks :)

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Fri Dec 20, 2019 3:53 pm

Congratulations! You completed probably the most complicated procedure - LCD configuration.
Feel free to ask any other questions or suggest any improvements.

Best Regards

Koepisch
Posts: 23
Joined: Fri Mar 18, 2016 10:41 pm

Re: Peppy player

Sat Dec 21, 2019 9:23 pm

Hi peppy.player,

i have made my Splash-Screen Swap script and it runs in Windows and in at the RPI Shell without problems. But if i setup the "shutdown.py" then the player doesn't shut down anymore. It seems that is also the case with the default shutdown script. Please can you check that soon?

It should work - i need the function badly. Thanks!

EDIT: I've also tried """ read current file from config """ that instead of # *** read current file from config ***
EDIT: After the END Button is double tapped the GUI is non responsive
EDIT: have tried same code in startup.py - same result
EDIT: have used ConfigParser instead of configparser - same result
EDIT: have user "/home/pi..." path - same result

Code: Select all

# Copyright 2019 PeppyMeter [email protected]
# 
# This file is part of PeppyMeter.
# 
# PeppyMeter is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# PeppyMeter is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with PeppyMeter. If not, see <http://www.gnu.org/licenses/>.

import sys
import logging
import os.path
from os import path
import ConfigParser
import random
import glob
import shutil 

from threading import Thread

class Shutdown(object):
    """ Example of the synchronous shutdown script """
        
    def __init__(self):
        """ Initializer """
        
        self.type = "sync"
        logging.debug("Shutdown script initializer called")
            
    def start(self):
        """ Shutdown logic goes here """        
        logging.debug("Running synchronous shutdown script")
        
        # *** read current file from config ***
        config = ConfigParser.RawConfigParser()
        config.read('../current.txt')
        currentSplash= config.get('my.splash', 'current')
        
        # *** enum files ***
        txtfiles = []
        for file in glob.glob("../mySplash/*.png"):
            txtfiles.append(file)
        picCount = len(txtfiles)   
        
        # *** get next random file ***
        random.seed()
        while 1:
            newIDX = random.randint(1000, picCount * 1000) // 1000
            if currentSplash != txtfiles[newIDX]:
                break
        
        # *** save next file to config ***
        config.set('my.splash', 'current', txtfiles[newIDX])
        with open('../current.txt', 'w') as configfile:
            config.write(configfile)
        
        # *** copy file to standard splas 
        dest = shutil.copyfile(txtfiles[newIDX], "../splash-800.png")

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sat Dec 21, 2019 11:03 pm

Hi,

I would recommend to create a separate config file for splash - splash.txt. I've slightly modified your script. It should work assuming that splash.txt and mySplash folder are inside of /home/pi/Peppy:

Code: Select all

# Copyright 2019 PeppyMeter [email protected]
# 
# This file is part of PeppyMeter.
# 
# PeppyMeter is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# PeppyMeter is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with PeppyMeter. If not, see <http://www.gnu.org/licenses/>.

import sys
import logging
import os.path
import random
import glob
import shutil 

from os import path
from configparser import ConfigParser
from threading import Thread

class Shutdown(object):
    """ Example of the synchronous shutdown script """
        
    def __init__(self):
        """ Initializer """
        
        self.type = "sync"
        logging.debug("Shutdown script initializer called")
            
    def start(self):
        """ Shutdown logic goes here """        
        logging.debug("Running synchronous shutdown script")
        
        # *** read current file from config ***
        config = ConfigParser()
        config.read("splash.txt")
        currentSplash= config.get('my.splash', 'current')
        
        # *** enum files ***
        txtfiles = []
        for file in glob.glob("mySplash/*.png"):
            if file == currentSplash:
                continue
            txtfiles.append(file)

        currentSplash = random.choice(txtfiles)
        
        # *** save next file to config ***
        config.set('my.splash', 'current', currentSplash)
        with open('splash.txt', 'w') as configfile:
            config.write(configfile)
        
        # *** copy file to standard splas 
        shutil.copyfile(currentSplash, "splash-800.png")

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sat Dec 21, 2019 11:04 pm

Assuming that you have many images there is no need to save the filename in the config file. You can just pick the random file from the list:

Code: Select all

# Copyright 2019 PeppyMeter [email protected]
# 
# This file is part of PeppyMeter.
# 
# PeppyMeter is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# PeppyMeter is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with PeppyMeter. If not, see <http://www.gnu.org/licenses/>.

import sys
import logging
import os.path
import random
import glob
import shutil 

from os import path
from configparser import ConfigParser
from threading import Thread

class Shutdown(object):
    """ Example of the synchronous shutdown script """
        
    def __init__(self):
        """ Initializer """
        
        self.type = "sync"
        logging.debug("Shutdown script initializer called")
            
    def start(self):
        """ Shutdown logic goes here """        
        logging.debug("Running synchronous shutdown script")
        
        txtfiles = []
        for file in glob.glob("mySplash/*.png"):
            txtfiles.append(file)

        currentSplash = random.choice(txtfiles)
               
        # *** copy file to standard splas 
        shutil.copyfile(currentSplash, "splash-800.png")

Koepisch
Posts: 23
Joined: Fri Mar 18, 2016 10:41 pm

Re: Peppy player

Sun Dec 22, 2019 9:21 am

Hi peppy.player,

after using the right relative path it worked like it should. Thanks. I wasn't aware in which path the "scripts" are running (runnin in "/home/pi/Peppy" context).

I need all of the stuff in my script because the normal random function wasn't that reliable. Second reason is that i want to avoid (in all kinds) showing the same splash screen twice consecutively.

While browsing the audio files there is a huge lack in responsiveness at some folder. I think that this was introduced with the new feature to extract embedded images from the files directly. Can i switch this functionality off? I only use the "folder.jpeg".

Many thanks - hardware was completed yesterday and now i'm at the "Feinschliff" as we say in german.

Regards,
Koepisch

MrGibbage
Posts: 36
Joined: Wed Apr 03, 2013 2:57 pm

Re: Peppy player

Sun Dec 22, 2019 3:17 pm

Starting to have an issue here. The UI freezes and I can't play anything. Steps to reproduce:

Reboot (sudo reboot or pull the plug--it doesn't matter)
Upon reboot the web UI works, ssh works, and all of the controls on the pi lcd work. No music is playing.
But, if I tap on Audio Files from the homescreen, and then the giant CD in the middle, after that the entire device is frozen, however the ssh still works and the web ui still works (but all of the controls on the web ui are also frozen. Refreshing the screen in the web UI just shows the splash screen.
htop in ssh shows nothing unusual. peppy.py is still running.

The bottom line is I can't load any files. It looks like the file browser is what is frozen.

I have tried VLC and mplayer and that doesn't change anything, but I didn't expect it to.
peppy.log doesn't show anything either. I have it set up to show mouse events and after it freezes, nothing new is logged.

Skip

Koepisch
Posts: 23
Joined: Fri Mar 18, 2016 10:41 pm

Re: Peppy player

Sun Dec 22, 2019 4:32 pm

MrGibbage wrote:
Sun Dec 22, 2019 3:17 pm
Starting to have an issue here. The UI freezes and I can't play anything. Steps to reproduce:

...
peppy.log doesn't show anything either. I have it set up to show mouse events and after it freezes, nothing new is logged.

Skip
Hi,

there are 2 reason which i was noticed. If you have large "Folder.png" (or similar) the loading is delayed due to the loading of these images. Second issue is my latest. I think that the new loading of the embedded images from the music files can play an role too.

Try to reduce your music folder to 5-10 items only and try again. If it works then it's most probably an issue with the count and/or size of the folder- or embedded images. I have resized and optimized ALL folder images to get the most speed out (PNG sizing and web level optimizing).

Regards,
Koepisch

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sun Dec 22, 2019 4:48 pm

Koepisch wrote:
Sun Dec 22, 2019 9:21 am
Hi peppy.player,

after using the right relative path it worked like it should. Thanks. I wasn't aware in which path the "scripts" are running (runnin in "/home/pi/Peppy" context).

I need all of the stuff in my script because the normal random function wasn't that reliable. Second reason is that i want to avoid (in all kinds) showing the same splash screen twice consecutively.

While browsing the audio files there is a huge lack in responsiveness at some folder. I think that this was introduced with the new feature to extract embedded images from the files directly. Can i switch this functionality off? I only use the "folder.jpeg".

Many thanks - hardware was completed yesterday and now i'm at the "Feinschliff" as we say in german.

Regards,
Koepisch
Hi Koepisch,

Good to know that you fixed the script issue.

Unfortunately there is no way to switch off image extracting logic through the config parameter. I'll add that in the next release. Right now you can just disable the whole function which does that. So replace the function which starts at line #296 in file /home/pi/Peppy/util/util.py:
https://github.com/project-owner/Peppy/ ... il.py#L296

by this one:

Code: Select all

def get_image_from_audio_file(self, filename, return_buffer=False):
        """ Fetch image from audio file. Only MP3 and FLAC supported

        :param filename: file name
        :param return_buffer: True - return image buffer, False - return Pygame image
        :return: image or None if not found
        """
        return None
        # if not filename: return None

        # name = filename.lower()

        # if name.endswith(EXT_MP3):
        #     return self.get_image_from_mp3(filename, return_buffer)
        # elif name.endswith(EXT_FLAC):
        #     return self.get_image_from_flac(filename, return_buffer)
        # else:
        #     return None
Best Regards
Last edited by peppy.player on Sun Dec 22, 2019 5:14 pm, edited 1 time in total.

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sun Dec 22, 2019 4:58 pm

MrGibbage wrote:
Sun Dec 22, 2019 3:17 pm
Starting to have an issue here. The UI freezes and I can't play anything. Steps to reproduce:

Reboot (sudo reboot or pull the plug--it doesn't matter)
Upon reboot the web UI works, ssh works, and all of the controls on the pi lcd work. No music is playing.
But, if I tap on Audio Files from the homescreen, and then the giant CD in the middle, after that the entire device is frozen, however the ssh still works and the web ui still works (but all of the controls on the web ui are also frozen. Refreshing the screen in the web UI just shows the splash screen.
htop in ssh shows nothing unusual. peppy.py is still running.

The bottom line is I can't load any files. It looks like the file browser is what is frozen.

I have tried VLC and mplayer and that doesn't change anything, but I didn't expect it to.
peppy.log doesn't show anything either. I have it set up to show mouse events and after it freezes, nothing new is logged.

Skip
Hi MrGibbage,

There is no need to enable mouse events. I added that mostly for UI debugging purposes. So, disable it.

By default when you tap on CD image the player is reading files from folder /home/pi/music. Please make sure that the folder exists.
It's assumed that you place your files in that folder or mount your disk to that folder. Where did you place the audio files?

Please let me know if that helps.
Best Regards

Koepisch
Posts: 23
Joined: Fri Mar 18, 2016 10:41 pm

Re: Peppy player

Sun Dec 22, 2019 5:34 pm

peppy.player wrote:
Sun Dec 22, 2019 4:48 pm
Koepisch wrote:
Sun Dec 22, 2019 9:21 am
Hi peppy.player,

after using the right relative path it worked like it should. Thanks. I wasn't aware in which path the "scripts" are running (runnin in "/home/pi/Peppy" context).
...

Regards,
Koepisch
Hi Koepisch,
...

Unfortunately there is no way to switch off image extracting logic through the config parameter. I'll add that in the next release. Right now you can just disable the whole function which does that. So replace the function which starts at line #296 in file /home/pi/Peppy/util/util.py:
https://github.com/project-owner/Peppy/ ... il.py#L296

by this one:
...

Hi peppy.player,

i've parsed the source files and looked at the code. The feature is really great, but for me it works not the easy way. At all CDs there will be an embedded picture from the CD Cover at EVERY album song. It's all the same - so we have a lot of overhead at folder browsing. Currently i've managed it this way. I rip my CDs only as FLAC and i will have a dedicated album picture (folder.jpg). I've disabled the image loading at FLAC files. Then there are bought MP3 which are most "singles" so it's a really nice feature to extract the album art from files. So i kept the image loading for MP3 files.
If you can/want go the complicated way (but more open to future uses) you can introduce a folder config file, which can control the apperance (Image loading, show only image, show only title and so on). Because there are Folder with complete CDs, with Singles only or only radio plays - with slightly different requirements. One example: Without an song image i see the big "note" and at the bottom the beginning of the audio track title. In that case it would be better, if there wasn't the "Note" but a multi-line title text. Fileendings like (mp3,flac) should also be removed.

I've a new feature request for the next year. "Favourite Songs" Introduce a virtual folder at the "Audio files" which shows the favourite songs. Like at the radio list, you can mark a song as favorite with a long touch on it (currently does't know if these action is already in use for other purposes). I think that will be a nice feature everyone will use willingly.

Thanks a lot,
Koepisch

User avatar
peppy.player
Posts: 246
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sun Dec 22, 2019 6:09 pm

Hi Koepisch,

Thank you for very good requirements! I'll take them into account for the next release.

BTW, long press on a folder in the Audio Files mode starts recursive playback of all files in that folder and sub-folders.

Best Regards

Return to “Media centres”