Thank you for your donation!


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


Recently Added Music
#12
I love hacks which respect the Tao of Unix and create a pipeline of commands. Very nice.

For the Unix/Linux-challenged user, however, we should point out that this function is a basically a proof of concept. 

<the following are notes for the unwary, not criticism of the concept, which I think is cool.>

As written, it looks for new files only on locally mounted (USB) drives. More work is needed to make it also look for new files on a remote NAS or even on the SDCARD. 

Also, this function will point MPD to any file which meets the age criterion. If, say, such a file happens to be a PDF file (perhaps containing album-liner notes), MPD will spit out an "error adding <the PDF file>: No such directory" message and not add any tracks to the playlist (don't ask me how I know!). I expect it will choke the same way on other unexpected file types.

No doubt the work item on Tim's TODO list will include refinements to the proof of concept  Rolleyes

Finally, it may not be obvious to a new user that the .bash_profile file containing the function definition has to be created in the home directory or edited to include the definition if the file already exists. That "cat .bash_profile" command in the @ibeex's post is merely echoing the content of his existing file.

Regards,
Kent
Reply


Messages In This Thread
Recently Added Music - by christopherr - 08-28-2018, 05:49 PM
RE: Recently Added Music - by Tim Curtis - 08-28-2018, 09:56 PM
RE: Recently Added Music - by BigScaryTiger - 08-29-2018, 04:40 PM
RE: Recently Added Music - by nassost - 12-17-2018, 09:56 AM
RE: Recently Added Music - by Tim Curtis - 12-17-2018, 03:04 PM
RE: Recently Added Music - by christopherr - 12-29-2018, 01:47 AM
RE: Recently Added Music - by ibeex - 03-09-2019, 12:56 PM
RE: Recently Added Music - by nassost - 12-17-2018, 05:14 PM
RE: Recently Added Music - by Tim Curtis - 03-09-2019, 01:11 PM
RE: Recently Added Music - by ibeex - 03-29-2019, 09:55 AM
RE: Recently Added Music - by Tim Curtis - 03-29-2019, 12:21 PM
RE: Recently Added Music - by TheOldPresbyope - 03-29-2019, 02:28 PM
RE: Recently Added Music - by Tim Curtis - 12-15-2019, 01:02 AM

Forum Jump: