THC Jukebox
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
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?
Steve
-
- Senior Member
- Posts: 153
- Joined: Fri Mar 19, 2004 12:30 am
- Location: San Diego, CA
-
- Senior Member
- Posts: 153
- Joined: Fri Mar 19, 2004 12:30 am
- Location: San Diego, CA
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
* 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
-
- Senior Member
- Posts: 153
- Joined: Fri Mar 19, 2004 12:30 am
- Location: San Diego, CA
* 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.
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.
-
- Senior Member
- Posts: 153
- Joined: Fri Mar 19, 2004 12:30 am
- Location: San Diego, CA
-
- Senior Member
- Posts: 153
- Joined: Fri Mar 19, 2004 12:30 am
- Location: San Diego, CA
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.
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.
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
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
-
- Senior Member
- Posts: 153
- Joined: Fri Mar 19, 2004 12:30 am
- Location: San Diego, CA
Regarding
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.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.
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
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
-
- Senior Member
- Posts: 153
- Joined: Fri Mar 19, 2004 12:30 am
- Location: San Diego, CA
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
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
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
While I have your attention, ;-) did you have any further thoughts on how to make this multizone as we started discussing above?
thanks
Markd