Closed pacija closed 7 years ago
The query for songs number had an erroneous grouping. Fixed in PR #309
Thanx @gs11, application of your patch resulted in correct Songs number.
Albums still show one album too many, when compared with exporting 'album' column from mysql to text and counting unique lines only (cat albums.txt | uniq | wc -l).
Not too much of a problem, but still, if you had an idea on how to solve it I'd be thankful.
OT: I see you are most active with development. I wanted to switch to your fork, but it doesn't work for me. Would you like to have PRs reported for your fork?
What doesn't work for you? I switched to @gs11's branch and it works pretty fine here.
@pacija The developer(s) informed me that they're taking a temporary pause so please submit PRs to this repository.
Regarding the number of albums, what SQL query did you use?
BTW @gs11, I can't create an issue on your fork, is it intentional?
@MightyCreak Issues were turned off by default but activated them now.
@MightyCreak I'll submit issue in @gs11's fork. With FreeBSD's mysql57-server-5.7.18's default my.cnf, click on /albums throws:
2017-05-23 16:10:47 Error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'underbottom_sonerezh.Song.cover' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Request URL: /albums
Stack Trace:
#0 /usr/local/www/sonerezh-development-new/lib/Cake/Model/Datasource/DboSource.php(470): PDOStatement->execute(Array)
#1 /usr/local/www/sonerezh-development-new/lib/Cake/Model/Datasource/DboSource.php(436): DboSource->_execute('SELECT MIN(`Son...', Array)
#2 /usr/local/www/sonerezh-development-new/lib/Cake/Model/Datasource/DboSource.php(673): DboSource->execute('SELECT MIN(`Son...', Array, Array)
#3 /usr/local/www/sonerezh-development-new/lib/Cake/Model/Datasource/DboSource.php(1184): DboSource->fetchAll('SELECT MIN(`Son...', Array)
#4 /usr/local/www/sonerezh-development-new/lib/Cake/Model/Model.php(3038): DboSource->read(Object(Song), Array)
#5 /usr/local/www/sonerezh-development-new/lib/Cake/Model/Model.php(3010): Model->_readDataSource('all', Array)
#6 /usr/local/www/sonerezh-development-new/app/Controller/SongsController.php(314): Model->find('all', Array)
#7 [internal function]: SongsController->albums()
#8 /usr/local/www/sonerezh-development-new/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(SongsController), Array)
#9 /usr/local/www/sonerezh-development-new/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
#10 /usr/local/www/sonerezh-development-new/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(SongsController), Object(CakeRequest))
#11 /usr/local/www/sonerezh-development-new/app/webroot/index.php(107): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#12 {main}
Please close the issue @pacija if it works fine for you now.
Closing. Album count is also OK, I found out I had two albums with the same name, which sonerezh correctly counted as two different albums, while my methods of checking didn't (SELECT DISTINCT album FROM songs
).
Thank you for making sonerezh better!
Hi,
it appears that statistics on settings page shows incorrect values.
My music collection currently has 7683 files, as shown by find:
Clementine-player shows the same value. Sonerezh import page shows the same value before import. Number of rows in songs table after import is also 7683.
However, statistics page shows 7662 songs.
Any idea what causes this?