Skip to content

Commit

Permalink
fixed the 'Add to iTunes' action
Browse files Browse the repository at this point in the history
updated versions
  • Loading branch information
mshorts committed Jan 27, 2012
1 parent 6409581 commit ef68bcf
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Belvedere.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ return
;Here we are creating all the variables for usage as well as the resource files
SetVars:
APPNAME = Belvedere
Version = 0.7
Version = 0.7.1
AllSubjects = Name||Extension|Size|Date last modified|Date last opened|Date created|
NoDefaultSubject = Name|Extension|Size|Date last modified|Date last opened|Date created|
NameVerbs = is||is not|matches one of|does not match one of|contains|does not contain|contains one of|RegEx|
Expand Down
5 changes: 4 additions & 1 deletion help/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ <h1>Belvedere Automated File Manager</h1>
<p>Icon provided by <a href="http://what-cheer.com/">What Cheer</a></p>
<p>Compression functionality provided by <a href="http://www.7-zip.com">7-zip</a> under the GNU LGPL license</p>
<p>Growlnotify included from the <a href="http://www.growlforwindows.com/gfw/default.aspx">Growl for Windows</a> project</p>
<p>Version: 0.7<br />
<p>Version: 0.7.1<br />
Creator: Adam Pash<br />
Contributors: Matt Shorts<br />
QA & Testing: Dustin Luck</p>

<hr />
<h1>Changelog</h1>
<pre>
Version 0.7.1
fixed the 'Add to iTunes' action, works with iTunes 9 or higher

Version 0.7
added ability to act upon folders
added 'Add to iTunes' action via the 'Automatically Add to iTunes' folder
Expand Down
2 changes: 1 addition & 1 deletion help/rule-create.htm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ <h1>Create Rule</h1>
</ul>
<img src="images/rule-create-3j.JPG"><br />
<ul>
<li><strong>Add to iTunes</strong> - This action will move the file in question to the 'Automatically add to iTunes' folder which is monitored by iTunes when it is running.</li>
<li><strong>Add to iTunes</strong> - This action will move the file in question to the 'Automatically add to iTunes' folder which is monitored by iTunes when it is running. This works with iTunes 9 or higher.</li>
</ul>
<a href="#top">Top</a><br />
<hr />
Expand Down
29 changes: 28 additions & 1 deletion includes/actions.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,37 @@ compressFile(file)
addtoitunes(file)
{
RegRead, MusicLoc, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, My Music
itunesfolder := MusicLoc . "\iTunes\iTunes Music\Automatically Add to iTunes"
itunesfolder := MusicLoc . "\iTunes\iTunes Media\Automatically Add to iTunes"
ifExist, %itunesfolder%
FileMove, %file%, %itunesfolder%
else
Log("Unable to find iTunes folder to move file", "Action")

;we tried to move the file, if that wasn't successful, it's worth trying to copy it
ifExist, %file%
{
Log("File was not moved with this operation, trying to copy file instead...", "Action")
FileCopy, %file%, %itunesfolder%
SplitPath, file, name
copiedFile := itunesfolder . "\" . name

ifExist, %copiedFile%
{
Log("File copy was successful", "Action")
FileDelete, %file%

if ErrorLevel
Log("Unable to delete original file after copy", "Action")
else
Log("Deletion of original file was successful", "Action")
}
else
{
Log("File copy failed as well", "Action")
ErrorLevel := 1
}
}

if ErrorLevel
return ErrorLevel
else
Expand Down
2 changes: 1 addition & 1 deletion installer/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

;General Application defines
!define PRODUCT_NAME "Belvedere"
!define PRODUCT_VERSION "0.7"
!define PRODUCT_VERSION "0.7.1"
!define PRODUCT_PUBLISHER "Lifehacker"
!define PRODUCT_WEB_SITE "http://lifehacker.com/341950/belvedere-automates-your-self+cleaning-pc"
!define PRODUCT_HELP_TEXT "Belvedere Help.chm"
Expand Down

0 comments on commit ef68bcf

Please sign in to comment.