[slim] Re: SlimServer iTunes plugin...

2006-08-08 Thread evergreen25

I agree the iTunes interface is superior to the current slimserver.  My
main complaint with iTunes is that it doesn't support FLAC, but I guess
we can't have everything in life.

I am using a Windows-only plugin that updates the slimserver playlist
from the iTunes Party Shuffle playlist.  More info here:
http://www.jamescraig.co.uk/SlimServer

and here
http://forums.slimdevices.com/showthread.php?t=25997

If I want to listen at the same time on my computer I use the latest
version of Softsqueeze for Slimserver 6.3 and sync softsqueeze with my
Squeezebox v2.  It is working surprisingly well for such a kludgy
solution.

Sorry I can't be of more help with a Mac solution, but maybe you can
glean something from Mr. Craig's good work.


-- 
evergreen25

evergreen25's Profile: http://forums.slimdevices.com/member.php?userid=2500
View this thread: http://forums.slimdevices.com/showthread.php?t=26165

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss


RE: [slim] Re: SlimServer iTunes plugin...

2006-08-08 Thread Craig, James (IT)
Alex,
What happened when you tried it? Anything at all?

Do you have more than 1 squeezebox - The script below assumes only one
player.

James


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.
___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss


[slim] Re: SlimServer iTunes plugin...

2006-08-07 Thread alexfw

I messed around with the Applescript below (found via James's link
above) and could not get it to work. My incompetence is the likely
culprit, but it could also be that SlimServer and/or iTunes have
changed enough since late '04 that it just don't work. 

Should the below script still work as originally designed? Spousal
ambivalence has turned into downright hostility, and being able to use
iTunes as the interface is the key to bringing her 'round.

TIA,

Alex

Old  2004-10-02, 11:12
Anton F. van der Kraaij

Posts: n/a
Default Control SlimServer _from_ iTunes
Hi Everyone,

Well I think I have a solution for my problem. This applescript will
check if a song is playing in iTunes. If that is the case, it will
play
it in the SlimServer. There is a check made for special symbols in
filenames. My guess is that some symbols are not fully supported yet
(it works for my library so far). Save it as an application and don't
forget to tick the 'stay open' checkbox. Probably still bugs or
features missing, but it is a start :-)

Hope this helps. Oscar, thanks for your help and the link to the old
post.

Greetings,

Anton.

-- Begin of Script
-- iSlimServer: Control SlimServer from iTunes
-- Plays whatever song is currently playing in iTunes on the
SlimServer
-- Copyright Anton F. van der Kraaij 2004
-- Thanks to a script by Barry Brown for inspiration and help from
Oscar Marsch
--
-- This program is free software; you can redistribute it and/or
modify
-- it under the terms of the GNU General Public License as published
by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- INSTRUCTIONS:
-- Set your variables server_address and server_port to your situation
-- Save this script as an application, making sure to click 'stay
open'

global server_address, server_port, current_file_track

set server_address to 127.0.0.1 -- This is the slimserver's address
set server_port to 9000 -- This is the slimserver's port

set current_file_track to 

on idle
try
tell application Finder
if (get name of every process) contains iTunes then set okflag to
true
end tell
if okflag then
-- iTunes is running. Check if it is playing a song.
tell application iTunes
if player state is paused or player state is stopped then
-- iTunes is not playing. Stop slimserver.
do shell script (curl \http://;  server_address  : 
server_port  /status.html?p0=stop\)
set okflag to false
return 10
end if
end tell
end if
if okflag then
tell application iTunes
if class of current track is file track then
try
copy current track's location to file_path_of_track
on error errText
display dialog errText buttons {Cancel} with icon 0
end try
end if -- not a file track
-- return file_path_of_track
if (current_file_track is not file_path_of_track) then
-- File in iTunes is different than file on SlimServer.
-- Thus update variable
set current_file_track to file_path_of_track

-- convert mac path to unix path for use in URL with curl (be
careful with special characters here)
set mac_path to (file_path_of_track as text)
set root to (offset of : in mac_path)
set rootdisk to (characters 1 thru (root - 1) of mac_path)
tell application Finder
if (disk (rootdisk as string) is the startup disk) then
set unixpath to %2f  (characters (root + 1) thru end of
mac_path)
else
set unixpath to %2fVolumes:  mac_path
end if
end tell
set chars to every character of unixpath
repeat with i from 2 to length of chars
if item i of chars as text is equal to / then
set item i of chars to :
else if item i of chars as text is equal to : then
set item i of chars to %2f
else if item i of chars as text is equal to \ then
set item i of chars to \\  \
else if item i of chars as text is equal to * then
set item i of chars to \\*
else if item i of chars as text is equal to ? then
set item i of chars to \\?
else if item i of chars as text is equal to   then
set item i of chars to %20
else if item i of chars as text is equal to + then
set item i of chars to %2b
else if item i of chars as text is equal to  then
set item i of chars to %26
else if item i of chars as text is equal to \\ then
set item i of chars to 
end if
end repeat
set filetoplay to every item of chars as string
-- end conversion
-- Tell slimserver to stop current song and play the song
currently playing in iTunes
do shell script (curl \http://;  server_address  : 
server_port  /status.html?p0=stop\)
do shell script (curl \http://;  server_address  : 
server_port  /status.html?p0=playlistp1=playp2=  filetoplay 
\)
end if
end tell
end if
end try
return 10
end idle
-- end of script


-- 
alexfw

alexfw's Profile: 

[slim] Re: SlimServer iTunes plugin...

2006-08-06 Thread erland

AndreasG Wrote: 
 Would it theoretically be possible to write an iTunes plugin that sends
 the currently played song to the Squeezebox (via SlimServer or not)?
I'm pretty sure it shall be possible. I know its possible to give
slimserver a command to play a specific song, so if there are any
problems they are on the iTunes side. But since there seems to be
iTunes plugins which is able to to show information about currently
played song I suspect there shouldn't be any problem on the iTunes side
either.

AndreasG Wrote: 
 Am I the only one interested in such a thing?
There are probably more people interested in this since you are not the
only one that has complained on the slimserver web interface. Personally
I think I would prefer integration with a simplier musicplayer instead
of iTunes, or even better to improve the current slimserver web
interface.


-- 
erland

Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-trackstat)
, 'SQLPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-sqlplaylist)
, 'DynamicPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-dynamicplaylist)
and 'RandomPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-randomplaylist)
plugins)

erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=26165

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss


[slim] Re: SlimServer iTunes plugin...

2006-08-06 Thread James

once upon a time...

http://forums.slimdevices.com/showthread.php?t=8967highlight=itunes+control
James


-- 
James

James's Profile: http://forums.slimdevices.com/member.php?userid=189
View this thread: http://forums.slimdevices.com/showthread.php?t=26165

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss