Welcome, Guest
Please Login or Register.    Lost Password?

Matching table result to a second table
(1 viewing) (1) Guest
Go to bottomPage: 12345
TOPIC: Matching table result to a second table
#20882
Re:Matching table result to a second table 6 Months, 4 Weeks ago  
Nilfred wrote:
I still can't find where dirtree() is defined, but better I ask You for the output of dirtree() and work from there. As You defined A and B in your first post.

The dirtree() is used in the helpers.lua file on app folder, not user folder. It requires lfs (LuaFileSystem)
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#20883
Re:Matching table result to a second table 6 Months, 4 Weeks ago  
Anoob thank you again for your help, but I cannot seem to find what else is causing the problem. That is not my biggest worry though, I found a bigger problem that may make the whole project a waste of time.

Nilfred, "dirtree" is not defined anywhere specifically. It is short for directory tree. (Easier to figure out if English is your first language.) I did not write this remember, I am modifying the photo widget.
One of the bugs I discovered with this is that it will read every file in the folder, then proceed to read EVERY file in EVERY subfolder. It searches the whole tree folder structure for every single file. It is very agressive and annoying. I'm currently trying to decide how to change the code to stop that.

That is not my biggest problem though. I worked on the widget until I made it look almost like the finished product I wanted, then I tested it with my movie folder which has 115 movies. Rainlender choked and froze for several seconds. (It works fine with only a few files.)

It's taking about 10 seconds to create the tables for so many entries, but the bigger problem is that it freezes when it's trying to display the pictures (215 x 315 pixels, picture of dvd cover).

I have it set to show 18 boxes (6 x 3), it takes about 30 seconds to complete loading each picture one by one, and another 30 seconds every time I switch page. This has discouraged me because the whole point of this widget was so that it could organize large movie directories. I was hoping to organize my tv show collection as well, but thats over 2000 files.

Now I know why microsoft uses caches to store thumbnails. So right now I'm experimenting, trying to think of ways to make the code more efficient. I will try to use parts of the code you posted to fix tables, even if it still looks a little confusing to me, and I have some other ideas too, but I think I may have to start over.

And I think in the end, trying to display so many pictures quickly may not be something I can achieve.

(But I am very stubborn and I will keep trying for the next few weeks.)
SereneSavage
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Female Location: Canada
The administrator has disabled public write access.
 
#20884
Re:Matching table result to a second table 6 Months, 4 Weeks ago  
Jorge_Luis, thank you for that link!!!

(You posted while I was writing my last post.)
SereneSavage
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Female Location: Canada
The administrator has disabled public write access.
 
#20885
Re:Matching table result to a second table 6 Months, 4 Weeks ago  
Jorge_Luis wrote:
The dirtree() is used in the helpers.lua file on app folder, not user folder. It requires lfs (LuaFileSystem)
I already install lfs and I did search up and down:
Code:

sudo apt-get install liblua5.1-filesystem0
find / -name *.lua 2> /dev/null


Now I got it!
Code:

which rainlendar2
/usr/bin/rainlendar2
ls -l /usr/bin/rainlendar2
lrwxrwxrwx 1 root root 32 mar 15 18:23 /usr/bin/rainlendar2 -> /usr/lib/rainlendar2/rainlendar2
ls /usr/lib/rainlendar2/
Changes.txt  locale   rainlendar2      resources  skins
lfs.so       plugins  rainlendar2.htb  scripts
ls /usr/lib/rainlendar2/scripts/
alarm.lua  calendars.lua   events.lua   Holidays.lua  months.lua
Banks.lua  components.lua  helpers.lua  hotkeys.lua   windows.lua
find /usr/lib/rainlendar2/scripts/ -name *.lua 2> /dev/null
find /usr/lib/rainlendar2/scripts/ -name *.lua
find /usr/lib/rainlendar2/scripts/ -name *lua
find /usr/lib/rainlendar2/ -name help*
/usr/lib/rainlendar2/scripts/helpers.lua
find /usr/lib/rainlendar2/scripts/ -name '*.lua'
/usr/lib/rainlendar2/scripts/hotkeys.lua
/usr/lib/rainlendar2/scripts/alarm.lua
/usr/lib/rainlendar2/scripts/months.lua
/usr/lib/rainlendar2/scripts/Banks.lua
/usr/lib/rainlendar2/scripts/helpers.lua
/usr/lib/rainlendar2/scripts/components.lua
/usr/lib/rainlendar2/scripts/windows.lua
/usr/lib/rainlendar2/scripts/Holidays.lua
/usr/lib/rainlendar2/scripts/calendars.lua
/usr/lib/rainlendar2/scripts/events.lua


There was a bug in my find expression
Thank you very much!
Nilfred
Junior Boarder
Posts: 23
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Argentina
The administrator has disabled public write access.
 
#20961
Re:Matching table result to a second table 6 Months, 2 Weeks ago  
Update: It turns out I'm more stubborn than I expected. I have a working window now. Here is the whole skin because I do not know how to turn it into a widget or to make it installable. It needs to be looked at by a professional, because even after all this, I *still* consider myself as not knowing Lua.

It works quickly now. The time delay issues I experienced before were due to the photo widget timer trying to fire 18 times.

It is finished as far as movies go, but I plan to write a tv show portion (I am trying to decide on the design now) and add that later.

Known issues:
1. If you point the movie folder to something with a mix of different files, it will treat all files as movies (pictures, documents, exe files, whatever) and list them as movie titles. I could fix that but there are so many different extensions for actual movie files (.divx, .mkv, .flv, .mov, .avi, .mpg, .mp4, etc) that I worry I'd leave something out. So for now, just make sure your folder only contains movies, and that there are no subfolders (or it will search those too).

2. Same thing with the pictures folder. But here if the picture filename does not match exactly with the movie filename (not including extensions), the file will be ignored.

3. As far as I know, it cannot list any filename containing special characters. (I found and fixed the apostrophe issue, files can now contain apostrophes.) You can test it by using any movie and any picture as long as the filenames match. I found the best pictures to use are dvd covers from the IMDb website.


Things I need help with:
1. I took out the timer because I didnt need it. I don't know if the "OnPowerResume" fuction will now run correctly.

2. I have toggle windows. Is there a way to make it so that you can move the screen position of one window while the other stays in the same place?
Also, my toggle windows sometimes don't work if Rainlendar is focusing on another window (such as the weather widget). I cannot seem to figure out how to fix this.

Thoughts?


Edit: the zip file is too big to upload because I used the all languages Shadow4 skin. Working to resolve this now.
SereneSavage
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Female Location: Canada
Last Edit: 2014/04/02 15:00 By SereneSavage.
The administrator has disabled public write access.
 
#20962
Re:Matching table result to a second table 6 Months, 2 Weeks ago  
File Attachment:
File Name: Shadow4Movies-86de8feea619b2d4bd0f907d7e94a7e5.zip
File Size: 463845
SereneSavage
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Female Location: Canada
Last Edit: 2014/04/02 15:20 By SereneSavage.
The administrator has disabled public write access.
 
Go to topPage: 12345
get the latest posts directly to your desktop