[rygel] media-export: Try to make nice titles for videos
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Try to make nice titles for videos
- Date: Sun, 14 Feb 2016 18:53:02 +0000 (UTC)
commit 50dade8f8af032427bee76abaf0038a0911dc31b
Author: Jens Georg <mail jensge org>
Date: Sun Feb 14 09:11:16 2016 +0100
media-export: Try to make nice titles for videos
Signed-off-by: Jens Georg <mail jensge org>
.../rygel-media-export-item-factory.vala | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-item-factory.vala
b/src/plugins/media-export/rygel-media-export-item-factory.vala
index 2acd9f1..d0ad323 100644
--- a/src/plugins/media-export/rygel-media-export-item-factory.vala
+++ b/src/plugins/media-export/rygel-media-export-item-factory.vala
@@ -226,8 +226,21 @@ namespace Rygel.MediaExport.ItemFactory {
apply_info (item, info);
}
+ var strip_title = item.title == null || item.title == "";
+
if (file_info != null) {
apply_file_info (item, file_info);
+
+ // If AVI, don't trust the meta-data as it is not easily
+ // modifiable
+ if (item.mime_type == "video/x-msvideo") {
+ item.title = "";
+ apply_file_info (item, file_info);
+ }
+
+ if (strip_title) {
+ item.title = strip_invalid_entities (item.title);
+ }
}
if (audio_info != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]