THC Jukebox workaround

Having problems? Maybe others have had the same problem too. Post HouseBot technical issues here.
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

THC Jukebox workaround

Post by Steve Horn »

I was going to post this as a reply to the THC Jukebox topic in the vbscripts sub but its locked. Dunno why. Anyway...
I ran into an issue with the Jukebox script not correctly creating (import) the music library. It was leaving a lot of the ID3 fields (title, artist, genre, etc.) empty and the Genre data was rubbish. I tracked it down to the ID3 utility used to build the songs.tmp flat file later used by the script to build or refresh the songs.mlf SQL db. The jukebox script has a bit code in it to work around a known bug dealing with genre, but the problem remains. I could not find a later version of the ID3 utility, so I've bypassed that step altogether by building the songs.tmp file outside of the vbscript using another MP3tag utility (logically named "mp3tag"). This utility is great for normal tag maintenance. In addition it has an export function that allows you to build an export file that matches the format needed by the Jukebox script. MP3Tag can be found at http://www.mp3tag.de/en/index.html. The export function can create flat files in a variety of formats using template files. Using existing template files I created a new template file that emulates the output of ID3. Then I commented out the call to ID3 (and the bugfix) in the jukebox script. Create the songs.tmp with MP3TAG export function, then run the import library function using the vbscript and all is well with the music library.
FWIW - maybe it will be useful to someone else using the THC Jukebox script.
Steve
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Re: THC Jukebox workaround

Post by markd »

Hi Steve-
thanks, this will be great- I had noticed that I had some tag issues, and fairly recently went through and scrubbed my music (it needed it baaaad ;-), but noticed that I still had some issues. Hadn't gotten around to addressing them yet- hopefully this will help. Is there any way to share your template file?

BTW, I've done a few things to THC myself- mainly adding distributed audio support, and some internet stream support. I also finally found the right spot to add delay to avoid the songs double playing sometimes, added a mode to drill down by artist/album, and added support for cover art that is stored by folder instead of in the MP3s.

The whole script forum is locked to get people to upload to the new scripts area, but that doesn't really address people discussing/working on scripts. I guess if we are going to talk about it we should move over to the general forum?

Thanks

Markd
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: THC Jukebox workaround

Post by Steve Horn »

Markd, I saw your post on the changes you had made. I want to change the drill down functionality, but have not gotten there yet. Since I resized my jukebox theme for 800x600 I needed to "shorten" the list boxes. As a result I need to change the paging logic to take the shortened boxes into account. That's next on the list.
Attached is the template file for MP3Tag to use to replicate the ID3 songs.tmp file. Just download and unzip it, put it in the mp3tag 'exports' folder (created when you install mp3tag). Then use mp3tag's export function to pick this export format. If you run into problems get back to me.
Attachments
id32songsdottmp.zip
(318 Bytes) Downloaded 350 times
Steve
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Re: THC Jukebox workaround

Post by markd »

Hi Steve-

Thanks! Here is my script. .. I'm pretty sure I didn't do anything outside it for that particular change- hopefully it will help- see the variable right at the top (so the mode can be swapped).

thanks

Markd
Attachments
Jukebox.zip
(8.37 KiB) Downloaded 374 times
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: THC Jukebox workaround

Post by Steve Horn »

Thanks; I'm going to "borrow" your drill down change.
I was looking a bit more at the list box length thing. What I'd LIKE, is for the genre and music library boxes to be fixed length (depth), for example 7 rows for genre, 20 for library, and have no vert scroll bar showing. Then you'd use only the up/down page controls to advance or back up the list. But short of rewriting lots of code to populate each associated box with a fixed number of rows (i.e. 7 at a time for genre), I know of no way to delete the scroll bars. Still thinkin' on it though... Anyway, in the version of the script that I have (pretty old), the up/down controls for the genre and song queue are not supported in the code anyhow.
I'm very new to vbscript too (and don't know squat about sqlite), which doesn't help matters. BTW, what does the *S-" mean?
Steve
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Re: THC Jukebox workaround

Post by markd »

Changing the list boxes should be pretty straight-fwd. Look for the places its says 'Page Logic, and substitute for the 100 with your desired size. My boxes are all the same length, so I named my variable List_Box_Size, sounds like you want different ones for each box type. If you put the variables all at the top of the script, it makes it easy to modify everything in a swell foop. There seems to be an invisible line- I had to make the size one less than I wanted or I get a scroll bar that doesn't show new data. (maybe a real bug? ;-) This logic is in place for the library and song queue- you just need to replicate it (and the associated HB properties) for the Genre list. Of course there are bound to be a couple of annoying side effects. ;-)

Dim List_Box_Size
List_Box_Size = 6

' Page Logic
TotalPages = ((r.Count-1)\List_Box_Size)+1
SetPropertyValue "Jukebox" & ZoneString & ".Jukebox Library List Page Total", TotalPages
' Check Subscript Range
If PageNmbr > TotalPages Then
PageNmbr = TotalPages
End If
SetPropertyValue "Jukebox" & ZoneString & ".Jukebox Library List Page Count", PageNmbr
LastPage = r.Count Mod List_Box_Size
If LastPage = 0 Then
LastPage = List_Box_Size
End if
If PageNmbr <= 1 Then
StartCount = 1
Else
MusicList = ""
StartCount = ((PageNmbr-1)*List_Box_Size) + 1
End If

If (PageNmbr >= TotalPages) Then
EndCount = ((TotalPages-1)*List_Box_Size) + LastPage
Else
EndCount = PageNmbr * List_Box_Size
End If
' End Of Page Logic

*S- is a housebot thing. Darned if I can remember what it does. I thought it was selected item, but I'm not seeing it now.

I didn't know much about vbs (and nothing about sql) when I started with Housebot either. Richard helped me a lot, and then google was my friend. ;-) For sql, I found this- SQLite Database Browser which lets you test out queries interactively.

BTW, while the drilldown WAS working, it seems to be broken today! D'oh! This script is pretty fragile in some ways. I'll fix it later (busy with Easter today) if you want to hold on. I'll add in the page thing above while I'm at it- kind of like that idea, the scroll bar is a PITA at 800x600.
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: THC Jukebox workaround

Post by Steve Horn »

Thanks - that's good stuff. I had looked at the paging logic code and wondered why the '100', as it obviously forces a scroll bar. I was going to get around to experimenting with it but Springtime has gotten in the way. Maybe a rainy day will allow me to get back to it.
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: THC Jukebox workaround

Post by Richard Naninck »

Steve,

I wrote this jukebox script a long time ago using SQLite and Meedio (and still very much use it) and Incoronado then ported it so it could be used with WinAmp.

Back in the days (2005 I believe), HouseBot still had memory limitations to alphalists. So if a list grew too long, you would run into memory trouble. Obviously that got fixed a long time ago....

Good luck!
Last edited by Richard Naninck on Sun Apr 04, 2010 2:23 pm, edited 1 time in total.
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: THC Jukebox workaround

Post by Steve Horn »

Richard, Thanks for the "history lesson". I had long since forgotten that you were the initial creator. Looking at it now, the code does look like your work. I should have known. :D
So what is "-S*"?
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: THC Jukebox workaround

Post by Richard Naninck »

*S- can be put at the beginning of an alphalist line to make it the selected one. Only one can be selected so when forcing a select, you need to clear all the *S- from the lines.

Btw: I'm back
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: THC Jukebox workaround

Post by Steve Horn »

ahhh-hah! Thanks, Makes sense now.
Related question... sort of. And I've been meaning to ask this of Scott or the forum: If one has a multi-list box panel (like Jukebox), how can you identify the one that has focus? Currently (as far as I know), you have to "force" focus by clicking on one of the list box entries of the list box you want to have focus. Unlike in Windows, there does not seem to be a way that you can "tab the focus around" and/or have the focus'd element visually distinct (borbered for example). Or even programmatically specify the focus.

BTW: Good!
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: THC Jukebox workaround

Post by Richard Naninck »

I don't know.... but why do you want such a feature? I like to see no focus at all so that all the alphalists are painted in the same way. Because the lists are controlled by using touchscreens it doesn't really matter which one has focus.

The help file gives you this: (I tried it in the beginning, but since my IR Remote often sent double codes, I had trouble making this feature smooth without skipping buttons all the time. That time I didn't use alphalists yet so I don't know how this feature behaves on lists).


Remote Focus Control

The Control Focus Management feature of the Software Remotes is designed for situations where the Software Remote application is not driven by a mouse pointer or touch screen. With this feature, it can be controlled from the HouseBot server or by using the cursor keys. A focus rectangle is shown on the Software Remote around the control that currently has the focus. The focus rectangle can be moved to adjacent controls, and the controls can be selected. Generally, a standard remote control is used to control the Software Remote through the HouseBot server. This section describes a typical setup for this feature.
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: THC Jukebox workaround

Post by Steve Horn »

Here's one example where changing focus via the script would help. Select a genre, and the music library list box is updated to reflect that selection. Instead of using a finger to select an entry from the library list box (song list or album list; doesn't matter), using the keyboard cursor control keys (up/down, page up/down) to scroll through the library entry results does not works since the focus is still in the genre list box - you end up scrolling the genre list... and wildly re-updating the library list box as you go. I think once the genre is selected, the focus should move to the library list box, since that's the "next step" in the music selection process. That said, your description of the remote focus control feature reminded me that I'd read about that when it became available and didn't know where I would apply it. I need to revisit that capability to see if it can be applied here. But its finally Spring here and getting to it, as well as Markd's suggested page logic changes, may take me some time. And the changes to the list box "depth" and page control of the list boxes may reduce the significance of focus control since scrolling via keyboard would be less "practical" since it would be limited to the depth of the list box (i.e. 7 for genre instead of 100).
Thanks.
Steve
RaiderRed
Member
Posts: 2
Joined: Fri Sep 24, 2010 8:32 am

Re: THC Jukebox workaround

Post by RaiderRed »

Richard,

Since you are the original creator of the Jukebox script, I was wondering if you had or knew the fix to some of the issues that were address when Incoronado posted the a link to THC Jukebox 1.1. The link is broken and I am having issues where the same song plays twice before moving to the next song in the playlist. Any help would be appreciated.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: THC Jukebox workaround

Post by Richard Naninck »

Well, I did create the jukebox script based on sqliteII working with Meedio and still use it everyday. However Incoronado ported it to his own needs for use with WinAmp (if I am correct).
I don't have his script running so it is going to be hard to do some bugfixing. It may be a good thing to get the broken link back to work. You may ask Scott to take a look at the link. All data should still be available on this forum and Scott owns it.

Maybe even Incoronado himself could pitch in if he is still reading or just send him a PM.

I will take a look at what bugs were addressed and if I find anything usefull, I will report back.

EDIT: Is this the link?
viewtopic.php?t=855838
Post Reply