DB view Media library

You have a question or need an advice about how to do something? Ask it here!
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

radio42 wrote:So that looks like your table (on which is the view is based on) already violates some unique contrains.
Actually early versions of MySQL allowed NULL values to be present within 'primary key' or 'not-null' resp. multiple NULL values within 'unique' columns.

I assume the "dasaudio.PATH" column might be defined as 'unique' within your origin database table and as such has a unique-contraint on it?!

Currently ProppFrexx automatically uses those 'contraints' as defined in the underlying DB and assumes that they are 'valid' - which seems to be not the case for your table.

Let me prepare a new version of the Test-Application to see, if I can tackle around that problem...
actually, STEVILKa is unique column and primary key in original database from which view is based from.

and yes, the updated program works..it fetches data from the view propp

Code: Select all

Test started: 18.4.2012 23:04:16
The first 100 available rows will be tested...

Column 'ARTIST' = E TYPE (System.String)
Column 'TITLE' = CHAMPIONE (System.String)
Column 'LOCATION' = \\POSEIDON\DATA\hd01\m001\hd000001.wav (System.String)
Row 1 media entry found: Location='\\POSEIDON\DATA\hd01\m001\hd000001.wav', Trackname='E TYPE - CHAMPIONE', Duration='00:00:00'
Row 2 media entry found: Location='\\POSEIDON\DATA\hd01\m001\hd000014.wav', Trackname='BEATSTREET - HELA DI LADI LO', Duration='00:00:00'
Row 3 media entry found: Location='\\POSEIDON\DATA\hd01\m001\hd000021.wav', Trackname='KLF - LAST TRAIN TO TRANSCENTRAL', Duration='00:00:00'
Row 4 media entry found: Location='\\POSEIDON\DATA\hd01\m001\hd000038.wav', Trackname='THIN LIZZY - WHISKEY IN THE JAR', Duration='00:00:00'
just to try it, i renamed columns in original database and tested with your program..it works ok, but PFO does not fetch any data from it.

Code: Select all

Column 'ARTIST' =  (System.String)
Column 'TITLE' =  (System.String)
Column 'MOOD' =  (System.String)
Column 'ALBUM' =  (System.String)
Column 'LOCATION' = 1 (System.String)
Row 1 media entry found: Location='1', Trackname='1', Duration='00:00:00'
Row 2 media entry found: Location='\\poseidon\data\HD001\HD000001.wav', Trackname='STING - FRAGILIDAD', Duration='00:00:00'
Row 3 media entry found: Location='\\poseidon\data\HD001\HD000002.wav', Trackname='STING - WHEN WE DANCE', Duration='00:00:00'
Row 4 media entry found: Location='\\poseidon\data\HD001\HD000003.wav', Trackname='STING - IF YOU LOVE SOMEBODY SET THEM FREE', Duration='00:00:00'
Row 5 media entry found: Location='\\poseidon\data\HD001\HD000004.wav', Trackname='STING - FIELDS OF GOLD', Duration='00:00:00'
Row 6 media entry found: Location='\\poseidon\data\HD001\HD000005.wav', Trackname='STING - ALL THIS TIME', Duration='00:00:00'
this is the create code for original database:

Code: Select all

CREATE TABLE `dasaudio_1` (
	`STEVILKA` VARCHAR(30) NOT NULL DEFAULT '',
	`ARTIST` VARCHAR(60) NOT NULL DEFAULT '',
	`TITLE` VARCHAR(80) NOT NULL,
	`ZALOZBA` VARCHAR(40) NULL DEFAULT NULL,
	`AVTORJI_TEXT` VARCHAR(100) NOT NULL DEFAULT '',
	`AVTORJI` VARCHAR(100) NOT NULL DEFAULT '',
	`MOOD` VARCHAR(20) NOT NULL DEFAULT '',
	`RITEM` VARCHAR(20) NOT NULL DEFAULT '',
	`OCENA` VARCHAR(20) NOT NULL DEFAULT '',
	`DATUMVNOSA` DATE NOT NULL DEFAULT '2001-01-01',
	`MINUTAZA` INT(11) NOT NULL DEFAULT '0',
	`ALBUM` VARCHAR(80) NOT NULL DEFAULT '',
	`ZVRST` VARCHAR(20) NOT NULL DEFAULT '',
	`JEZIK` VARCHAR(20) NOT NULL DEFAULT '',
	`BPM` VARCHAR(10) NULL DEFAULT NULL,
	`SPEAKIN` VARCHAR(10) NULL DEFAULT NULL,
	`CUE` VARCHAR(10) NULL DEFAULT NULL,
	`SPEAKOUT` VARCHAR(10) NULL DEFAULT NULL,
	`LOCATION` VARCHAR(255) NULL DEFAULT NULL,
	`OPOMBE` VARCHAR(200) NULL DEFAULT NULL,
	`TEXTI` BLOB NULL,
	`FADE_IN` CHAR(11) NULL DEFAULT '0',
	`FADE_OUT` CHAR(11) NULL DEFAULT NULL,
	`OD` DATE NOT NULL DEFAULT '2001-01-01',
	`DO` DATE NOT NULL DEFAULT '2001-01-01',
	`LAST` DATETIME NOT NULL DEFAULT '2001-01-01 01:00:00',
	`LAST_2` DATETIME NOT NULL DEFAULT '2001-01-01 01:00:00',
	`MIXMODE` CHAR(11) NULL DEFAULT NULL,
	`CDPATH` VARCHAR(255) NOT NULL DEFAULT '',
	`LETNIK` VARCHAR(10) NOT NULL DEFAULT '',
	`RANDOMPAR` VARCHAR(60) NOT NULL DEFAULT 'X',
	`NEGATIVE` VARCHAR(40) NOT NULL DEFAULT '0000000000000000000000000000000000000',
	`USERINPUT` VARCHAR(20) NULL DEFAULT NULL,
	`ADVKAT` VARCHAR(200) NULL DEFAULT NULL,
	`RNDARTIST` DATETIME NOT NULL DEFAULT '2001-01-01 00:00:00',
	`RNDTITLE` DATETIME NOT NULL DEFAULT '2001-01-01 00:00:00',
	`LOOP_IN` INT(11) NULL DEFAULT '0',
	`LOOP_OUT` INT(11) NULL DEFAULT '0',
	`CDDBID` VARCHAR(30) NOT NULL DEFAULT '',
	`CDDBTRACK` INT(11) NOT NULL DEFAULT '0',
	PRIMARY KEY (`STEVILKA`),
	INDEX `STEVILKA` (`STEVILKA`),
	INDEX `IZVAJALEC` (`ARTIST`, `TITLE`),
	INDEX `NASLOV` (`TITLE`, `ARTIST`),
	INDEX `AVTORJI_TEXT` (`AVTORJI_TEXT`),
	INDEX `AVTORJI` (`AVTORJI`),
	INDEX `MOOD` (`MOOD`),
	INDEX `RITEM` (`RITEM`),
	INDEX `OCENA` (`OCENA`),
	INDEX `MINUTAZA` (`MINUTAZA`),
	INDEX `ALBUM` (`ALBUM`),
	INDEX `ZVRST` (`ZVRST`),
	INDEX `JEZIK` (`JEZIK`),
	INDEX `LETNIK` (`LETNIK`),
	INDEX `ZALOZBA` (`ZALOZBA`)
)
COLLATE='cp1250_general_ci'
ENGINE=InnoDB;
Last edited by dukedl on 18 Apr 2012 23:25, edited 1 time in total.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

OKi - whatsoever MySql is doing in the background with such your view....

I'll update those changes to ProppFrexx ONAIR - glad that we found it.
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

is it possible to create some kind of progress indicator or log viewer for media databases (file, database, database view, etc) beeing created (loaded with data)?

we will be probably using existing database (or view created from it) and it will be very usefull to have such indicator to see what is going on and if it is really working at all.

for now, i'm having trouble populating media library on win 7 64 bit (mysql 64bit, odbc 64 bit, but to create connection to use with PFO i used 32bit version, because it did not work with 64 bit odbc) from view..i just does not fetch data.
if i try it with the program you provided above, it looks everything ok.


do you know, why do i have on a another computer a yellow triangle in Media library, when i reopen PFO? Before i close it, i have library (db view) populated with data.

does the data not stay in library? PFO reloads the db media library every time it is started?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

a) ProppFrexx currently doesn't support any progress indicator for loading media lib - I might think about that!

b) You can (once a media lib is loaded show its (loaded) content) at any time by using a regular playlist window.
Just click on the arrow underneath the 'Open' icon in the main ribbon and select 'Media Libraries' from its sub-menu and the select your media lib you want to open.
This will open the media lib directly within a new playlist window.
As an alternative you might use the 'Find Window' to directly search for particular tracks.

c) ProppFrexx itself is a 32-bit application (optimized to be use on a 64-bit OS, which is recommend). The reason is, that there are still certain external libs (which ProppFrexx uses) which are not available as a 64-bit version (e.g. Velleman, IO-Warrior, VST2 and Winamp plugins).
That's why you must use the 32-bit ODBC setup dialog under a 64-bit OS (see here for details: http://support.microsoft.com/kb/942976/en-us)

d) A media library by itself is a reference to an existing structure:
- a Folder-based media lib points to a directory containing the audio files
- a playlist-based media lib points to playlist file keeping the the audio file references
- a database media lib points to a database table keeping the the audio file references
As such, ProppFrexx doesn't create an extra data-store to keep them! It 'simply' uses what is defined.
ProppFrexx ONAIR maintains all media libraries inside main memory! When a media library is (re)loaded all related entries are read in from the related source (of course only the reference location, TAG and meta data and NOT the physical audio file itself). Once loaded, the source isn’t touched during normal operation (access). A media library (with all its media entries) is (re)loaded into main memory:
  • initially when the Media Library is defined
  • at initial startup of ProppFrexx ONAIR (for all defined Media Libraries)
  • automatically at a certain time (if enabled/configured)
  • automatically when a Script is started (the list of libraries to reload can be specified)
  • automatically when the ‘AutoWatch’ feature is enabled (only available for playlist and folder based libraries) and the related source is changed externally
  • manually via a specific control-command
See here for further details: viewtopic.php?f=9&t=11

If initial loading takes too much time or is in any other repect not really 'wanted' - you can use the provided 'ProppFrexx MediaLibrary Server'.
The 'ProppFrexx MediaLibrary Server' tool is a pure 64-bit application which contains the same media-library management/definition capabilities as ProppFrexx ONAIR.
The main difference is, that it can be used as a separate application (even on a separate machine) - dedicated only to (re)loading media libs.
As such this 'ProppFrexx MediaLibrary Server' can be up and running 24/7 independent of ProppFrexx ONAIR.
From within ProppFrexx ONAIR you the use a so called 'Remote Media Library' - which is a logical link to a media lib defined on a 'ProppFrexx MediaLibrary Server'!
In addition it offers several other features, like automatic physical audio file transfer from the server to the client (e.g. if a certain audio file is not accessible from a ProppFrexx ONAIR client instance). However, the 'ProppFrexx MediaLibrary Server' is intended for LAN use only and requires a fast local network in such case!

As an alternative, you might once create a database media library and once loaded, 'export' this to a .pfp playlist based media lib.
Once exported you might then remove your database media library and use the playlist based media lib instead.
Note, that playlist based media libs almost load instantly as no 'slow' database connect is involved to load the content.
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

hi, thank you for your time and help

i tried with Media Library Server, bit PFO does not connect to it. I tried with ip, computer name, localhost, 127.0.0.1..nothing works..changed the port number, restarted the service...

Image

the program has opened the tcp/ip connection, but that is all
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

You also need to specify a Password in Pf OnAir.
Use the same password as specified in the MediaLibrary Server configuration!
Also make sure that no Firewall is blocking any traffic on your given port 9000. Eg. some firewalls (like Norton Security) do automatically block such ports.

Plus you must select a MediaLib to use on that server. Click on the '...' button to select one.
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

still no luck

Image

i disabled my gateway and dns, because i thought router is giving me trouble..but i tried also 127.0.0.1, localhost...nothing works
i have installed nod32 on my machine, i disabled realtime, email and web protection..still no connection

Image

media library is loaded:
Loaded Media Libraries: 1

Library: baza
C:\propp\baza.pfp
AutoSave: True, Is Additional: True
Tracks: 249071, Auto Watch: False, Sorted: False
Total Duration: 445.3:15:11
Average Duration: 2:34
Last Access: 25.4.2012 15:27:59, Last Refresh: 25.4.2012 15:10:10
Loading Duration: 00:00:45.3752904
History: 100 (0), Hits: 0 (0)
any suggestion?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

As explained above, from you above screenshot I can not see, that you have selected a 'Media Library'!
So beside specifying a 'Host and Port' as well as the 'Password' in the 'Remote Media Library' dialog (as shown above) you must also select one of the media libraries which you have defined on your 'Media Library Server'.
So just click on the '...' button next to the field 'Media Library' and select one.
In your case you must select 'baza' there.
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

i would, but PFO sasy the connection is not valid (the connection has to be made, before the remote library can be even selected), so i cannot select "baza" library or any library for that matter on media server.

Post Reply