PDA

View Full Version : LDJ



Rob H
June 17th, 2004, 03:24 PM
How many people here use LDJ?

I'm asking because I've been working on the LUA script over the last week or so and have made lots of changes. Here's the history list taken straight from the comments I've added to the start of the file (sorry it's so long)



Now uses IRFanView to do image conversion as it does a better job with images, although it may be a little slower.

Using iterators over collections rather than using getn as this is supposed to be faster. And indeed this seems to be the case

Extracted various methods to simplify others

The image sizes are now defined by variables - the default size is now 100x150 (it was 50x75) - but see later.

Changed the variables FiltersPerPage, CoversPerPage, TitlesPerPage and DVDTitleMaxLen to better suit my CCF size (1024x768) you can reset these to Gavin's original values by setting Private.StandardConstants to 1

On slow machines the image conversion is still excruciatingly slow so the batch file is now only executed if the scan was requested by NetRemote, ie
it isn't executed on startup. The batch file is still written to the cache_dir and can be run from there if required.

Added LDJ_DVD_Filter_Up and LDJ_DVD_Filter_Down to allow for the filter scrolling buttons to be enabled and disabled.

Added LDJ_DVD_Filter_visible_<loopindex> to hide unused filter slots.

Added LDJ_DVD_Title_Check_<loopindex> to hide unused title slots add a frame called STATE&#58;LDJ_DVD_Title_Check_<LoopIndex>&#58;1&#58;1 as the parent of the looped DVD slot in the CCF. If you are using this then ensure that Private.SupportHidingThumbnails is set to 1 as this should speed up hiding unused slots.

Now updates the titles that correspond to the displayed cover images at the same time as the images. Any further titles are updated later - this helps with slower machines.

Added a function update_slider_pos which is now also called from the refresh_titles function, so that it doesn't get left in the same place after a filter has been applied.

Some minor optimisations such as caching expressions in local variables to both simplify the code and to provide a speed boost

SelectNext and SelectPrev weren't checking that %Private.SelectedDVD was initialised

Collected together all the messages sent to NetRemote in one place to save hunting through the source for them all

Added filter inversion

If the 'ALL' filter is selected then short circuit the filtering since all the candidates must match by definition

Added immediate filtering option such that changing a filter criterion will cause an immediate refiltering. Can be changed by calling LDJ.ToggleImmediateFiltering&#40;&#41;. The status is reflected to NR using LDJ_Filter_Immediate

Added and/or filtering on selected Genres - see Private.AndFiltering to turn this on or off. The original code from LDJ 0.24 used OR filtering i.e. if you selected two filter options then it would show all DVDs that matched either of them. If you switch to AND filtering then it will only show those DVDs that match all of them e.g. Animation and Comedy

Swapped round the order of the inner loops in the filter function so that it only cycles through the values for each dvd once for each selected filter key.

Replaced the inner loop of filter with the functions apply_filter_to_dvd, match_any_keys and match_all_key. Simplified the code enormously.


Is there any interest in my uploading it? Or are there any other features that people want before I do so?

Before I upload it I'll need to add a few more comments and also tweak the sample CCF to illustrate the new features. I could also do with a couple of beta testers - I don't want to disrupt anyone's setups in case I've screwed up in some part of the code that I haven't tested. I hope Gavin doesn't mind my doing this.

Promixis
June 17th, 2004, 06:56 PM
Rob,

I have a script in Girder that automatically gets DVD cover art and metadata when a DVD is inserted. You may want to look at that and see if there is anything you would want to use.

Mike

Rob H
June 17th, 2004, 11:57 PM
Thanks, that sounds useful

Cocophone
June 18th, 2004, 06:07 AM
Rob,

I would be interested in using it.

I tried before to get LDJ setup without complete success.

What I'm would like to do is have a bunch of divx or mpg of home movies of my kids or tv shows that I've recorded and play them with zoomplayer.

I would make up cover art for them.

thanks,

Rob H
June 18th, 2004, 06:14 AM
What problems did you have last time? I don't use Zoomplayer though, as I'm mostly using it with my DVD Jukebox. I'll take a look at ZP sometime.

I'll have to see if I can write some documentation for it.

Cocophone
June 18th, 2004, 09:03 AM
I got the available movies to show up on Netremote.

The cover art was there for the movies that I got the program that looks up the art and movie info (I forgot the name of the program)

I could never get zoomplayer to launch and play the mpeg file.

I am able to use zoomplayer with another ccf file that controls zoomplayer, but on that ccf I click on a button that brings up the directory tree on the TV and I select the mpeg file to play.

Thanks for the help.

QuickCarl
June 19th, 2004, 04:10 AM
RAH99 - YES!YES!YES!YES!YES!YES!YES!YES!YES!YES!YES!

PLEASE, I'm very interested. I have a Sony Mega DVD Changer, and it is one of the things that I am most interested in using netremote to control.

I have had several issues. Using DVD profile is very cool and easy to setup your collection. I thought that back when gavin was originally putting the thing toghther that he was going to depend upon the collection number as the slot number in the player.... don't think that will work well.

What are you doing to use as a slot number and what are you doing with multi-disc set, especially ones that have a 'special features' disc. As I am seing them added to the collection by DVD Profiler, there is no 'second' collection number or designation that there are multiple discs.

Is there a way to edit the collection number to matcth the slot position for a disc already loaded in the player? Is there a way to make duplicate entries and then edit the 'title' to handle the multi-disc circumstances?

Let me know how I might be able to help test or anything else you might need. -Carl

Rob H
June 19th, 2004, 04:30 AM
I'm also using a Sony changer (DVP-CX850D) it works well with LDJ

You can either use the collection number or put Changer-id=nnn in the notes field - you can also use File=path for ripped dvds and AVIs etc.
It's a bit of a pain to set it up the first time, but it's a one time thing, providing you keep a backup! You can edit the collection number in DVDProfiler, but some people might prefer to use the collection number as an indicator of the order that they've added their discs.

I haven't yet done anything about multi-disc sets - it's on my to-do list.

The simplest thing would be to support an extended form of the Changer-id e.g.

Changer-Id=100-102

and

Changer-Id=100,101,102

It's probably easiest to do this in the Girder event handler for LDJ.PlaySelectedDVD_CHANGER

The only tricky thing then is what to do about the visuals - do you treat it as multiple DVDs or have the play button force NetRemote to a second page for multi-disc sets? Perhaps an extra state variable to indicate to NetRemote that the disc is a multi?

QuickCarl
June 19th, 2004, 05:11 AM
Rob -

I would love to see your CCF and learn how to install the LUA stuff so that I can get it working right.

I have the lastest 400 disk Sony and I am putting 'flippers' one after another so that I can hit next disc to get the other side quickly (my gear is in the basement), I am putting the 'special features' discs on the high end of the player (300's)...

Here is an idea of what I am going for aesthetically Screenshot of Carl's LDJ (http://www.netremote.org/phpBB2/viewtopic.php?p=1795#1795)

I haven't kept up with NetRemote's progress very well, so there are a lot of things I'm not up to speed on. Some simple to follow documentation would be MOST helpful.

Let me know if I can be of any service in terms of testing.

Rob H
June 19th, 2004, 05:28 AM
Here's a screenshot of the latest incarnation with the filters panel displayed :-

QuickCarl
June 19th, 2004, 05:58 AM
Rob - beautiful!!!!!!!

I'm not worthy.... :(

Is your CCF posted?

Have you 'learned' all of the IR codes into Girder? Is that even how you have to do it? Are those learned codes protable? I think that your codes would be compatible with my changer.

I would love to see your whole setup.

-Carl

Rob H
June 19th, 2004, 06:17 AM
Thanks

I've not posted the CCF yet as it's far from finished.

I'm not sure if there's a size limit in the gallery, but my CCF currently stands at 3.9 Mb, so I may have to upload it elsewhere and post a link to it.

Yes, I've learned the codes into Girder, but unless you have a RedRat3 they won't be portable. It shouldn't take too long to relearn the codes from your remote though.

QuickCarl
June 19th, 2004, 06:31 AM
Rob - I have the USB UIRT... is there a learning app built into girder?

I really would like to take a look at your CCF, finished or not, could help me get on the right track for my system. You could email it to me... I think my work address has no size limit... carlchapman @ dunwoodygroup.com

Rob H
June 19th, 2004, 06:58 AM
Let me get LDJ packaged up and some docs written - I'll try to do that this weekend

Mastiff
June 19th, 2004, 10:04 AM
Carl, it's not an app, you simply define every command, and then click on lear in the USB-UIRT plug-in. No problem, and very reliable. I have one macro that wakes my wife up at 06.45, and wakes me gradually from 07.25 to 08.00. I have never ever had the USB-UIRT skipping a beat (at least not from it's own accord - one time my wife tore out the cable by accident...).

Rob H
June 25th, 2004, 04:25 AM
I've not forgotten about this, I'm just trying to document everything and writing a proper installation script.

I'd forgotten just how much I hate writing documentation!

Ben S
June 25th, 2004, 08:59 PM
Here here, brother!

DaveS
July 13th, 2004, 02:57 AM
Rob, How's your LDJ coming along. I was kinda intrested in checking it out. Currently I'm using Gavin's last contribution to lualdj.

Dave

Rob H
July 13th, 2004, 03:48 AM
It's coming, I'm still trying to document it, but I'm also still tweaking it and trying to write a decent installer that makes it as painless as possible. I haven't had a chance to work on it for a few days though.

DaveS
July 14th, 2004, 02:58 AM
Installer? You mean I won't have to place a file over here and a file over there and click my heals together 3 times to get it to work?" That sounds great. Can't wait to see what ya got.

Dave

Rob H
July 14th, 2004, 05:08 AM
That's the theory - whether I can get it to work in practice is another matter :D

Unfortunately I don't think I can get Girder to enable the required plugins automatically.

I'm also having difficulty trying to find out whether IrfanView (needed for graphics conversion) is already installed since it doesn't use the registry and there also seems to be no standard way of downloading the latest version from the website. The best I can do there is to check in the Program Files directory (or equivalent) for the IrfanView directory. Although I suppose I could always search the disk if it's not found there.

Promixis
July 14th, 2004, 05:24 AM
Rob,

You can have Girder enable/load plugins either from an installer or from lua. Let me know how I can help.

Rob H
July 14th, 2004, 05:31 AM
An example of enabling a plugin from InnoSetup would be great, thanks Mike.

Promixis
July 14th, 2004, 05:39 AM
[code]

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=Girder Plugin
AppVerName=
DefaultDirName={code:GetGirderDir}
DisableDirPage=yes
DisableProgramGroupPage=yes
LicenseFile=Z:\Development\Inno Installation\Common Files\Girder Plugin Third Party End User License Agreement.rtf

Compression=lzma
SolidCompression=yes

[Files]
Source: ; DestDir: {app}\plugins; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

&#91;code&#93;


function GetGirderDir(Default: String): String;
var
s : string;
begin

if ( RegQueryStringValue(HKEY_LOCAL_MACHINE,'SOFTWARE\g irder3','Executable',s) = TRUE ) then
begin
Result := ExtractFileDir(s)+'\';
end
else
begin
Result:='';
end;

end;

function FindIESPlugin(): BOOLEAN;
var
i : string;
begin
i:= '';

if ( RegQueryBinaryValue(HKEY_LOCAL_MACHINE,'SOFTWARE\g irder3\Plugins','103',i) = TRUE ) then
begin
Result := TRUE;
end
else
begin
Result:=FALSE;
end;
MsgBox(i, mbInformation, MB_OK);

end;

function InitializeSetup(): Boolean;
var
Dir : string;
begin
Dir := GetGirderDir ('')
if Dir = '' then begin
end
else begin
Result := true;
end;

end;

procedure DeInitializeSetup();
var
FileName: String;
ErrorCode: Integer;
begin
// MsgBox('DONE', mbInformation, MB_OK);
end;



[Run]
Filename: {app}\girder.exe; Description: Girder Flags: nowait postinstall skipifsilent

[Registry]
Root: HKLM; Subkey: software\girder3\plugins; ValueType: dword; ValueName: 155; ValueData: 1&#91;/code&#93;

Rob H
July 14th, 2004, 06:06 AM
Thanks Mike, just a couple of questions :-

1) What are the magic numbers 103 and 155 in that example? I'm guessing that 103 is for Internet Event Server (I thought it was 203?) and 155 is the id for the plugin that's being installed.

2) FindIESPlugin doesn't seem to be called anywhere, is this taken from a larger install script?

Promixis
July 14th, 2004, 06:08 AM
1. The number is the plugin number.

2. Something I was playing with - I meant to take it out :)

Rob H
July 14th, 2004, 06:11 AM
What happens if Girder is running at the time? Will it pick up the registry change or does it require a restart?

Promixis
July 14th, 2004, 06:24 AM
Requires a restart to find new plugins.

danward79
July 17th, 2004, 12:45 AM
Hi

Sorry to "Butt in", but what is 'LDJ', and do you have a link to it's website?

Cheers

Dan

Mastiff
July 17th, 2004, 01:02 AM
No website, it's a combination of Girder and NetRemote used to select from a bunch of DVDs that are ripped to a harddisk.

Rob H
July 17th, 2004, 01:04 AM
LDJ is Lua DVD Jukebox - it's a Girder GML file and a LUA script originally written by Gavin Brock (brockgr).

There's no website so far as I know

danward79
July 17th, 2004, 01:10 AM
Hi

Thanks for that, why LDJ, what does it stand for?

This could be of interest to me then, I will have to 'Gen Up'

Cheers

Dan

avid
July 17th, 2004, 02:44 AM
why LDJ, what does it stand for?

LDJ is Lua DVD Jukebox

:? Brian

danward79
July 17th, 2004, 03:34 AM
Hi

It is so obvious when you find out!

:oops: :oops:

Dan