Closed Louis-coding-UGNG closed 5 years ago
(1) The package should contain an empty /cpm folder to avoid any error messages due to missing song folder (IMHO)
Done with commit 6f0300fc45ff63e97bb99c5b00bfceac6a02fcd8
(2) on first login the songbook page appears empty despite available songs in /cpm - wouldn't it be good to reindex automatically (at least if no cache file is present), perhaps even on every login?
Yes, reindexing if NO cache file is present seems a good idea.
The only problem is if it's a first install and there are tons of songs, it can hangs the login process.
We can't reindex on each login neither due to performance. It's a pretty taxing process (uses the filesystem, not a DB) if you have a lot of songs; and login is potentially done very often. On some hosting services they even uses caching too and it can cause problems with the cache file (corrupt/de-sync it).
(3) is there anything foreseen to update the cache files regularly? Just thinking about a "no login" songbook where new songs are added directly via FTP - how woould such songs appear on the songbook page?
This will be fixed with #16
In the end, UkeGeeks-NG will have two modes :
For songs added directly via FTP we can add a reindex button if an admin is logged.
The button will call the reindex page (which already exists).
For songs added directly via FTP we can add a reindex button if an admin is logged. The button will call the reindex page (which already exists).
This could be a solution approach for (2) as well: if no cache file is present UGNG could show a "reindex" message with link, something like "your songbbok looks empty. In case you already have songs added to your song directory you might want to update the index by clicking here." Perhaps even show this message only when (a) cache file is missing and (b) some song files (as defined in config.php) are present in song directory
The original code already launch a 'behind the scene' reindexing if there are songs and there are no song cache file. This behavior and the added reindex button should be enough for now. Closing the issue.
(1) The package should contain an empty /cpm folder to avoid any error messages due to missing song folder (IMHO)
(2) on first login the songbook page appears empty despite available songs in /cpm - wouldn't it be good to reindex automatically (at least if no cache file is present), perhaps even on every login?
(3) is there anything foreseen to update the cache files regularly? Just thinking about a "no login" songbook where new songs are added directly via FTP - how would such songs appear on the songbook page?