Today, I've been experimenting still on a watched folder implementation for the iTunes DSM. At my house, sharing the single music folder over the network, it can be a pain adding songs when one user has bought a new track and it doesn't show up on other's iTunes. The implementation so far seems to work, of course it's all command line based at the moment. Look forward to a usable gui implementation in the near future though.
I also seperated out some of the logic in the program. Searching for media files was once the task of the TracksTask class, but has since moved to it's own MediaFiles class. This has many obvious advantages, one thing that took a while to fully understand is that the MediaFiles class searches for files recursively as before, but the class creates an ArrayList of File arrays. So basically, there is one array with a bunch of arrays in it. The arrays inside the array list are essentially the "folders" that were found within the root music directory and those folders have the filtered files in them. Doing it this way allowed me to maintain the duplicate searching method the same as it operates on a "folder" of files as well.
Anyway, I registed for Google analytics the other day and I can see the traffic my blog is getting. It's kind of neat to watch the traffic increase and hopefully people are getting a use out of my program! Hope everyone has a good weekend.
Brian
Saturday, October 10, 2009
Wednesday, October 7, 2009
What's in the future?
I haven't had much time to work on iTunes DSM this week. I've had exams and projects due, but every now and then I'll open up iTunes DSM and work on it. I've been cleaning up code, and adding documentation. I've also been exploring what I want to add next. I've got a couple of ideas.
- It would be handy to check the folder for files that have not been added to the iTunes library yet, so maybe some kind of folder watching mechanism. The folder watching mechanism will require some addition code but I do not think it will be difficult to implement.
- The options a user is able to choose from is increasing exponentially every time I add components so a better way to handle all the multitudes of operations is going to be needed.
- The GUI looks lame.
- The default JFileChooser object used on Mac operating systems also looks lame.
Saturday, October 3, 2009
First release available for download
Figured out how to host my program through my school's servers today. Here's how to use iTunes DSM.
DISCLAIMER: It goes without saying, I am not responsible for any damages to your music library. In my informal testing the program appears to function correctly, but as always make a backup of your data before using iTunes Duplicate Song Manager.
- Be sure java is installed on your computer and you have JRE 1.6. Mac users you must set this property as it seems OSX uses 1.5 by default. Search in Finder for Java Preferences.
- Download and unzip the application from here http://students.uwf.edu/brg4/iTunes DSM .1.zip
- Run MusicApp.jar by double clicking it.
- Open your iTunes music directory.
- Click Find Duplicates
DISCLAIMER: It goes without saying, I am not responsible for any damages to your music library. In my informal testing the program appears to function correctly, but as always make a backup of your data before using iTunes Duplicate Song Manager.
Friday, October 2, 2009
iTunes DSM Video Uploaded
The demo video has been uploaded to YouTube. Here's the link...
http://www.youtube.com/watch?v=TQy-PXUEzjc
http://www.youtube.com/watch?v=TQy-PXUEzjc
Monday, September 28, 2009
Demo Video Recorded for YouTube
I recorded a video of the iTunes DSM in action. I'm planning on posting it to YouTube to show how to use the program. In my testing, the program seems to be solid and ready for use.
I did use iTunes DSM on my own personal library finally and am pleased with the result. It's also convenient in that you can use the program on the other computers in the house and fix the orphaned files in the iTunes databases!
When I post the YouTube video I'll post it on here as well. I am still trying to figure out if I can host the program here on blogspot. I haven't really seen a way to do it yet.
Brian
I did use iTunes DSM on my own personal library finally and am pleased with the result. It's also convenient in that you can use the program on the other computers in the house and fix the orphaned files in the iTunes databases!
When I post the YouTube video I'll post it on here as well. I am still trying to figure out if I can host the program here on blogspot. I haven't really seen a way to do it yet.
Brian
Sunday, September 27, 2009
iTunes functionality in place.....for Windows
Using the previously mentioned components that I added, iTunes Duplicate Song Manager, can now locate orphaned files (those that have exclamation marks next to the song in iTunes) and remove those tracks. You can see the option added just above the clean music folder button.The user can also just run the program and just clean the orphaned files, without having to scan for duplicates, so that's nice. The program also makes sure that the host operating system is Windows based, if not, the orphan file option is greyed out.
Finally, I've added a couple more links under the help menu.
I'm still wanting to add the orphaned files remove option to Mac but not really sure how to go about AppleScripts, so I'm sure that will be later. The program itself was having trouble running in Mac under java and I wasn't sure why at first. The SwingWorker package wasn't being found, turns out that Mac Leopard was using JRE 1.5 instead of the required 1.6, so if anyone else has problems using SwingWorker in OS X look for the Java Preferences application in Finder and edit the options in there.
In other news, my research paper is 4000 words, so that's nice too. Hope everyone had a good weekend.
Brian
Friday, September 25, 2009
iTunes functionality on the way
I know I haven't posted the project yet for download, and that's because I've been messing around with JACOB, Jacobgen, and the iTunes' COM. JACOB provides a way for the java virtual machine to interact with COM objects. This isn't really a java thing and so adding this functionality via JACBO brings java up to the likes of other development environments. You can find the JACOB project here...
http://sourceforge.net/projects/jacob-project/
it works for both windows 32 and 64 bit environments which is cool. Also on the sourceforge project page is jacobgen, which automatically creates .java files for the COM objects. So everything that the iTunes com offers, jacobgen will create java files with the corresponding methods to interact with it. Very Cool!!! I had some trouble getting it to work for a long time. There is an example batch file included in jacobgen that I had to edit.
Here is the batch file code I used to run jacobgen...
To use the batch file. Open a command prompt and change directories until you get to the jacobgen directory. Place the batch file in the root jacobgen directory. Copy and paste the last line minus the letters REM into the command line and press enter. Jacobgen will place the created java files in the destdir. The main difference between my batch file and the example one is I use the java command.
Of course in the end, I didn't use the generated code. There is no documentation created with it obviously, and all kinds of errors were thrown in Netbeans. Instead, I downloaded this package http://dot-totally.co.uk/software/itunescon/ and in conjunction with JACOB, I can now control iTunes. I already have my program identifying the audio file in the iTunes library that correspond to the duplicate files found when searching for files with iteration counts appended to the end, so in conjunction with deleting the actual files, I should now be able to remove them from the iTunes library.
My next idea is since I share music throughout my home network, deleting files from the folder from one computer's library will not be reflected in other iTunes libraries until a user tries to play a song that is removed and therefore orphaned. In essence I'm going to try to add an option that will locate orphaned files, even if they are not apparent to the user.
http://sourceforge.net/projects/jacob-project/
it works for both windows 32 and 64 bit environments which is cool. Also on the sourceforge project page is jacobgen, which automatically creates .java files for the COM objects. So everything that the iTunes com offers, jacobgen will create java files with the corresponding methods to interact with it. Very Cool!!! I had some trouble getting it to work for a long time. There is an example batch file included in jacobgen that I had to edit.
Here is the batch file code I used to run jacobgen...
@echo off
cls
REM run this from the root directory of the Jacobgen project
REM it will spit out the interface classes for a dll you pass in as a parameter
REM sample command line while sitting in the JACOBGEN project directory
REM
REM The following command built a sample in the jacob directory I have
REM installed near my jacobgen project directory.
REM $ docs/run_jacobgen.bat -destdir:"..\jacob\samples" -listfile:"jacobgenlog.txt" -package:com.jacobgen.microsoft.msword "C:\Program Files\Microsoft Office\OFFICE11\MSWORD.OLB"
REM
REM
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_16
set JRE=%JAVA_HOME%\bin
set JACOBGEN_HOME=.
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\dt.jar;%JACOBGEN_HOME%\jacobgen.jar;%JACOBGEN_HOME%\lib\viztool.jar
REM put the dll in the path where we can find it
set PATH=%PATH%;%JACOBGEN_HOME%\AMD64\
@echo on
echo %1
echo %2
echo %3
echo %4
echo %5
rem %JRE% -Xint com.jacob.jacobgen.Jacobgen %1 %2 %3 %4 %5
java -Xint com.jacob.jacobgen.Jacobgen %1 %2 %3 %4 %5
pause
REM run.bat -destdir:"c:\jacob\itunes" -listfile:"jacobgenlog.txt" -package:com.apple.itunes "C:\Program Files (x86)\itunes\itunes.exe"
To use the batch file. Open a command prompt and change directories until you get to the jacobgen directory. Place the batch file in the root jacobgen directory. Copy and paste the last line minus the letters REM into the command line and press enter. Jacobgen will place the created java files in the destdir. The main difference between my batch file and the example one is I use the java command.
Of course in the end, I didn't use the generated code. There is no documentation created with it obviously, and all kinds of errors were thrown in Netbeans. Instead, I downloaded this package http://dot-totally.co.uk/software/itunescon/ and in conjunction with JACOB, I can now control iTunes. I already have my program identifying the audio file in the iTunes library that correspond to the duplicate files found when searching for files with iteration counts appended to the end, so in conjunction with deleting the actual files, I should now be able to remove them from the iTunes library.
My next idea is since I share music throughout my home network, deleting files from the folder from one computer's library will not be reflected in other iTunes libraries until a user tries to play a song that is removed and therefore orphaned. In essence I'm going to try to add an option that will locate orphaned files, even if they are not apparent to the user.
Subscribe to:
Posts (Atom)
