Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: Thumbnail Image Quality
#11
(11-04-2018, 04:57 PM)Tim Curtis Wrote: That symptom suggests thmcache.php might have crashed. Look for start and end messages in /var/log/moode.log. Their presence or absence would indicate whether there was a crash or not.

You would see something like below

Code:
20181104 115559 worker: Job regenthmcache
20181104 115559 thmcache: Start
20181104 115609 thmcache: Done: 62 album dirs processed

Post the modifications you made to thmcache,php and I'll have a look.

I ended up not making any changes to thmcache.php.  All my thumbnails are timestamped Oct 1, or Nov3 which is weird because I cleaned this folder completely on Nov3.

Code:
$ ls -l /var/local/www/imagesw/thmcache
total 15388
-rw-r--r-- 1 root root  3671 Oct  1 15:44 002182755f8ddf88a00dd0ad00b67006.jpg
-rw-r--r-- 1 root root  4018 Oct  1 15:36 002182cad4f0e6b65b113f9cc7cb41f2.jpg
-rw-r--r-- 1 root root  3773 Oct  1 15:21 004584e1bf5a70f2f9e486e855042460.jpg
-rw-r--r-- 1 root root  4071 Oct  1 15:27 0047b97ea40f4a558420750069b0387c.jpg
-rw-r--r-- 1 root root  4669 Oct  1 15:47 0068a8b08c1f778801c8abb79f9f45f1.jpg
-rw-r--r-- 1 root root  3108 Oct  1 15:17 007324ab1c9dffc4b173f6a9a7a461df.jpg
-rw-r--r-- 1 root root  3272 Oct  1 15:44 0099390c6bd23ee29081d628716ce16f.jpg
-rw-r--r-- 1 root root  2751 Oct  1 15:23 00a41e20b8990c4188ec5d9ca671b40b.jpg

I have changes the password for user `pi`. Would that make a difference for being able to clean this folder?
Log file shows no errors:

Code:
$ tail -f /var/log/moode.log
20181104 092957 worker: Job regenthmcache
20181104 092957 thmcache: Start
20181104 100725 thmcache: Done: 3257 album dirs processed
20181104 102830 worker: Maintenance completed
20181104 112724 worker: Job regenthmcache
20181104 112725 thmcache: Start
20181104 113629 thmcache: Done: 3257 album dirs processed
20181104 114308 worker: Job updmpddb
20181104 150207 worker: Job regenthmcache
20181104 150207 thmcache: Start
Reply
#12
Very odd.

I'm not sure how after manually deleting all the files that new files created by the thumbnail generator could have a time stamp that is older then when the regen job was started ???

20181104 150207 worker: Job regenthmcache
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#13
Yes, it is very odd. I deleted and re-generated the thumbnails, and it looks ok, so I suppose we can leave well-enough alone.
I notice some strange behaviour when refreshing the Music Source Config page. If there are any tasks in progress, and I click the browser refresh button, it will restart any tasks in progress.
Reply
#14
Also I notice that http://moode.local/imagesw/bgimage.jpg returns with 404. Is there something special I have to do to get the background image?
Reply
#15
There are some inconsistencies in the folder ownership:
Code:
drwxr-xr-x 4 root staff    4096 Nov  5 07:46 imagesw

 but 
Code:
drwxr-xr-x 2 root root  172032 Nov  5 08:47 thmcache

Could it be related to the issue of not being able to remove the images?
Reply
#16
(11-05-2018, 04:14 PM)christopherr Wrote: Also I notice that http://moode.local/imagesw/bgimage.jpg returns with 404.  Is there something special I have to do to get the background image?


Have you created one yet (in the Customize menu)?
Reply
#17
(11-05-2018, 04:16 PM)christopherr Wrote: There are some inconsistencies in the folder ownership:
Code:
drwxr-xr-x 4 root staff    4096 Nov  5 07:46 imagesw

 but 
Code:
drwxr-xr-x 2 root root  172032 Nov  5 08:47 thmcache

Could it be related to the issue of not being able to remove the images?

After a quick google: 
Quote:staff: Allows users to add local modifications to the system (/usr/local) without needing root privileges (note that executables in /usr/local/bin are in the PATH variable of any user, and they may "override" the executables in /bin and /usr/bin with the same name). Compare with group "adm", which is more related to monitoring/security.



Is there a special reason we are using root : staff for folders in /var/local/ ?
Reply
#18
(11-05-2018, 04:25 PM)christopherr Wrote:
(11-05-2018, 04:16 PM)christopherr Wrote: There are some inconsistencies in the folder ownership:
Code:
drwxr-xr-x 4 root staff    4096 Nov  5 07:46 imagesw

 but 
Code:
drwxr-xr-x 2 root root  172032 Nov  5 08:47 thmcache

Could it be related to the issue of not being able to remove the images?

After a quick google: 
Quote:staff: Allows users to add local modifications to the system (/usr/local) without needing root privileges (note that executables in /usr/local/bin are in the PATH variable of any user, and they may "override" the executables in /bin and /usr/bin with the same name). Compare with group "adm", which is more related to monitoring/security.



Is there a special reason we are using root : staff for folders in /var/local/ ?

Why should user pi have special privileges in the system directories? Where it's necessary in the UI code, the sudo command is used to raise user pi's privileges temporarily.

Regards,
Kent
Reply
#19
(11-05-2018, 04:25 PM)christopherr Wrote:
(11-05-2018, 04:16 PM)christopherr Wrote: There are some inconsistencies in the folder ownership:
Code:
drwxr-xr-x 4 root staff    4096 Nov  5 07:46 imagesw

 but 
Code:
drwxr-xr-x 2 root root  172032 Nov  5 08:47 thmcache

Could it be related to the issue of not being able to remove the images?

After a quick google: 
Quote:staff: Allows users to add local modifications to the system (/usr/local) without needing root privileges (note that executables in /usr/local/bin are in the PATH variable of any user, and they may "override" the executables in /bin and /usr/bin with the same name). Compare with group "adm", which is more related to monitoring/security.



Is there a special reason we are using root : staff for folders in /var/local/ ?

Standard Debian/Raspbian ownership for /var/local is root | staff. 

Normally the thmcache directory will have root | staff ownership except if its deleted. In that case it will be created afresh by thmcache.php which runs as root, thus the newly created directory will have root | root ownership. There will also be a log message "thmcache: info: Missing thmcache dir, new one created"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#20
I always had to clear the thumb cache manually but wasn’t usually using the newest code.

A bigger dimension thumb at lower percent iq generally looked better to me than smaller one at higher iq BUT the larger you make the files the slower the covers fill in on the album covers view. The normal max (high quality and hidpi) is 400x400 which is pretty high resolution for thumbnails. If you’re not using a hidpi device (phone, tablet, newer laptops and some desktops) your device won’t be able to show that many pixels and it’s counterproductive. 

The 404 for the bgimage is normal, it’s less impactful to just set it in the css and let the browser complain than it is setting it with javascript if the user adds one. There can be a performance impact if you use one, especially if you use the newer background album cover.
Reply


Forum Jump: