Page 2 of 8

Posted: Sun Jul 15, 2007 12:03 am
by Eyal
BMF wrote:when i like to prelisten to a song that is stored in a virtual cd nothing happens. the vlc opens but doesn't play the selected song.
That's because a Virtual CD file is not the ripped file but a pointer to the CDA track on the CD.

So the parameter passed to the application is:
[ ?:\Track01.cda ]
or whichever letter that designates your CD drive.

Posted: Mon Jul 16, 2007 9:00 am
by Steegy
In the script's code (ExternalTools.vbs) change

Code: Select all

TracksString = TracksString + QStr(Song.Path) & " "
to

Code: Select all

If Song.Cached Then
    TracksString = TracksString + QStr(Song.CachedPath) & " "
Else
    TracksString = TracksString + QStr(Song.Path) & " "
End If
and

Code: Select all

Command = Trim(QStr(Tool.ProgramPath) & " " & Tool.CLArguments & " " & QStr(Song.Path))
to

Code: Select all

If Song.Cached Then
    Command = Trim(QStr(Tool.ProgramPath) & " " & Tool.CLArguments & " " & QStr(Song.CachedPath))
Else
    Command = Trim(QStr(Tool.ProgramPath) & " " & Tool.CLArguments & " " & QStr(Song.Path))
End If
Then it should work (I currently can't test this myself). Is this correct?

Posted: Mon Jul 16, 2007 11:40 am
by BMF
Hello Steegy,

just came home from work and saw the mail alert :). I changed the script as you described ... and ... it works perfectly right now.

So I may be the first user of External Tools v1.3 or 1.2.01 :D.

Thank you Steggy.

Posted: Fri Sep 07, 2007 7:19 am
by phunkydizco
I want to run an external program with some parameters for the selected tracks, such as artist, album and year. Is this possible?

Posted: Fri Sep 07, 2007 8:23 am
by Steegy
That was supposed to be included from the start. I must somehow have forgotten about it. Will do.

EDIT: Done. ExternalTools 1.25 lets you add some 'field masks' to the "parameters" box. Use these masks only with the 3rd Selected Tracks option.

Posted: Sat Sep 08, 2007 1:51 am
by phunkydizco
Thank you for the field masks. There seems to be a bug or I am to silly.

I use this parameters:

Code: Select all

/artist "%A" /album "%L" /path "D:\Musik\Alben\%A\(%Y) %L\Folder.jpg"
And this is with the external program gets:

Code: Select all

>"C:\Programme\AlbumArtDownloader\AlbumArt.exe"  /artist "Guns N' Roses" /album "Use Your Illusion Vol. 1" /path "D:\Musik\Alben\Guns N' Roses\(1991) Use Your Illusion Vol. 1\Folder.jpg" "D:\Musik\Alben\Guns N' Roses\(1991) Use Your Illusion Vol. 1\01. Right Next Door To Hell.mp3"
The last parameter for the external program is the path to the file, but I haven't set this in external tools.

Posted: Sat Sep 08, 2007 12:57 pm
by Steegy
Yeah, I've should have mentioned that.

The executed command is: ProgramPath Parameters [SongPath1, SongPath2, ...]

As it is now (because I wanted to keep it 'simple' and because it didn't seem to be an issue), the SongPath is always appended when applicable. So the last "parameter" (that you haven't set) is not a parameter, but the SongPath. Of (one of) the selected song(s).

If this is an issue for you, you could try

Code: Select all

/artist "%A" /album "%L" /path "D:\Musik\Alben\%A\(%Y) %L\Folder.jpg" /foobar
as parameters. Some programs will ignore the foobar parameter (and thus the appended SongPath value) as they don't know it, but some programs will return an error message. If the latter is true, tell me and I'll change the script asap so that it's more useful and logical (but slightly more programming work :wink:).

Posted: Sun Sep 09, 2007 2:20 pm
by phunkydizco
This doesn't work. It's not possible to start the external program with an unknown parameter.

Posted: Thu Sep 13, 2007 10:30 am
by phunkydizco
Steegy wrote:Yeah, I've should have mentioned that.

The executed command is: ProgramPath Parameters [SongPath1, SongPath2, ...]

As it is now (because I wanted to keep it 'simple' and because it didn't seem to be an issue), the SongPath is always appended when applicable. So the last "parameter" (that you haven't set) is not a parameter, but the SongPath. Of (one of) the selected song(s).

If this is an issue for you, you could try

Code: Select all

/artist "%A" /album "%L" /path "D:\Musik\Alben\%A\(%Y) %L\Folder.jpg" /foobar
as parameters. Some programs will ignore the foobar parameter (and thus the appended SongPath value) as they don't know it, but some programs will return an error message. If the latter is true, tell me and I'll change the script asap so that it's more useful and logical (but slightly more programming work :wink:).
Is it possible to leave out the SongPath?

Posted: Thu Sep 13, 2007 11:01 am
by Steegy
Thanks for the bump, otherwise I wouldn't have seen this. I'll get right to it!

Posted: Fri Sep 14, 2007 11:00 am
by Steegy
I think I'll go with a solution where you can select:

When the tool is activated
- run the tool once
- run the tool for each selected track

Parameters as given in the first post will be possible for both choices.
Everything between [ and ] will be repeated for each track. (* could split the text from the separator)

So e.g. "-alltracks [%S*,]" could create "-alltracks Title1,Title2,Title3,Title4" for 4 selected tracks

"[-track# %S* ]" could create "-track1 Title1 -track2 Title2 -track3 Title3 -track4 Title4" for the same 4 selected tracks

This would be quite advanced, but also more difficult to use maybe.

Let me know if you have a better idea.

Posted: Fri Sep 14, 2007 12:09 pm
by phunkydizco
Steegy wrote:I think I'll go with a solution where you can select:

When the tool is activated
- run the tool once
- run the tool for each selected track

Parameters as given in the first post will be possible for both choices.
Everything between [ and ] will be repeated for each track. (* could split the text from the separator)

So e.g. "-alltracks [%S*,]" could create "-alltracks Title1,Title2,Title3,Title4" for 4 selected tracks

"[-track# %S* ]" could create "-track1 Title1 -track2 Title2 -track3 Title3 -track4 Title4" for the same 4 selected tracks

This would be quite advanced, but also more difficult to use maybe.

Let me know if you have a better idea.
Did you add this to v1.25? I think this really complex and don't know if this will eliminate the songpath problem. I have to test it.

Posted: Fri Sep 14, 2007 6:35 pm
by Steegy
I haven't added it yet (only did a test for it), but I would appreciate some suggestions. It would correct the songpath problem, but it's complex indeed. Complex but powerful.

Posted: Sat Sep 15, 2007 1:27 am
by phunkydizco
Why don't you make a parameter for songpath or filename and launch the external tool without any parameters. Ok, this would make it incompatible to the old version, but then it will be more flexible. I like your suggestion to make the parameters available for one instance of all selected tracks. So it would be possible to launch an external program in album view with parameters for artist, album and path. That's what I want.

Posted: Sun Sep 16, 2007 9:46 am
by Steegy
The script has been updated to v1.3, making it possible to use parameter loops (as discussed above but implemented slightly differently).
See the information on the first post to see how it behaves.

Make sure to check (and if necessary update) your existing tools set within ExternalTools. External tools will not automatically append the file paths anymore. This have to be specified manually as parameter.

If there's something not clear, please feel free to ask here. Also if you have a better way of explaining things :)