PDA

View Full Version : LDJ 0.31



Rob H
February 6th, 2005, 10:21 AM
I've just uploaded the latest version of LDJ here - LDJ 0.31 (http://www.promixis.com/download.php?ID=694)

If you are installing it over an existing version then you should make a backup of your LDJConfig.lua - this one will overwrite that file as there are several new entries in it. I'll try not to make any further changes in later versions, but this was unavoidable, sorry.

Changelog :-


Fixed some issues with groups, which weren't working with media files
when the group was set up in DVD Profiler

Indexing by collection number wasn't working

Rescan wasn't updating the collection correctly (still cached the old
objects on the stack.

Added support for film rating/classification as a filter

Dropped the series title from individual episodes.

Series episodes are now sorted by season and episode number.

Moved the image cache to
Documents and Settings\<user>\Application Data\LDJ\Images

Added Public.ClearFilters()

Added support for extensions to the notes field - see LDJConfig.lua for
further details.

Made XML processor table driven, should speed things up by reducing the
number of comparisons performed quite drastically.


Sped up filtering slightly

Now applies filters to groups, if any object within the group matches
the current filters then the whole group matches.

Fixed a number of issues with filter display, particularly when not on
the first page of filters.

Improved speed of filtering when most filters were set to all

Now uses an externally implemented stack

If a filter or group was active when a client disconnected, on
reconnection the context would be invalid.

Started on the conversion to LUA 5 by using lib\G4Compat.lua - not yet
completed

mikeythemikey
February 6th, 2005, 12:12 PM
woohooooo, pics now work.. now just need to understand how to get a ccf to work with it myself. I have a screen of 1024x768 so I am thinking about 9 images 200x283 and when you click to see an image of 500x707 and the film details and play button underneath :)

Rob H
February 6th, 2005, 12:26 PM
Great, that's a relief!

I'd recommend having more covers on screen at a time than that.

My 768x1024 CCF has 24 covers on screen, plus a larger version for the selected DVD.

My old 1024x768 had about 18 covers

mikeythemikey
February 6th, 2005, 12:27 PM
any chance of your ccf? or is it top secret..

Rob H
February 6th, 2005, 12:34 PM
Which one? The 1024x768 (landscape) or the 768x1024 (portrait).

The landscape one is a bit out of date.

PM me your email address and I'll send them both if you like.

mikeythemikey
February 6th, 2005, 01:33 PM
PM Sent :)

danward79
February 6th, 2005, 02:13 PM
Nice one Rob, :wink:

cdebuhr
February 7th, 2005, 12:23 PM
i use 0.27 - is there a changelog for 0.31?

are there changes in the gml or "only" in the lua-part?

danward79
February 7th, 2005, 12:36 PM
Rob, I got my series sort of working.

I think I need to sort out some stuff with the series text to get the titles to show correctly thou.

Thanks it is looking great, the misses is well Happy!

Rob H
February 7th, 2005, 12:40 PM
Let me see what I can do about a changelog.

The GML has changed too I'm afraid.

All the LDJ.PlaySelectedDVD_xxx commands now take more parameters.

Ben S
February 7th, 2005, 06:23 PM
Can't wait to try it, Rob.

Rob H
February 7th, 2005, 06:28 PM
Let me know if you have any problems.

Also any feature requests. I've got quite a long list of those myself.

cdebuhr
February 8th, 2005, 11:32 AM
hi rob,

when i click on a cover, i get a "LDJ: Didnīt find device" msg & thats it then.

plz help again... ;-)

Rob H
February 8th, 2005, 11:37 AM
This is with your CCF? Or with LDJSample.ccf?

cdebuhr
February 8th, 2005, 11:42 AM
this is with my ccf, but i (think) i copied the new stuff from your sample.

danward79
February 8th, 2005, 11:42 AM
Is any one having problems with zoomplayer loading?

danward79
February 8th, 2005, 11:43 AM
this is with my ccf, but i (think) i copied the new stuff from your sample. Sounds link your problem is that girder is trying to set the page in the ccf but it is called something else

cdebuhr
February 8th, 2005, 11:43 AM
i donīt get that far.... :-(

cdebuhr
February 8th, 2005, 11:46 AM
but where, dan?

i see it went to ldj.select -> and then to ldj.selectdvd (thats in the lua, i think) -> then this sends the ip of my ppc + itemno to nr ....

20:46:23.125 EVENT: Dev: 203 LDJ.SELECT Pld1: 192.168.2.103 Pld2: 0

Rob H
February 8th, 2005, 11:46 AM
In LDJSample.lua there's a function called HandleDVDSelect() :-


function HandleDVDSelect&#40;index&#41;
if NetRemote.GetVariable&#40;'LDJ_DVD_Type_'..index&#41; == 'GROUP' then
NetRemote.ExecuteAction&#40;-1, 0, 1, 'LDJ.DOWNLEVEL&#40;'..index..'&#41;'&#41;
else
NetRemote.ExecuteAction&#40;-1, 0, 1, 'LDJ.SELECT&#40;'..index..'&#41;'&#41; ;
NetRemote.GoDevice&#40;'LDJ', 'BigCover'&#41;
end
end

The problem is the NetRemote.GoDevice() call - if you have a separate panel that contains a big cover then change the names of the Device (LDJ) and Panel(BigCover) accordingly. If you have a larger CCF that has the big cover on the same screen as the small covers then just delete or comment out that line.

Obviously, you need to do this in your CCF's lua file

mikeythemikey
February 8th, 2005, 11:48 AM
Is any one having problems with zoomplayer loading?

I am, but not sure it is related. It loads and flashes for a moment but wont play the film.

Rob H
February 8th, 2005, 11:49 AM
Is any one having problems with zoomplayer loading?

What sort of problem? You may need to tweak the command that girder issues - it's set to use /F:2 by default ie open full screen on monitor 2. You may need to change that to /F:1 - you'll need to do this for each LDJ.PlaySelectedDVD_xxx event.

cdebuhr
February 8th, 2005, 11:52 AM
yeah, rob. thatīs it. thx - fixed it.

Rob H
February 8th, 2005, 11:53 AM
Great!

NEXT!

:)

danward79
February 8th, 2005, 12:17 PM
Is any one having problems with zoomplayer loading?

What sort of problem? You may need to tweak the command that girder issues - it's set to use /F:2 by default ie open full screen on monitor 2. You may need to change that to /F:1 - you'll need to do this for each LDJ.PlaySelectedDVD_xxx event.

I had a look in the logger, it looks like LDJ.PlaySelectedDVD_MPG is not being triggered

Rob H
February 8th, 2005, 12:22 PM
This is probably the TriggerEvent bug - two possible solutions :-

1) Try the GVMS.dll in http://www.promixis.com/phpBB2/viewtopic.php?p=111352#111352

2) In LUADVDJB.lua change Public.GirderEvent to this


function Public.GirderEvent&#40;command, payload1, payload2, payload3&#41;
if payload1 then
if payload2 then
if payload3 then
TriggerEvent&#40;command, 18, payload1, payload2, payload3&#41;
else
TriggerEvent&#40;command, 18, payload1, payload2&#41;
end
else
TriggerEvent&#40;command, 18, payload1&#41;
end
else
TriggerEvent&#40;command, 18&#41;
end
print&#40;'GirderEvent&#40;'..command..','..&#40;payload1 or 'nil'&#41;..','..&#40;payload2 or 'nil'&#41;..','..&#40;payload3 or 'nil'&#41;..'&#41;'&#41;
end

danward79
February 8th, 2005, 12:48 PM
It could be the payloads are nil, will try it as soon as I can get on the HTPC!

danward79
February 8th, 2005, 12:58 PM
Thanks Just using the new function sorted that, working now

Rob H
February 8th, 2005, 01:07 PM
Good news

Matt Webster
May 30th, 2005, 12:42 AM
Rob,

I'm trying to send a message to an instance of girder separate to the LDJ instance that contains the disk location information (changer_id). I'm trying to send the disk location to HomeSeer via the hsGirder plugin for NetRemote that operates on a different instance.

Do I need to do something with LDJ_Config.NotesExtensions? I'm unsure on how to implement this.

Matt

Rob H
May 30th, 2005, 02:13 AM
Hang on, you want to do this via NetRemote?

Do you want to do this when a disk is selected or when it's played?

Matt Webster
May 30th, 2005, 06:34 AM
Via NetRemote would be great. I only need the information when the disc is played. My IR interface is not Girder. I've been trying with no success to get the control_id out of NetRemote or Girder & into HomeSeer. I guess since the title information is available in NR, I could use that & set the disc positions that correspond in HomeSeer.

Matt

Rob H
May 30th, 2005, 07:00 AM
This sounds rather like what I do in the LDJ Proxy Control part of the GML -
see LUA DVD Jukebox\LDJ Proxy Control\Play DVD Changer disk

pld2 is the changer_id - shouldn't be hard to tweak it to send an event to hsGirder instead.

Matt Webster
May 30th, 2005, 07:51 AM
Rob,

Looking at your proxy stuff led me to a syntax error in my initial attempts to send it out of Girder.

I'm getting close to getting this all working! :D

Matt

Rob H
May 30th, 2005, 08:15 AM
Does that mean that you've got it working now?

If not, what's the current problem.

Matt Webster
May 30th, 2005, 08:37 AM
I'm working on recreating the preamble, digits, postamble stuff in HomeSeer. I've got a dvpcx-985v. I seem to having some trouble with delays. I send it osd, enter, digits, enter, play, enter, osd. This works with the remote, but not with the script I've written.

Matt

Rob H
May 30th, 2005, 09:23 AM
You'll need at least a 100ms delay between each of those - possibly a bit longer

Matt Webster
May 30th, 2005, 06:48 PM
Got it working. Very happy! :D

Rob H
May 31st, 2005, 01:40 AM
:D :D

VogonPoet
June 4th, 2005, 03:21 PM
I'm a newbie with LDJ (OK, and with Girder and NetRemote). I've got Girder and NetRemote working with JRMC to play music files. I'm struggling to make LDJ work.

I've searched the forums and can't find my problem anywhere. I apologize in advance if I'm asking a FAQ.

I've used DVD Profiler to build a 3 item database, following the instructions that accompany LDJ v0.31. I'm using the method of "Changer_id=1" in the Notes field to identify the discs.

When I launch Girder, I can see (through the Hardware Event Logger) all 3 DVD's are apparently successfully imported.

I then launch NetRemote and load the default CCF, and see the [LDJ] button. Pressing it brings up a screen with a vertical scroll bar on the right, and "No matches" along the bottom, along with three buttons: a back arrow, a magnifying glass, and a "T" button. But there are no DVD's listed.

The Hardware Event Logger shows the following:

EVENT: Dev: 203 LDJ.Configure Pld1: 192.168.1.102 Pld2: 6,12,9,256,95,93,

ALERT: error: attempt to call global `LUA_Parse' (a nil value)

ALERT: stack traceback:

ALERT: 1: main of (none)

Can anyone point me in the right direction, please?

Rob H
June 4th, 2005, 05:02 PM
You need to install and enable the WinLuaEx plugin.

VogonPoet
June 4th, 2005, 08:47 PM
Fantastic -- it worked.

Thanks for your help.

Rob H
June 5th, 2005, 02:41 AM
I wish all problems here were as simple to fix :)

Glad you've got it working.

VogonPoet
June 11th, 2005, 04:43 PM
OK, now I'm struggling to make LDJ work with a set of Kenwood DVD-5900M changers. I've followed the instructions as best I can, and I think I've done what I need to do to learn the IR commands, but I need help with the Play changer disc script.

I'm in the script for LUA DVD JukeBox --> LDJ DVD Changer Control --> LDJ.PlaySelectedDVD_Changer.

Rather than write a script using the IR codes, I'd like to use a great little program called Kenwood Control, which controls the changers through their serial ports.

Using this program, I can make the following work from within Girder:

execute( ' start C:\\Kenwood\\kwd_5900_ctrl.exe 2 PLAYDISC 333' )

This will play disc #333 in changer 2.

From an earlier post, I think I see that pld2 contains the changer_id.

I'm happy to enter the changer # and disc location into DVD Profiler either in the "Location" and "Slot" fields, or in the Notes field as Changer_id=229[C2],230[C2]

I'm guessing that I have to write some script to parse pld2 to pull out the changer # and the disc #.

Q1: Does that script exist elsewhere? I'm a novice at LUA, so I can try to write the script, but it'll take me a long while, I fear.

Q2: How do I pass the two variables to my execute( 'start... command?

Q3: Can I make this work for a changer_id that contains multiple discs?

Rob H
June 12th, 2005, 03:01 AM
Using this program, I can make the following work from within Girder:

execute( ' start C:\\Kenwood\\kwd_5900_ctrl.exe 2 PLAYDISC 333' )

This will play disc #333 in changer 2.

From an earlier post, I think I see that pld2 contains the changer_id.

I'm happy to enter the changer # and disc location into DVD Profiler either in the "Location" and "Slot" fields, or in the Notes field as Changer_id=229[C2],230[C2]

I'd suggest using


Changer_id=229&#91;2&#93;,230&#91;2&#93;

You should then find that pld2 will contain '2,229' for the first of those discs.

So your script will look something like :-


_, _, changer, slot = strfind&#40;pld2, '&#40;.-&#41;%,&#40;.+&#41;'&#41;
if changer and slot then
execute&#40; ' start C&#58;\\Kenwood\\kwd_5900_ctrl.exe '..changer..' PLAYDISC '..slot&#41;
end


That should work even with multiple discs

VogonPoet
June 12th, 2005, 06:35 AM
Woohoo! I think I got it.

Actually,

pld2 = [C2],229

So I tweaked the reg ex to be

_, _, changer, slot = strfind(pld2, 'C(.-).%,(.+)')

and that seems to be doing it.

THANK YOU for your help.

Rob H
June 12th, 2005, 06:46 AM
Glad it's working for you.

VogonPoet
June 15th, 2005, 06:40 PM
OK, I thought I was home free, but apparently not. The script is correctly identifying the changer # and slot #, and assigning them to the 'changer' and 'slot' variables.

I can successfully pass these variables to the following statement:

if changer and slot then
execute( ' start C:\\Kenwood\\kwd_5900_ctrl.exe '..changer..' PLAYDISC '..slot)
end

This works for two of the three changers, #2 and #3 (hooked up to COM2 and COM3), choosing the correct changer and slot and playing the right disc. For some reason, changer #1, hooked up to COM1, won't accept the exact same command.

I can also make the kwd_5900_ctrl.exe application work as a standalone app from the command line, for all three changers, including #1. So, as best I can tell, it's not a hardware or cabling problem. (I've also tried two different cables and two different COM ports, with the same results -- success through the command line, but failure when calling from a Girder script.)

After it fails, I can't connect to changer #1, either through the command line or the GUI. I get an error message generated by kwd_5900_ctrl.exe, which reads ""ie_Open - device already open".

I can only recreate this problem by trying to run the command line app from within a Girder script.

The author of the kwd_5900_ctrl.exe is guessing that, for some reason, "It sounds like Girder may not be releasing the EXE."

I also created a new Girder Execute command with kwd_5900_ctrl.exe as the file and "1 PLAYDISC 223" as the parameters (in the "Step Size" field), and it works fine. So apparently it works from Girder, but not within a Girder script through this:

execute( ' start C:\\Kenwood\\kwd_5900_ctrl.exe '..changer..' PLAYDISC '..slot)


Any ideas? Is it something about the start command, maybe?

Rob H
June 16th, 2005, 12:40 AM
Does it not work without the 'start'? It shouldn't really be necessary.

Do you have the logger plugin installed? I'd suggest that you try copying the execute() and change 'execute' to 'print' just to make sure that you are really trying to execute a sensible command.

Cocophone
September 18th, 2005, 01:25 PM
I'm having a problem with netremote crashing when using a ccf that uses a lua file that is based on ldjsample.lua.

I'm using Netremote 1.1.0.44 on my pda

I've attached my netremote.log, the ccf and the lua file.

I think it crashing as it loads up the images for all the DVDs. Sometimes it will work, but not very often.

Thanks for any help.

Rob H
September 18th, 2005, 03:48 PM
This is probably one for Ben, as I don't run NR on a PPC. But the lua file looks fine to me.

Matt Webster
October 29th, 2005, 11:10 PM
Just switched to this version to take a look at some of the new lua scripts & my ldj stopped working. It hung on the ratings stuff. Debugview is below.

[1932] Var changed -
[1932]
[1932] Avid.FlashState
[1932]
[1932] 01:22:26.875] LUA] Error running lua chunk
[1932] [string "NRLUA"]:1: attempt to perform arithmetic on a nil value
[1932] 01:22:26.875] LUA] val = tonumber(NetRemote.GetVariable("LDJ_DVD_Star_Rating_Selected") or '0')*0.5 >=1;return val;
[1932] 01:22:26.921] LUA] Error running lua chunk
[1932] [string "NRLUA"]:1: attempt to perform arithmetic on a nil value
[1932] 01:22:26.921] LUA] val = tonumber(NetRemote.GetVariable("LDJ_DVD_Star_Rating_Selected") or '0')*0.5 >=1;return val;
[1932] Loaded device LDJ and panel LDJ Main
[1932]
[1932] Panel changed - closing all popups
[1932]
[1932] Var changed -
[1932]
[1932] Avid.FlashState

It was choking on this lua in the ccf:

STATE:LUA:val = tonumber(NetRemote.GetVariable("LDJ_DVD_Star_Rating_Selected") or '0')*0.5 >=<LoopIndex>;return val;

It didn't previously. I'm unsure of why? Probably not an LDJ issue.

Matt

Rob H
October 30th, 2005, 01:28 AM
Try changing that to

STATE&#58;LUA&#58;val = &#40;tonumber&#40;NetRemote.GetVariable&#40;"LDJ_DVD_Star_Rating_Selected"&#41; &#41; or 0&#41;*0.5 >=<LoopIndex>;return val;

Matt Webster
October 30th, 2005, 07:48 AM
That did the trick :D