tag:blogger.com,1999:blog-19957789716623405212024-03-13T09:21:09.119-05:00iTunes Duplicate Song Manager with Folder Watch - Remove duplicate songs from iTunes easilyiTunes Duplicate Song Manager with Folder Watch removes iTunes duplicates in Windows and Mac OS X. iTunesDSM can also watch a folder and automatically add new files to iTunes safely.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.comBlogger120125tag:blogger.com,1999:blog-1995778971662340521.post-85670418763699708242010-06-19T07:36:00.000-05:002010-06-19T07:36:36.503-05:00Scanning stuck in unknown artist unknown album?I get emails every now and then about iTunesDSM getting stuck in the unknown artist or unknown album. It seems to be that Java sometimes has an issue with hidden files or folders on the Operating System and iTunes seems to carry over some of those files or folders into the unknown artist/unknown album folder. Here are somethings you can try:<br />
<br />
1. Temporarily remove the unknown artist or unknown album from the music directory and run the scan on the music directory. Then replace the folder.<br />
<br />
2. Scan each folder inside the unknown artist or unknown album individually, searching for the offending folder.<br />
<br />
Hopefully this helps - there is currently no way to fix this issue. It might be once Java 1.7 is released there may be a better way to handle this though.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com9tag:blogger.com,1999:blog-1995778971662340521.post-21187588846636157572010-03-21T14:21:00.002-05:002010-03-21T14:23:51.875-05:00Version 0.9.6 releasedThe main change is that now a backup zip file is created in the iTunesDSM folder inside your user directory folder when new tracks are added to iTunes. This is useful for when iTunes fails to copy music back to the music folder. If all is well with your iTunes music then you should be able to delete the zip folder, but it's there just in case.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com9tag:blogger.com,1999:blog-1995778971662340521.post-40334050158089325392010-03-21T12:33:00.000-05:002010-03-21T12:33:14.206-05:00DisclaimerThough it goes without saying, I am not responsible for any lost or damaged files, software, or hardware incurred by iTunesDSM with Folder Watch. It is always a good idea to make a regular backup of your data.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com1tag:blogger.com,1999:blog-1995778971662340521.post-81465340721781690112010-02-15T08:18:00.000-06:002010-02-15T08:18:46.566-06:00New job and iTunes Music directoryI've started my new job and I'm looking at moving here soon, so the time for iTunesDSM will be cut much much less. However, I've identified a problem with the iTunes music directory on a network drive not being found when iTunesDSM is set to start on boot and background monitoring running. I'm working on a fix for it now.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-82560812487365466592010-02-04T14:40:00.000-06:002010-02-04T14:40:09.710-06:00Version 0.9.5 released - monitor multiple directoriesVersion 0.9.5 is available for download. The biggest feature here is that everything you could do before on only one directory you can now do any number of directories! This is especially handy for background monitoring! You should see a dialog window if you check for updates automatically. Check the release notes for features.<br />
<br />
Enjoy!<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com2tag:blogger.com,1999:blog-1995778971662340521.post-84806697558810387882010-02-03T18:49:00.000-06:002010-02-03T18:49:43.699-06:00Version 0.9.5 nearing release!After testing 0.9.5 for the past few days, I believe it's about ready. Here's a quick run down of the new features slated...<br />
1. Monitor, scan, remove, and add, or remove duplicate tracks from multiple directories.<br />
2. New Options interface to facilitate multiple directories.<br />
3. Fixed an issue that displays new tracks added to iTunes in the GUI when adding song manually.<br />
<br />
I start my new job on February the 8th, so time is going to be short for iTunesDSM development. I plan to keep working on it though. Look for the update in the next day or two.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com3tag:blogger.com,1999:blog-1995778971662340521.post-16142303047035670652010-02-02T07:50:00.001-06:002010-02-02T09:16:52.358-06:00iTunes 9.0.3 - UPDATEDYou'll be seeing a request to update iTunes here soon as it just came out this morning. I'm running through my automated tests and such to make sure iTunesDSM still works with iTunes 9.0.3. I'll update the blog later when I know more.<br />
<br />
<br />
Brian<br />
<br />
UPDATE - It appears everything is OK with iTunesDSM and iTunes 9.03. If you come across something that doesn't seem to work let me know through the support forum, email or as a comment.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com4tag:blogger.com,1999:blog-1995778971662340521.post-6287438998835284462010-01-31T09:51:00.000-06:002010-01-31T09:51:17.539-06:00Strange occurrences in the "O Nine Five"Lame title probably, but whatever. I was running across a bug that if background monitoring was running and I changed an option, then background monitoring would stop but every action occurred twice. So stopping twice, JOptionPane twice, and then re-enabling of the option I just turned off or vice versa. Well, after much deliberation it was the JOption Pane warning of background monitoring being turned off because of a change in the Options object. Basically, it was just the ordering of the code. Well, rather than mess with it forever, iTunesDSM now warns of a change in the options and background monitoring in the System Tray.<br />
<br />
Crisis averted.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-29548064566543231252010-01-29T21:44:00.000-06:002010-01-29T21:44:36.204-06:00Today's UpdateA little more technical but the Options class used to output to an xml file that was generated by the Properties class in the java.util package but the rest of the class was the same as it always was. Well not anymore!! haha, the Options class has been fully converted to a Properties object (it extends Properties). It cleans up the code and makes more sense. Also, the Options class now makes sure the options file is compatible with the current release of iTunesDSM. This is accomplipshed by checking a Version key in the Options/Properties object. If the version key is there and it's the same version as the release of iTunesDSM then the file is good. If the key is not present or it does not equal the release then the test fails and a new Options object is created. Still a few other kinks to work out before 0.9.5 is released, but multiple directories is still on target. Hope everyone has a good friday night.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-60618799496208089122010-01-28T19:02:00.001-06:002010-01-28T19:02:50.702-06:00167 Downloads!!Amazing!! 167 downloads in one day!<br />
<br />
Other news...I'm testing the next version now which allows for monitoring multiple directories. Look for a release soon.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-55748446873483042262010-01-27T22:12:00.002-06:002010-01-27T22:12:35.599-06:0091 downloads!You can see by the title...a new record today 91 downloads in one day!!!! Keep it up!<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-67417033680687459222010-01-27T15:52:00.000-06:002010-01-27T15:52:30.406-06:00Monitoring multiple directoriesYou read right! For the past couple of days, I've been implementing my last idea. I've had it in my mind to be able to add tracks from an unlimited number of directories. This makes sense for so many reasons, that's it's not worth mentioning them, but it will improve the usefulness of iTunesDSM greatly. Of course allowing multiple directories does institute a greater risk of creating duplicates, good thing iTunesDSM can take care of that too. It should be pretty rare, especially if iTunes copies tracks and keeps the folder organized. Another added benefit is removing duplicates from multiple folders in one fell swoop. <br />
<br />
To add the multiple folders I've had to do quite a bit of modifying, but the screenshot below should do some justice.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCSDm7tjDRYw-mpHPEysDnOoJZoBjQlg_aWUPL7bOr7CE4HxPA0vXddNkqGyiNsF_sEiZAGktaqIELyQdBE91_Clop-5P7fRHFDr4eXqgMHxaxbZfpRHCYBluBD8TJvBejzEAqex3h9uU/s1600-h/Options+Panel.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCSDm7tjDRYw-mpHPEysDnOoJZoBjQlg_aWUPL7bOr7CE4HxPA0vXddNkqGyiNsF_sEiZAGktaqIELyQdBE91_Clop-5P7fRHFDr4eXqgMHxaxbZfpRHCYBluBD8TJvBejzEAqex3h9uU/s320/Options+Panel.png" /></a><br />
</div><br />
<br />
I've arbitrarily given this version the number 0.9.5, but who knows it may change. Hopefully this has whetted your appetite! Toodles<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-33181399795940962922010-01-26T14:44:00.000-06:002010-01-26T14:44:23.628-06:00Version 0.9.1 released!Version highlights...<br />
-View added tracks in an iTunes playlist - Windows only<br />
-Icon resolutions fixed<br />
-See when the next background scan will occur by hovering over the tray icon<br />
<br />
Check the changelog for more detailed release notes.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-22703073674381521482010-01-25T17:19:00.000-06:002010-01-25T17:19:45.666-06:00What would you like to see in iTunesDSM?I'm approaching the end of my ideas I have for iTunesDSM and I would like to know what features you would like to see. If you feel inclined, add a comment below this blog post with your feature ideas and maybe I can implement them. Thank you!<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com4tag:blogger.com,1999:blog-1995778971662340521.post-4759245964662084162010-01-24T21:26:00.000-06:002010-01-24T21:26:17.787-06:00Fixed fuzzy (low resolution) icons!So I finally figured out how to get better resolution icons in Java. You just need the setIconImages method and a List object of all the icons. So make some higher resolution square png files and add them to an array list that you then set the JFrame icons too. Neat! Heres a screenshot...<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFHsoZ6hkGMbEnfwDnm8fXbbCnm5BhF78qoSsK2cgOseyi8effvC4uDrDfAKjNtoly2Cg7RaVhW9RvnAdy76OXSIF2yQG8Bw_ZwF_r-Suoqr9tCmrIuAMxt9xhuF34NkpnshaKmOLIll8/s1600-h/Tray+Icon.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFHsoZ6hkGMbEnfwDnm8fXbbCnm5BhF78qoSsK2cgOseyi8effvC4uDrDfAKjNtoly2Cg7RaVhW9RvnAdy76OXSIF2yQG8Bw_ZwF_r-Suoqr9tCmrIuAMxt9xhuF34NkpnshaKmOLIll8/s320/Tray+Icon.png" /></a><br />
</div><br />
Also I added a line to the tooltip that tells when the next background scan is schedule to run, roughly. Remember it uses the sleep method in threads, so it's a pretty close, but yet still rough estimate. View the screenie with pleasure...<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAmCIrqDJqC0p764esPWKJZsIk45kOiNEbJWdGsOhsa_OCYCtY7zsvIsHDEdrhzwCP1LGxsz5IgxFQGYaWt273HWI3Vq13sdGgDKoAqxHiasWLXex48HSsoXMhWP515BbgFxZsEteuO4U/s1600-h/System+Tray+Next+Run.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAmCIrqDJqC0p764esPWKJZsIk45kOiNEbJWdGsOhsa_OCYCtY7zsvIsHDEdrhzwCP1LGxsz5IgxFQGYaWt273HWI3Vq13sdGgDKoAqxHiasWLXex48HSsoXMhWP515BbgFxZsEteuO4U/s320/System+Tray+Next+Run.png" /></a><br />
</div><br />
Hope everyone had a good weekend.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-45254118237581720292010-01-24T14:00:00.000-06:002010-01-24T14:00:43.243-06:00Some cleanup and JUnit testing todaySome quick notes, every now and then I go back and create JUnit test cases for classes. I don't do it often because I change the code so frequently that it's not really worth it at the time. But I've added a couple of test cases for the AddTracksTask class. Specifically testing the method that finds new files. That's not to say I don't test the code myself, I just make it automated after a while.<br />
<br />
Also, I've removed the FolderWatcher, AllFiles, and related classes. They simply weren't needed anymore, and while they did work, it's just not effecient to use those methods here.<br />
<br />
Of note, yesterday I noticed 77 downloads on sourceforge. That's a new record for daily downloads woohoo!<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com2tag:blogger.com,1999:blog-1995778971662340521.post-51278896412211309552010-01-22T15:23:00.000-06:002010-01-22T15:23:35.814-06:00iTunes Playlist back in<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-nK54tDziskmXgu38NCZQCDafqJJCe7OAA_yJ9D2JTtDnTaMRdx3-xdxNG6mYZFVbmLo34YVmS4FRU-bcqSgMez8UgDqXZlCx9fRXZnWunJdfU1wPxnSUnCTwtPLxmTKSwXc8Y1QluiU/s1600-h/iTunes+Added+Tracks+Playlist.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-nK54tDziskmXgu38NCZQCDafqJJCe7OAA_yJ9D2JTtDnTaMRdx3-xdxNG6mYZFVbmLo34YVmS4FRU-bcqSgMez8UgDqXZlCx9fRXZnWunJdfU1wPxnSUnCTwtPLxmTKSwXc8Y1QluiU/s320/iTunes+Added+Tracks+Playlist.png" /></a><br />
</div><br />
It's something that seems to come and go, but iTunesDSM will now add new tracks to a playlist in iTunes again. You can see in the screenshot an automatically generated playlist.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com3tag:blogger.com,1999:blog-1995778971662340521.post-8233332716339933602010-01-20T22:27:00.004-06:002010-01-20T22:28:04.561-06:00Javadoc now onlineYou could always download it, but it's convenient to go to it online as well. The link is on the right or you can<a href="http://itunesdsm.sourceforge.net/javadoc/"> click here.</a>Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-44109060988176700632010-01-20T14:26:00.000-06:002010-01-20T14:26:21.132-06:00Version 0.9.0 released!Check the change log for new features. You can download the new version from the usual links on the right.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-87633152989023209482010-01-19T18:07:00.000-06:002010-01-19T18:07:05.253-06:00Few updates todayA couple quick things. The ProgressMonitorDialog box class that I was using to display progress updates had an issue when it was the first active gui element. I've switched from ProgressMonitorDialog instance to just updating the main gui. It's probably best described by the screenshot. This version is in its final stages of testing, so without speaking to soon, expect a release soon.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTqHrJICpXVLTARJYvm80-gBxqVWBPxJmKyNaihekmwbJOW84ap2x-O8f-PzSsJiOQX8C3vuacTnimLLiIYn9utlfaKmA6tz1y94P0ArjgTqtYVonaCPXWKbVmYhKyJlZuPiQ50OCdaVs/s1600-h/Options+Panel.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTqHrJICpXVLTARJYvm80-gBxqVWBPxJmKyNaihekmwbJOW84ap2x-O8f-PzSsJiOQX8C3vuacTnimLLiIYn9utlfaKmA6tz1y94P0ArjgTqtYVonaCPXWKbVmYhKyJlZuPiQ50OCdaVs/s320/Options+Panel.png" /></a><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: justify;">Don't forget this version makes numerous improvements to background monitoring. It will be a much recommended update.<br />
</div><div class="separator" style="clear: both; text-align: justify;"> <br />
</div><div class="separator" style="clear: both; text-align: justify;">Brian<br />
</div>Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-44578474058901027082010-01-17T14:32:00.000-06:002010-01-17T14:32:36.139-06:00Still moving alongSome of the new features if you're keeping up...<br />
<ol><li>iTunes does not have to be running to check for new tracks.</li>
<li>iTunes will close smoothly (user script warning does not pop up)</li>
<li>Cleaner progress notifications</li>
<li>More options in the system tray menu.</li>
<li>Major bug fixes</li>
<li>Better memory usage</li>
</ol>It's still in testing as I keep making modifications, but it is nearing release, version 0.9.0 that is.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-35946822953641399052010-01-14T17:20:00.000-06:002010-01-14T17:20:15.535-06:00Now that all the code upgrades are completeI've done some more major code modifications. For one the status panel at the bottom is gone. I'm favoring regular old progress monitor objects. <br />
<br />
Also, and this is a biggey!! iTunes no longer complains about closing when user scripts are active. In other words, if iTunes is open and you try to shut down your computer or just close iTunes itself, the warning box won't come up anymore talking about user scripts when you've used iTunesDSM.<br />
<br />
I'm stopping all major code modifications and just working on bugs I find so that I can release the next version in a couple of days.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-2151356945600547892010-01-14T17:17:00.000-06:002010-01-14T17:17:41.307-06:00Once and for all memory issuesI tell you there is nothing more frustrating than seeing the memory usage go up and up until you decide that the code cannot be simpler and the references fewer. After testing every component, I have come to the conclusion that the garbage collector is less judicious than I OCD but that the garbage collector does remove unused items. You can see when you limit the vm to a certain amount of memory. So, moral of the story...trust the vm and the garbage collection.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-54946894277908825972010-01-13T21:52:00.000-06:002010-01-13T21:52:46.118-06:00Finally figured out how to cast IITFileOrCDTrack in Java with JacobI'm moving away from the iTunesController package as everytime it's used the Com object stays active and iTunes complains when you want to close it. Also it seems to be a source of memory leaks. Speaking of which all are fixed now. Anyway, it was difficult to get rid of the iTunesController package because it allowed me to cast to an ITFileOrCDTrack which was needed to get rid of orphaned files. But now...I've got it working with more pure Jacob code.<br />
<br />
Its inspired by the Limewire program source. The code is open source and written in Java and therefore much of the iTunes code is now based on that code. Here's the code I'm using to remove orphaned tracks. First you need the iTunes Jar file from limewire. You can download the source and it's included in the folder: limewire/lib/jars/windows<br />
<br />
Then use this code..<br />
<br />
<code><br />
ActiveXComponent iTunesCom = new ActiveXComponent(ItunesMediator.ITUNES_ACTIVEX_NAME);<br />
Dispatch iTunesController = iTunesCom.getObject();<br />
IiTunes it = new IiTunes(iTunesController);<br />
IITLibraryPlaylist pl = it.getLibraryPlaylist();<br />
IITTrackCollection coll = pl.getTracks();<br />
ArrayList<iitfileorcdtrack> orphanedFiles = new ArrayList<iitfileorcdtrack>();<br />
int count = coll.getCount();<br />
for(int i=1; i<=count; i++){ if(mon.isCanceled()){ break; } IITTrack track = coll.getItem(i); if(track.getKind() == ITTrackKind.ITTrackKindFile){ IITFileOrCDTrack file = new IITFileOrCDTrack(track); if(file != null && file.getLocation().equals("")){ orphanedFiles.add(file); } } mon.setProgress( (int)(((double)i / (double)count) * 50) ); } </iitfileorcdtrack></iitfileorcdtrack></code><br />
<br />
No messy QueryInterface method stuff. Since there was no JavaDoc on the iTunes jar and the jar itself is a Jar, it took forever before I just tried this. But it works. Hope this helps anyone else looking for info on this.<br />
<br />
BrianBrianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0tag:blogger.com,1999:blog-1995778971662340521.post-92110171853649860012010-01-12T21:24:00.000-06:002010-01-12T21:24:54.477-06:00Parsing the iTunes XML file yet again...I've discovered that the major cause of the memory leak was using ITunesController. Something I'd always suspected but I didn't really have any ideas for how to get around it. Until I finally figured out how to get the track locations from the iTunes XML file. It mainly has to do with the URLDecoder class. But once you use the decoder class there are still some characters that the XML file has thrown in there that don't seem to be UTF-8. So replace those characters and bam you've got track locations. The other benefit is that the file is parsed by line, both good and bad.<br />
<br />
The good...is that it's much faster just reading the xml file line by line.<br />
<br />
The bad...if Apple changes the itunes xml file format or simply rearranges the lines. I've got to go back and fix the parser. But I don't think they will ever change it so I'm good there.<br />
<br />
More updates to follow later. <br />
<br />
Now that I can reliably parse locations from the iTunes XML file. I now remove another component that requires the ITunesController and hence objects that can't be garbage collected.<br />
<br />
Lastly, every time the add tracks operation was run a new playlist was added to iTunes....another memory leak generator. So I've switched a simple text file that contains new tracks that have been added to iTunes. The user can right click on the tray icon and select an option to open the text file and a button has also been added to the Add Tracks Panel.Brianhttp://www.blogger.com/profile/08903854317017113284noreply@blogger.com0