![]() |
Song ratings - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: Song ratings (/showthread.php?tid=2674) |
RE: Song ratings - okneloper - 06-19-2020 Awesome, thanks! No problem creating a pull request, I am more puzzled with the development process. For instance, I clone the repo, make a change to a PHP file, how do I run the code now? is there a VM or something that I can run the code in? So far I've bee using `vi` to inspect the files on the PI via SSH. If I edit the files on the PI, once I am done, I'd need to copy all the files and merge them into the repo, then - to test the end result I would build the image (that's a separate question), flash it, insert into the pi, set up and test. Is this the process or can this be simplified? P.S. I've tried linking the `www` folder to `/mnt/SDCARD`, for more convenient editing. The `www` folder appears on the SMB share, but I get a `Permission denied` error when trying to access that from my windows PC. FTP would work as a last alternative. P.P.S Also means I need another RPI, so that I'm not deprived of the music in the process. RE: Song ratings - Tim Curtis - 06-19-2020 I have a couple scripts that run on the Pi. One script mounts a share from my Mac that contains the cloned repo source tree. The other script batch copies files from the source tree into the corresponding dirs on the Pi for a full build. If I just need to copy a few files I do that manually. I use Atom editor on my Mac to edit the files. It works in tandem with GitHub Desktop app. SQL updates are not scripted. I manually make the modifications after using SQLiteSutdio to make the mods to the master database file for example here are the commands run on the Pi to create a new cfg_radio table with additional columns. The DDL and .csv export comes from SQLiteStudio. Code: sudo sqlite3 /var/local/www/db/moode-sqlite3.db "DROP TABLE cfg_radio" When all is looking good on the Pi I use GitHub Desktop on my Mac to push the commits to the development repo. There is also a new build process developed by @bitlab thats based on GULP and incorporates a lot more automation. I haven't had the time to test it yet... https://github.com/moode-player/moode/issues/129 Ultimately we want to get to a canned build process that any developer can install and start using with minimal learning curve. -Tim RE: Song ratings - TheOldPresbyope - 06-19-2020 @okneloper I'm having trouble understanding where this is going and how it would be used. Can you point me to some other music app which behaves the way you envision? Regards, Kent RE: Song ratings - okneloper - 06-19-2020 Sorry, how do you mean that? I don't use other mpd based music apps nor do I look in their source code. Tried Volumio but it isn't as stable and feature-rich as moOde. Just about any desktop app will show song ratings on a 5-star scale and let you edit it. RE: Song ratings - TheOldPresbyope - 06-19-2020 Since I don't see how an interactive rating system such as you describe would be a useful feature for me in dealing with my music collection, I don't have anything to add to the discussion beyond the comments I already made about how track-based metadata is used. If and when something is implemented the moOde codebase I'll test it just as I try to test every other feature to help Tim ensure his code does what it's represented to do. Good luck. Regards, Kent RE: Song ratings - CallMeMike - 06-20-2020 I've 'built' my music collection and musical preferences over many years and going through a lot of stages (reel-to-reel tapes, cassette tapes, vinyl LPs, CDs, digital files) and I believe that i've managed to keep the ever updated collection tuned to my preferences. Of course I may prefer some titles over others and some music genres over others according to my mindset and time of the day (Black Sabbath and Metallica do not work well late in the night or early in the morning for me) but I believe that my current collection is always bringing joy to my ears and my mind and I certainly do not have Eurika moments like "This album is rubbish/half rubbish... why on Earth I've kept it for so long...?". I also believe that in the case of a music collection amassed to suit the musical tastes of more than one family member suitable 'containers' can be easily created for avoiding confusion and family disputes. Am I missing something...? What will be the benefit of ONE STAR-graded songs/albums (i.e. 100% rubbish) in somebody's collection and choosing voluntarily to waste shelf space or HDD storage with those 'titles'...? RE: Song ratings - DRONE7 - 06-20-2020 Quote:(Black Sabbath and Metallica do not work well late in the night or early in the morning for me) So... they're Lunch-time music then !! A Latte, sourdough, marinated olive or two, and War Pigs !! at 10+...?? ![]() RE: Song ratings - okneloper - 06-20-2020 @CallMeMike not many reasons to keep the "100% rubbish" tracks, but still at least one would be when you want to keep the full album (often true for classics). For instance, I've got a Metallica - Metallica album with one 5-star song and 11 one-star ones ))) Otherwise, I only keep 3+ tracks. But there's still a big difference between a 3-star track and a 5-star one. RE: Song ratings - okneloper - 02-26-2021 Still keen to implement this. Looking at the PHP code, it doesn't seem to using composer. Is there any specific reason it can not be used, or can be added, no problem? Haven't found any libraries that do what I require, namely read ratings, probbaly becuase there's no de jure standard for these, so I thought creating one on packagist would make sense... Alternatively, can I use some sort of a Linux tool if I find one? RE: Song ratings - cprogrammer - 09-23-2021 It will not be difficult to support ratings. I use this in my setup and mpd supports this by enabling this in mpd.conf. The moment you put the sticker_file entry in mpd.conf, a sqlite table is created with the schema as below. You are free to use this sticker database for anything and not just rating. Code: $ grep sticker /etc/mpd.conf Now to implement rating one can use the mpc sticker command. Let us say i have a song with a URI 'Lobo 1971-2006 (flac)/1973 - Calumet - Rhino/15 - How Can I Tell Her (Early Version).flac' The first command below will set the rating to 5. The second command will get the rating Code: $ mpc sticker 'Lobo 1971-2006 (flac)/1973 - Calumet - Rhino/15 - How Can I Tell Her (Early Version).flac' set rating 5 Now let us say I want to implement play counts and let us decide we will name this field as PlayCount. So this is what I will do Code: $ mpc sticker 'Lobo 1971-2006 (flac)/1973 - Calumet - Rhino/15 - How Can I Tell Her (Early Version).flac' set PlayCount 1 The database is so flexible that you don't even require to pre-populate it. I have written a C program (called mpdev_update) using sqlite api to pre-populate this sqlite database and it takes less than 5 seconds to update around 60,000 songs first time. I'm also using a concept called 'karma'. All songs start with a karma of 50. When I don't like a song and I skip the song and don't listen to more than 85% of the song, I decrease the karma of a song. When I play the same song multiple times, I increase the karma of a song. Over a period of time I have build a database of all my songs with play counts, last played, rating and karma and I use a simple shell which uses sqlite3 command to query this database an auto-generate various playlists just like itunes 'smart playlists'. I would very much love to have this feature in moode. That will allow me to use moode from my smart phone to be able to rate songs. At the moment I am forced to use a laptop with cantata to be able to rate songs. Though Cantata is an excellent mpd player, it is no longer being maintained. Currently I use rompr on the smart phone to rate songs. But rompr doesn't use the sticker db. It uses it's own MySQL db. So what I do is have a daemon which updates rating from the MySQL db back to the sticker db (only records that change). I also use a daemon that I wrote which connects to mpd on 6600 and uses the IDLE command and it updates an sqlite database for last played, playcount, etc and also scrobbles tracks to last.fm and libre.fm - MPD Event Watcher EDIT: I forgot to add a feature of sticker db. A good thing about sticker is that mpd removes entries from the sticker db when you delete a song. |