Page 3 of 4

Posted: Tue Aug 14, 2007 10:45 pm
by Steve Horn
Thanks! BTW, I'm experiencing double play of each/all entries in a playlist like we discussed earlier. I have not figured out a pattern yet. I looked at the HB server data and the playlist property in the Jukebox device only lists one entry for each track - it matches the list box entries. So there's something wrong inside the Jukebox script I suspect. When this happens I can hit the next track button and skip over the 2nd play. Of course the next track plays twice too. Have you experienced this?

Posted: Tue Aug 21, 2007 8:52 pm
by incoronado
Fixed that, too.

Posted: Sun Aug 26, 2007 1:34 am
by incoronado
THC Jukebox 1.1 can be found here.

* Corrects numerous bugs as mentioned in this thread.
* Adds Import progress
* Total Song Count
* 20 addtional background skins (7MB).

http://www.in-coronado.com/mlarson/THCJukebox.hbx

Posted: Sun Aug 26, 2007 6:49 am
by markd
I have been following the thread without trying an install yet (waiting for the rev 3 service release). Two questions-

1) How would this system work for multi-zone?

2) Is it a script, a plugin, or some combination?

Thanks

Markd

Posted: Sun Aug 26, 2007 2:33 pm
by incoronado
* This does not handle muti-zone, but could be modified to do so. All of the components to do this are in place. Some thoughts on how to do it... Create multiple song queues. The songqueue table has a field called playlistid that could be used to track multiple songqueues . There is currently only one songqueue so this field defaults to 1. A list property would for each playlist (i.e., Jukebox - Playlist 1, Jukebox - Playlist 2). Each of the functions that effects the playing of songs would have to modified to accept the Zone as a parameter and make changes to the playlist/player that operates that zone. My explantion is significantly oversimplfied, but it would give someone an idea of how to do it. It would take some work, but very little compared to how long it took to write and put together this script.

I ask that if someone is willing to tackle this do it in such a way it can be shared with others by building upon what has already been done here.

* The first post in this thread indicates this is a script. It's actually multiple scripts, devices, third party apps, and graphics.

I can tell you that it is pretty solid and is worth the effort.

Posted: Tue Sep 04, 2007 2:01 am
by incoronado
FYI. The import function does not work properly under Vista. I'm working on a fix.

Posted: Tue Sep 04, 2007 10:03 am
by markd
Thanks- I thought it was all script, but I was a little confused at some of the references. Just wanted to make sure the "source" was available.

If I end up going this way, I will strive to keep it general, and to put it back into the forum!

Posted: Tue Sep 04, 2007 2:51 pm
by incoronado
Yes. The source/script is available in the HBX file. The quick and dirty....

The import function
----------------------------

* songs.cmd is called from WScript.Shell object in VBSCRIPT

* songs.cmd uses a command line utility called id3.exe (not Vista compatible) to dump tags to a text file (songs.tmp)

* ImportMusicLibrary Subroutine in jukebox.vbs opens songs.tmp and populates the Sqlite database with tag info.

* Sqlite.exe utility (provided) can be used to access songs.mlf database.

Other functionality.
--------------------------------
* HB Lists are populated with data from this database.
* Thumbnails are created dynamically on the fly using java program to extract embedded album art into .jpg files and is called using WScript.Shell object in Subs NowPlayingThumbnail and SelectedSongThumbnail.


I suggest you jump into it and ask questions as you run into them.

Posted: Mon Oct 08, 2007 1:19 pm
by markd
Getting started on the multi-zone mod.

Couple of comments on the install directions-

6. You need to modify the Songs.cmd and the "e:\music\*.mp3" to reflect your mp3 file location. You can only list one folder here and id3.exe will catalog all .mp3 files found in this folder and below.

I found this a little unclear- how about

6. Open the file Songs.cmd in your Scripts directory. Change the field "e:\music\*.mp3" to reflect where your mp3's are stored. List the top folder and id3.exe will catalog all .mp3 files found in this folder and below.

7 and 8- I did not have any lost in translation problems- both fields were correct. Maybe a fix in the service release?

Multi-zone

Looking at your suggestions towards making the jukebox multi-zone- I get the feeling you were thinking in terms of one control location, hence, one copy of the script and Jukebox null device?

What I want to do is have several interfaces around the house. Each interface will control up to three or four zones, and may be operated simultaneously with other interfaces (touching the same database). There will also be a couple of "master" interfaces that can control all the zones- at least being able to affect volume, pause, change songs, or stop them.

So I'm thinking that one way to accomplish this would be to use multiple copies of the jukebox script and null device (I'll already have multiple winamps). Feels a little kludgy. . .I'm going to read the script a little more closely to see if it could be changed to track all the zones simultaneously.

Any words of advice?

Thanks

markd

Posted: Tue Oct 09, 2007 8:51 pm
by markd
The page numbers for the Manage Playlists box point to the Music Library values. Looks like those values are just missing? (PlaylistPageUp, etc?)

Posted: Tue Oct 16, 2007 7:30 pm
by incoronado
Regarding
So I'm thinking that one way to accomplish this would be to use multiple copies of the jukebox script and null device (I'll already have multiple winamps). Feels a little kludgy. . .I'm going to read the script a little more closely to see if it could be changed to track all the zones simultaneously.
This might work. My gut tells me to try and modify a single script to handle it all. Give me a bit to mull this over.

Posted: Thu Jan 31, 2008 4:13 pm
by markd
Hi-

Working more intensively with the script now- made a mod so that it will display folder.jpg for coverart (how mine is stored) and now I'm working on getting the coverart to display when an album is selected instead of a song.

I can't figure out where you change Jukebox.Selected Name from the Album name to the index number. . . ? Can you fill me in?

thanks

Markd

Posted: Thu Jan 31, 2008 4:48 pm
by markd
Ok, I found it in the SW remote. . . now I just have to figure out how to use it. . . .

Posted: Thu Jan 31, 2008 8:19 pm
by incoronado
Replace Sub ShowLibrarySelectedSong in the script to this. This should work for ya.

Sub ShowLibrarySelectedSong
Dim SqlStr, r
If GetPropertyValue ("Jukebox.Tag Type") = "title" Then
SqlStr = "select * from songs where id = " _
& Right(GetPropertyValue ("Jukebox.Selected Name"),Len(GetPropertyValue ("Jukebox.Selected Name")) - 10)
Set r = objDB.Execute(SqlStr)
SetPropertyValue "Jukebox.Jukebox - Genre", r(1)("genre")
SetPropertyValue "Jukebox.Jukebox - Album", r(1)("album")
SetPropertyValue "Jukebox.Jukebox - Artist", r(1)("artist")
SetPropertyValue "Jukebox.Jukebox - Title", r(1)("title")
SetPropertyValue "Jukebox.Jukebox - Track", r(1)("track")
SetPropertyValue "Jukebox.Jukebox - Year", r(1)("year")
SetPropertyValue "Jukebox.Jukebox - File", r(1)("file")
Set r = Nothing
sleep 75
SelectedSongThumbnail
ElseIf GetPropertyValue ("Jukebox.Tag Type") = "album" Then
SqlStr = su.Sprintf("select * from songs where album = %Nq" _
, Right(GetPropertyValue ("Jukebox.Selected Name"),Len(GetPropertyValue ("Jukebox.Selected Name")) - 10)) Set r = objDB.Execute(SqlStr)
SetPropertyValue "Jukebox.Jukebox - Genre", r(1)("genre")
SetPropertyValue "Jukebox.Jukebox - Album", r(1)("album")
SetPropertyValue "Jukebox.Jukebox - Artist", r(1)("artist")
SetPropertyValue "Jukebox.Jukebox - Title", ""
SetPropertyValue "Jukebox.Jukebox - Track", ""
SetPropertyValue "Jukebox.Jukebox - Year", r(1)("year")
SetPropertyValue "Jukebox.Jukebox - File", r(1)("file")
Set r = Nothing
sleep 75
SelectedSongThumbnail
End If
End Sub

Posted: Fri Feb 01, 2008 6:08 am
by markd
Thanks man! I was almost there (interrupted by Lost and bedtime last night ;-), but I was using two sql calls- one to get the songlist, then one using the values from that to get the album data. I found the other call where you populate the songlist. I didn't realize that I could get the data directly.

While I have your attention, ;-) did you have any further thoughts on how to make this multizone as we started discussing above?

thanks

Markd