* Added first working "display_as" type "duration".

* Changed Media:Length to int64, and use the new duration view in Tracker.
* Renamed the pretty name for video's Media:Length to "Runtime" (that's how it's
  called in IMDB, and I was never really fond of "Playing Time").
* FileTypes AttributeWindow needed to check the display-as types, as well as
  if the contents are acceptable when opening, too.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38856 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-09-29 17:10:02 +00:00
parent 971b07a990
commit 954d79e244
7 changed files with 159 additions and 33 deletions
+4 -6
View File
@@ -2410,12 +2410,10 @@ MainWin::_UpdatePlaylistItemFile()
attr_info info;
status_t status = node.GetAttrInfo(kDurationAttrName, &info);
if (status != B_OK || info.size == 0) {
time_t duration = fController->TimeDuration() / 1000000L;
char text[256];
duration_to_string(duration, text, sizeof(text));
node.WriteAttr(kDurationAttrName, B_STRING_TYPE, 0, text,
strlen(text) + 1);
bigtime_t duration = fController->TimeDuration();
// TODO: Tracker does not seem to care about endian for scalar types
node.WriteAttr(kDurationAttrName, B_INT64_TYPE, 0, &duration,
sizeof(int64));
}
// Write audio bitrate