summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2018-10-18 09:54:07 +0200
committerJens Georg <mail@jensge.org>2018-10-18 10:47:27 +0200
commit93eb81bf57513c28e1790a4987987d47c8cbe4fa (patch)
tree7e92423d956589f5be2d42878ba3f9abea9a5a56
parent96931eee072182687793a0461e8989d8abd443ad (diff)
downloadrygel-93eb81bf57513c28e1790a4987987d47c8cbe4fa.tar.gz
media-export: Remove dead code
It was left over from 15bdb67cd357e018caa7555065c80fe7be1b828a
-rw-r--r--src/plugins/media-export/rygel-media-export-item-factory.vala122
1 files changed, 0 insertions, 122 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 f8109be3..ecce1681 100644
--- a/src/plugins/media-export/rygel-media-export-item-factory.vala
+++ b/src/plugins/media-export/rygel-media-export-item-factory.vala
@@ -182,126 +182,4 @@ namespace Rygel.MediaExport.ItemFactory {
return item as MediaFileItem;
}
-
- private static void apply_meta_data (MediaFileItem item, Variant v)
- throws Error {
- ItemFactory.check_variant_type (v, "(msmsmsiii)");
-
- var it = v.iterator ();
- var val = it.next_value ().get_maybe ();
- item.artist = val == null ? null : val.dup_string ();
-
- // Audio item
- val = it.next_value ().get_maybe (); // album
- var album = val == null ? null : val.dup_string ();
-
- val = it.next_value ().get_maybe ();
- item.genre = val == null ? null : val.dup_string ();
-
- // Audio item
- var disc = it.next_value ().get_int32 ();
-
- if (item is AudioItem) {
- var audio_item = item as AudioItem;
- var track_number = it.next_value ().get_int32 ();
- audio_item.bitrate = it.next_value ().get_int32 ();
- audio_item.album = album;
-
- if (item is MusicItem) {
- var music_item = item as MusicItem;
- music_item.disc = disc;
- music_item.track_number = track_number;
- }
- }
- }
-
- private static void apply_video_info (MediaFileItem item, Variant v)
- throws Error {
- ItemFactory.check_variant_type (v, "(iii)");
-
- if (!(item is VisualItem)) {
- var msg = "UPnP class does not match supplied meta data";
- throw new ItemFactoryError.MISMATCH (msg);
- }
-
- var visual_item = item as VisualItem;
- var it = v.iterator ();
- visual_item.width = it.next_value ().get_int32 ();
- visual_item.height = it.next_value ().get_int32 ();
- visual_item.color_depth = it.next_value ().get_int32 ();
- }
-
- private static void apply_audio_info (MediaFileItem item, Variant v)
- throws Error {
- ItemFactory.check_variant_type (v, "(ii)");
-
- if (!(item is AudioItem)) {
- var msg = "UPnP class does not match supplied meta data";
- throw new ItemFactoryError.MISMATCH (msg);
- }
-
- var audio_item = item as AudioItem;
- var it = v.iterator ();
- audio_item.channels = it.next_value ().get_int32 ();
- audio_item.sample_freq = it.next_value ().get_int32 ();
- }
-
- private static void apply_info (MediaFileItem item, Variant v)
- throws Error {
- ItemFactory.check_variant_type (v, "(msmsi)");
-
- var it = v.iterator ();
- var val = it.next_value ().get_maybe ();
- if (val != null) {
- item.title = val.dup_string ();
- }
-
- val = it.next_value ().get_maybe ();
- if (val != null) {
- item.date = val.dup_string ();
- }
-
- if (item is AudioItem) {
- (item as AudioItem).duration = it.next_value ().get_int32 ();
- }
- }
-
- private static void apply_dlna_profile (MediaFileItem item, Variant v)
- throws Error {
- ItemFactory.check_variant_type (v, "(ss)");
-
- var it = v.iterator ();
- item.dlna_profile = it.next_value ().dup_string ();
- item.mime_type = it.next_value ().dup_string ();
- }
-
- private static void apply_file_info (MediaObject object, Variant v)
- throws Error {
- ItemFactory.check_variant_type (v, "(stst)");
-
- var it = v.iterator ();
-
- var display_name = it.next_value ();
- if (object.title == null || object.title == "") {
- object.title = display_name.dup_string ();
- }
-
- object.modified = (int64) it.next_value ().get_uint64 ();
-
- if (object is MediaFileItem) {
- var item = object as MediaFileItem;
-
- var mime = it.next_value ();
- if (item.mime_type == null) {
- item.mime_type = mime.dup_string ();
- }
-
- if (item.date == null) {
- TimeVal tv = { (long) item.modified, 0 };
- item.date = tv.to_iso8601 ();
- }
- item.size = (int64) it.next_value ().get_uint64 ();
- }
- }
-
}