LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Music Libraries (https://www.linuxquestions.org/questions/linux-general-1/music-libraries-863663/)

mastahyeti 02-18-2011 10:42 PM

Music Libraries
 
I have a dilemma and have found a few solutions, but was wondering what you guys thought would be best.

I have a seed box (for legally torrented music) that is also running ampache with media player daemon (MPD) for my home stereo. I would like to keep my music library on this server synced with my music library on my laptop. My problem is that I am often adding music to my library on either my laptop or my server. I am currently using two lftp scripts for mirroring (one for push and one for pull). I have two problems with the setup:

1. I would like to write a script that cron can run that updates both libraries with whichever files are most recent. lftp can mirror and only move newer files, but this only works in one direction. I could run both my push and my pull scripts with cron (without directives for deleting files that exist on the target, but not the source), but I feel that this would be fairly unstable. If I were to move or change a file on either machine, when I run the script I would end up with duplicate files. Can anyone think of a better solution for this?

2. I would like to write a script to be run when a torrent is finished that would check to see if the files were music, maybe by checking the tracker the the torrent came from (most of my music comes from one tracker), and if they are music, move them into the appropriate subdirectory of my music folder (/home/user/music/$artist/$album [$year]/). I don't particularly feel like wasting my time learning a python id3 tagging library, so, does any one have thoughts on a good way to do this? Maybe a tool for importing music?

Thanks for any thoughts on these issues.

Snark1994 02-19-2011 01:01 PM

I'll need more time to think about the rest, but for point 2 you wouldn't need to learn an id3 tagging library (though even if you did mutagen is a complete doddle to use) - couldn't you just check the extension? Or even use the "file" command?

everest40 02-19-2011 03:45 PM

I use unison for syncing my music library between computers. It can detect when files are moved, renamed, changed, or deleted, so I think it would be a good solution for #1. It's very resilient to failure, and can be run either from the command line or using its GTK+ interface.


All times are GMT -5. The time now is 04:46 PM.