LinuxMCE Forums
May 22, 2013, 01:11:54 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Media File Size/Duration  (Read 785 times)
lon22
Veteran
***
Posts: 85


View Profile
« on: April 05, 2008, 08:47:14 pm »

Does anyone know if there is a field somewhere in a LMCE table that has the duration of a related media file? Basiclly a field that says media X is xx:xx:xx in duration.

I didn't see ay field as such in pluto_media.

thanks

lon22
Logged
royw
Guru
****
Posts: 261


View Profile
« Reply #1 on: April 06, 2008, 02:06:09 am »

PlutoMedia.PlaylistEntry.Duration is probably not what you are looking for.

I'd guess the attribute "Run Time".

>> PlutoMedia::AttributeType.find(:all).collect{|c| [c.id, c.Description]}.uniq.each {|a| puts a.join(' ')}
1 Director
2 Performer
3 Album
5 Track
6 ASIN
7 CDDB
8 Genre
9 Ref #
10 Channel
11 Episode
12 Program
13 Title
14 Disc ID
15 Conductor
16 Composer/Writer
17 Studio
18 Rating
19 Release Date
20 Website
21 Chapter
22 Encoding
23 Format
24 Aspect Ratio(s)
25 Audio Encoding
26 Rated
27 DVD Release Date
28 Run Time
29 Keyword
30 Screen Saver For MD
31 Format
32 Region
33 Language
34 Aspect Ratio
35 Number of Discs
36 IMDB
37 Synopsis
38 Producer
39 Executive Producer
40 Purchase Info
41 TV Channel ID
42 TV Program ID
43 TV Series ID
44 Creation Date
45 THX Disk ID

HTH,
Roy

Logged

lon22
Veteran
***
Posts: 85


View Profile
« Reply #2 on: April 06, 2008, 09:32:55 pm »

roy,

It doesn't look like the attribute type run time is used for any media in the file attribute table. I would like to get the apprx runtime of a media file.

lon22
Logged
royw
Guru
****
Posts: 261


View Profile
« Reply #3 on: April 08, 2008, 09:57:06 pm »

Howdy,

As far as I can tell, the duration is not stored in the database.  You might have to query the id3 data directly from the file.

Here's a database dump of one of my mp3 files for 0710 beta 3:

  http://roy.wright.org/linuxmce/553.dump

The dump finds all associations for the selected record and then only the belongs_to (has a reference id column) associations of child records.

HTH,
Roy
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!