[rygel/wip/dvd: 56/56] media-export: Support "exploded" DVDs
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/dvd: 56/56] media-export: Support "exploded" DVDs
- Date: Sun, 3 Jan 2016 11:59:02 +0000 (UTC)
commit 3d1d2da8af148192ea00ac1414a4e192075bb2d4
Author: Jens Georg <mail jensge org>
Date: Sun Jan 3 12:46:24 2016 +0100
media-export: Support "exploded" DVDs
Signed-off-by: Jens Georg <mail jensge org>
.../media-export/rygel-media-export-extract.vala | 8 +++++++-
.../rygel-media-export-harvesting-task.vala | 9 +++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-extract.vala
b/src/plugins/media-export/rygel-media-export-extract.vala
index 5964d99..41353fb 100644
--- a/src/plugins/media-export/rygel-media-export-extract.vala
+++ b/src/plugins/media-export/rygel-media-export-extract.vala
@@ -200,7 +200,8 @@ static async void extract_basic_information (File file,
FileInfo file_info;
try {
- file_info = yield file.query_info_async (FileAttribute.STANDARD_CONTENT_TYPE
+ file_info = yield file.query_info_async (FileAttribute.STANDARD_TYPE + "," +
+ FileAttribute.STANDARD_CONTENT_TYPE
+ "," +
FileAttribute.STANDARD_SIZE + "," +
FileAttribute.TIME_MODIFIED + "," +
@@ -219,6 +220,11 @@ static async void extract_basic_information (File file,
return;
}
+ if (file_info.get_file_type () == FileType.DIRECTORY) {
+ file_info.set_file_type (FileType.REGULAR);
+ file_info.set_content_type ("application/x-cd-image");
+ }
+
try {
send_extraction_done (file,
serializer.serialize (file, file_info, info, dlna));
diff --git a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
index 8d5b345..161ed07 100644
--- a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
+++ b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
@@ -185,6 +185,15 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
return false;
}
+
+ if (info.get_file_type () == FileType.DIRECTORY) {
+ // Check if we have an "exploded" DVD structure
+ if (file.get_child ("VIDEO_TS").query_exists ()) {
+ info.set_file_type (FileType.REGULAR);
+ info.set_content_type ("application/x-cd-image");
+ }
+ }
+
if (info.get_file_type () == FileType.DIRECTORY) {
// queue directory for processing later
this.monitor.add.begin (file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]