return this.channels.slice ((int) offset, (int) stop);
}
- public DVBChannel find_channel (string id) {
- DVBChannel channel = null;
+ public MediaObject find_object_by_id (string id) {
+ MediaObject channel = null;
foreach (var tmp in this.channels) {
if (tmp.id == id) {
channel = tmp;
return group;
}
- private DVBChannel find_channel_by_id (string id) throws GLib.Error {
- DVBChannel channel = null;
+ private MediaObject find_channel_by_id (string id) throws GLib.Error {
+ MediaObject channel = null;
foreach (DVBChannelGroup group in this.groups) {
- channel = group.find_channel (id);
+ channel = group.find_object_by_id (id);
if (channel != null) {
break;
}
var container = get_item_parent (object_id);
if (container != null)
- media_object = container.get_item_from_db (object_id);
+ media_object = container.find_object_by_id (object_id);
}
if (media_object == null) {
/* Iterate through all items */
for (uint i = 0; i < child_paths.length; i++) {
- MediaItem item = this.get_item_from_db (child_paths[i]);
+ MediaItem item = this.find_object_by_id (child_paths[i]);
children.add (item);
}
return category;
}
- public MediaItem get_item_from_db (string path) throws GLib.Error {
+ public MediaItem find_object_by_id (string id) throws GLib.Error {
MediaItem item;
+ string path = id;
if (this.child_class == MediaItem.VIDEO_CLASS) {
item = new TrackerVideoItem (path, path, this);