Author Topic: Offline Scantool (for X2 models)  (Read 33396 times)

Offline Unreal

  • B8a Tester - X2
  • Experienced Member
  • ****
  • Posts: 228
  • Helpful Contribution Status: +1/-0
    • UnrealRG Home Page
Re: Offline Scantool
« Reply #30 on: April 12, 2012, 04:22:15 pm »
On the Mede8er, I go to the Media Library and browse to the directory that contains Lupos_Test but do not change into it.  I then click Menu and choose to Scan Folder and it correctly creates the Mede8er.db file in the Lupos_Test directory.  You can see from the files I uploaded how I used your scan tool, where it uses the same directory (H:\Lupos_Test).  This is an external USB drive, and I physically moved it between the systems to eliminate any potential network issues.
MED450X2 with PCIe Wireless                                 Firmware 3.0.2, NAS off, DLNA DMR&DMS enabled
Samsung LED HDTV (UN46C6300)                           Windows 7 Enterprise x64 SP1
Samsung USB Drives [2x2TB] (HX-DT020EB/B62)      Asus RT-N66U Router (FW 3.0.0.4.260)
Analog audio output to Pioneer Receiver (VSX-516)   HDMI audio output to HDTV

Offline Lupissimo

  • Senior Member
  • ***
  • Posts: 386
  • Helpful Contribution Status: +4/-0
Re: Offline Scantool
« Reply #31 on: April 12, 2012, 04:35:38 pm »
I am trying to follow you! But??
I have defined a harddrive (G:) on my NAS as a Favorite or a folder on that drive as a Favorite, which I scan with the mede8er. Than I do the same from the PC ( for the drive by using G:\ or for the Folder by using G:\Foldername as the starting directory. For the first the db is written dircetly to the drive G:\mde8er.db and for the second it is G:\Foldername\mede8er.db

Offline Unreal

  • B8a Tester - X2
  • Experienced Member
  • ****
  • Posts: 228
  • Helpful Contribution Status: +1/-0
    • UnrealRG Home Page
Re: Offline Scantool
« Reply #32 on: April 12, 2012, 05:15:52 pm »
I use multiple dbs on a single drive.  For example, I have a Mede8er.db under USB2\Movies, USB2\Concerts, and USB2\TV_Shows.  I do not have a Mede8er.db in the root directory of USB2, but have separate ones under some directories (but not all directories).  For this test, I created a new directory named Lupos_Test, copied two movies to it (along with the about.jpg, folder.jpg, and movie.xml files), then used the Mede8er to scan the new directory and create a new Mede8er.db file under the USB2\Lupos_Test directory.  I then moved the drive to my PC and mounted it as H:.  In the H:\Lupos_Test directory I renamed the Mede8er.db to Mede8er_lupos.db, then ran your scanner to create a new Mede8er.db at H:\Lupos_Test.  I had to specify H:\Lupos_Test because I do not want a Mede8er.db at H:\Mede8er.db.  However, it appears your scanner tool includes the PATH with the folder name, but the Mede8er does not do this...the Mede8er uses only the actual directory name without the PATH.  I hope that helps.
MED450X2 with PCIe Wireless                                 Firmware 3.0.2, NAS off, DLNA DMR&DMS enabled
Samsung LED HDTV (UN46C6300)                           Windows 7 Enterprise x64 SP1
Samsung USB Drives [2x2TB] (HX-DT020EB/B62)      Asus RT-N66U Router (FW 3.0.0.4.260)
Analog audio output to Pioneer Receiver (VSX-516)   HDMI audio output to HDTV

Offline Lupissimo

  • Senior Member
  • ***
  • Posts: 386
  • Helpful Contribution Status: +4/-0
Re: Offline Scantool
« Reply #33 on: April 12, 2012, 07:22:12 pm »
I have tried to reconstruct your situation:
Using an USB stick I put 2 directories on : Dir1 (3 films) and DirwithsubDir (Dir1+ 1 film)
On the medeer I could only scan Dir1 and separately DirwithsubDir.
On the PC I scanned : F:\Dir1     and separately   F:\DirwithsubDir

The created mede8er.db s are IDENTICAL and the mede8er.db are respective directory. Only if I scan F:\   I get the dir1 in the foldername and therefore a wrong hashcode.

Could you please verify this to be sure.  Attached are the tests.
« Last Edit: April 12, 2012, 07:27:56 pm by Lupissimo »

Offline Unreal

  • B8a Tester - X2
  • Experienced Member
  • ****
  • Posts: 228
  • Helpful Contribution Status: +1/-0
    • UnrealRG Home Page
Re: Offline Scantool
« Reply #34 on: April 12, 2012, 09:19:58 pm »
Lupissimo, I can see in the db files you provided in your last post that they are not identical.  Take a look at the Folder column in the <PCscan>/Dir1/Mede8er.db compared to <Mede8erScan>/Dir1/Mede8er.db.

In the scan done by the Mede8er, the Folder column does NOT include "Dir1/".
In the scan done by your scanner, the Folder column DOES include "Dir1/".

You need to make sure that when writing out the Folder column, you always only use the last directory name.  For example, given the file...

Z:/Lupos Test/Folder Name/Movie Name.mkv

...you need to make sure when writing the Folder column to Mede8er.db that you only write "Folder Name", and NOT "Lupos Test/Folder Name".  In this scenario, your INI file would contain...

Quelle = "Z:\Lupos Test\"

...but the Folder column written to Mede8er.db would never contain "Lupos Test", only "Folder Name".

Hope that clears things up.
MED450X2 with PCIe Wireless                                 Firmware 3.0.2, NAS off, DLNA DMR&DMS enabled
Samsung LED HDTV (UN46C6300)                           Windows 7 Enterprise x64 SP1
Samsung USB Drives [2x2TB] (HX-DT020EB/B62)      Asus RT-N66U Router (FW 3.0.0.4.260)
Analog audio output to Pioneer Receiver (VSX-516)   HDMI audio output to HDTV

Offline mognons

  • B8a Tester - 1000X3D
  • Experienced Member
  • ****
  • Posts: 209
  • Helpful Contribution Status: +0/-0
  • printf("Hello, world! \n");
    • myrtaART: Applications, Resources and Tools
Re: Offline Scantool
« Reply #35 on: April 12, 2012, 09:44:21 pm »
Since you're talkin' about hash code and the column "Folder", I have any issue that I would like to share with you: my scanner works pretty well, producing identical data compared to those dbs produced by my mede8er 400X2 (genres included), except for those folder where some diacritic is present in the file/folder name. Unfortunately accents are often used in my own language (i.e. Italian) and I don't want to rename all these "faulty" folder to remove diacritic.
I'm pretty sure that the problem lies in a different charset between my Mac OSX Lion and the linux-based mede8er firmware.
Could someone please state which charset is used by mede8er? In the meanwhile I'll check if there's a chance to work with a different charset (or code page) within my own scanner.

Thanks,
mognons
Mede8er 1000X3D, Onkyo HT-R390, LG 47LW570G (3D, DTT+SAT, LED Local dimming), LG BD-660 (Bluray 3D player), Apple TV (3rd gen.)
Proud user of DuneX2Mede8er

Offline Lupissimo

  • Senior Member
  • ***
  • Posts: 386
  • Helpful Contribution Status: +4/-0
Re: Offline Scantool
« Reply #36 on: April 13, 2012, 05:37:47 am »
 @ Unreal   ??? :'( You are right. It was too late last night. We will look into that!

Offline mognons

  • B8a Tester - 1000X3D
  • Experienced Member
  • ****
  • Posts: 209
  • Helpful Contribution Status: +0/-0
  • printf("Hello, world! \n");
    • myrtaART: Applications, Resources and Tools
Re: Offline Scantool
« Reply #37 on: April 13, 2012, 06:56:00 am »
meanwhile... it was really an UTF coding problem: mede8er uses "combined character" while Applescript uses two-byte definition for diacritics. Both are legit methods but, of course, results in different hash codes.

With a few line of Phyton (and thank to its module "unicodedata"), I was able to transcode on the fly between AS and mede8er, getting a fully working mede8er.db(s) from my database.

Next step: put the three modules (scan and build, export to XL and create mede8er.db) into one single batch script and, eventually, a GUI driven application.

A few words on movie ratings: while the mede9er database stores rating as an integer of base 5, the jukebox interface display the decimal base 10 rating taken straight from the movie XML as a number while showing stars on a 5 item sale... Coherence is not applied here  :)
Mede8er 1000X3D, Onkyo HT-R390, LG 47LW570G (3D, DTT+SAT, LED Local dimming), LG BD-660 (Bluray 3D player), Apple TV (3rd gen.)
Proud user of DuneX2Mede8er

Offline jer1956

  • Global Moder8or
  • M8er Addict
  • *****
  • Posts: 17 222
  • Helpful Contribution Status: +192/-53
Re: Offline Scantool
« Reply #38 on: April 13, 2012, 08:53:00 am »
This is interesting stuff. It's gone well beyond a Feature Request. So I will move it to General Discussion.  

You have now realised that the media locations in the databse are relative to where the databse is located. This means you can move scanned jukeboxes around without rescanning if you move the database as well, but it does make integrating db's a problem.  

Offline mognons

  • B8a Tester - 1000X3D
  • Experienced Member
  • ****
  • Posts: 209
  • Helpful Contribution Status: +0/-0
  • printf("Hello, world! \n");
    • myrtaART: Applications, Resources and Tools
Re: Offline Scantool
« Reply #39 on: April 13, 2012, 01:11:27 pm »
I would love a feature like "integrating" dbs!!!
Don't know a lot about the linux FS powering the mede8er, but I think that an educated guess at using sum links could be an answer to this kind of request.

Knowing mount points, we could try out cheating a little bit with the folder column:
what if I change the "subfolder/moviefolder" string into something like "smb://user:password@someservonthenet" or "/net/volumeName/posix-path-to-moviefolder" ? It would be easier knowing something about the inner secrets of the firmware...



Edit: typos... sum instead of sym (for symbolic). Safari feature: autocorrection while typing in a form... Bah...
« Last Edit: April 13, 2012, 09:23:36 pm by mognons »
Mede8er 1000X3D, Onkyo HT-R390, LG 47LW570G (3D, DTT+SAT, LED Local dimming), LG BD-660 (Bluray 3D player), Apple TV (3rd gen.)
Proud user of DuneX2Mede8er

Offline jer1956

  • Global Moder8or
  • M8er Addict
  • *****
  • Posts: 17 222
  • Helpful Contribution Status: +192/-53
Re: Offline Scantool
« Reply #40 on: April 13, 2012, 01:34:43 pm »
The code is written to match the scanning...so it expects relative file locations. Substituting absolute file locations is not likely to force a change..just a crash or reboot.

Offline Skylinc

  • B8a Tester - 1000X3D
  • Hero Member
  • ****
  • Posts: 519
  • Helpful Contribution Status: +2/-0
Re: Offline Scantool
« Reply #41 on: April 13, 2012, 07:11:17 pm »
The code is written to match the scanning...so it expects relative file locations. Substituting absolute file locations is not likely to force a change..just a crash or reboot.

I wonder if I should put this as a feature request. It would be awesome to use absolute paths :D
Product: Mede8er MED1000X3D f/w v2.0.0 (5Feb2013)
Audio: HDMI > LG 42LW4500
Audio setting: HDMI Passthrough / Night mode Comfort
Video: HDMI output > LG 42" LED Cinema3D 42LW4500
Video setting: 1080p 50Hz, 23Hz ON,16:9
Media Source: Wired Network > Win 8 Professional SMB shares, OpenMediaVault Shares
Hard Drive: 2TB Western Digital

Offline jer1956

  • Global Moder8or
  • M8er Addict
  • *****
  • Posts: 17 222
  • Helpful Contribution Status: +192/-53
Re: Offline Scantool
« Reply #42 on: April 13, 2012, 07:52:39 pm »
My preference would be to keep realtive..and and store the location of each  database.  Then the code could check if a database was present..and if not..all it's contents would be ignored becuase it couldn't be accessed.  A single absolute database would have to check entry by entry if the media was actually on line...and the gui is slow enough as it is.


So what you would have is a Master Database , of databases, using Absolute locations for each relative database.


P.S. you  could have a hybrid...where the Master Databse point to media via the realtive databases. That way, when a databses was offline...you would still have the media in the main databse..but it would be flagged as offline. It would be far quicker to just confirm which databases where avaialbe on boot...than wait to search file by file later.

This is when you then need more options...becuase some would find being told the media exists, but is offline, helpful..whilst to others it would spoil the eye candy.
« Last Edit: April 13, 2012, 08:06:28 pm by jer1956 »

Offline Skylinc

  • B8a Tester - 1000X3D
  • Hero Member
  • ****
  • Posts: 519
  • Helpful Contribution Status: +2/-0
Re: Offline Scantool
« Reply #43 on: April 13, 2012, 08:41:13 pm »
P.S. you  could have a hybrid...where the Master Databse point to media via the realtive databases. That way, when a databses was offline...you would still have the media in the main databse..but it would be flagged as offline. It would be far quicker to just confirm which databases where avaialbe on boot...than wait to search file by file later.

This is when you then need more options...becuase some would find being told the media exists, but is offline, helpful..whilst to others it would spoil the eye candy.

+1 for this idea instead :)
The only problem is that if a file is offline (even though you have all the media info in the db) how would you display the thumbnails? All you would be able to do, is search for those file...

PS. Sorry for stealing the topic.  :-[
Product: Mede8er MED1000X3D f/w v2.0.0 (5Feb2013)
Audio: HDMI > LG 42LW4500
Audio setting: HDMI Passthrough / Night mode Comfort
Video: HDMI output > LG 42" LED Cinema3D 42LW4500
Video setting: 1080p 50Hz, 23Hz ON,16:9
Media Source: Wired Network > Win 8 Professional SMB shares, OpenMediaVault Shares
Hard Drive: 2TB Western Digital

Offline Lupissimo

  • Senior Member
  • ***
  • Posts: 386
  • Helpful Contribution Status: +4/-0
Re: Offline Scantool
« Reply #44 on: April 13, 2012, 08:50:58 pm »
In the meantime we have redesigned  and corrected our scantool:
1. Allowed for the Y2m xml format ( this needs to be verified by more data, I only had 2 xmls from Unreal)
    Genre and Rating should be parsed correctly now.
2. Corrected the Foldername for the top directory ( omitted the entry of the directory name) .
     As I only use root segments for Favorites this went unnoticed up to now.

The Scantool is attached including a brief explanation.