1
0
mirror of https://github.com/stonega/tsacdop synced 2024-12-12 16:39:04 +01:00
tsacdop-podcast-app-android/lib/webfeed/domain/rss_itunes.dart
stonegate 16567a7199 new file: lib/class/podcast_group.dart
modified:   lib/class/podcastlocal.dart
	modified:   lib/class/settingstate.dart
	modified:   lib/episodes/episodedetail.dart
	modified:   lib/episodes/episodedownload.dart
	modified:   lib/home/appbar/addpodcast.dart
	modified:   lib/home/appbar/popupmenu.dart
	modified:   lib/home/audio_player.dart
	modified:   lib/home/home.dart
	modified:   lib/home/homescroll.dart
	modified:   lib/home/hometab.dart
	new file:   lib/local_storage/key_value_storage.dart
	renamed:    lib/class/sqflite_localpodcast.dart -> lib/local_storage/sqflite_localpodcast.dart
	modified:   lib/main.dart
	modified:   lib/podcasts/podcastdetail.dart
	new file:   lib/podcasts/podcastgroup.dart
	modified:   lib/podcasts/podcastlist.dart
	modified:   lib/podcasts/podcastmanage.dart
	modified:   lib/util/episodegrid.dart
	modified:   lib/webfeed/domain/rss_item.dart
	modified:   lib/webfeed/domain/rss_itunes.dart
	modified:   pubspec.lock
	modified:   pubspec.yaml
Add podcast group support
Manage group with provider
2020-02-20 17:09:21 +08:00

71 lines
2.1 KiB
Dart

import '../util/helpers.dart';
import 'package:xml/xml.dart';
//import 'package:webfeed/util/helpers.dart';
import 'rss_itunes_category.dart';
import 'rss_itunes_image.dart';
import 'rss_itunes_owner.dart';
import 'rss_itunes_type.dart';
class RssItunes {
final String author;
final String summary;
final bool explicit;
final String title;
final String subtitle;
final RssItunesOwner owner;
final List<String> keywords;
final RssItunesImage image;
final List<RssItunesCategory> categories;
final RssItunesType type;
final String newFeedUrl;
final bool block;
final bool complete;
RssItunes({
this.author,
this.summary,
this.explicit,
this.title,
this.subtitle,
this.owner,
this.keywords,
this.image,
this.categories,
this.type,
this.newFeedUrl,
this.block,
this.complete,
});
factory RssItunes.parse(XmlElement element) {
if (element == null) {
return null;
}
return RssItunes(
author: findElementOrNull(element, "itunes:author")?.text?.trim(),
summary: findElementOrNull(element, "itunes:summary")?.text?.trim() ?? '',
explicit: parseBoolLiteral(element, "itunes:explicit"),
title: findElementOrNull(element, "itunes:title")?.text?.trim(),
// subtitle: findElementOrNull(element, "itunes:subtitle")?.text?.trim(),
//owner: RssItunesOwner.parse(findElementOrNull(element, "itunes:owner")),
// keywords: findElementOrNull(element, "itunes:keywords")
// ?.text
// ?.split(",")
// ?.map((keyword) => keyword.trim())
// ?.toList(),
image: RssItunesImage.parse(findElementOrNull(element, "itunes:image")),
// categories: findAllDirectElementsOrNull(element, "itunes:category")
// .map((ele) => RssItunesCategory.parse(ele))
// .toList(),
// type: newRssItunesType(findElementOrNull(element, "itunes:type")),
// newFeedUrl:
// findElementOrNull(element, "itunes:new-feed-url")?.text?.trim(),
// block: parseBoolLiteral(element, "itunes:block"),
// complete: parseBoolLiteral(element, "itunes:complete"),
);
}
}