mirror of
https://github.com/stonega/tsacdop
synced 2025-02-09 08:08:46 +01:00
Minor change.
This commit is contained in:
parent
5dcdba41cd
commit
fa883a4722
@ -10,8 +10,6 @@ Release date 2020/10/1
|
||||
* Option to hide podcast discovery in search page.
|
||||
* Italian translation support, thanks Edoardo.
|
||||
|
||||
|
||||
|
||||
### Bug fixed
|
||||
|
||||
* Mark all listened error.
|
||||
@ -217,13 +215,13 @@ Release date 2020/7/16
|
||||
|
||||
## New features
|
||||
|
||||
* OMPL backup file supports group.
|
||||
* OPML backup file supports group.
|
||||
* Add settings backup and restore.
|
||||
* Enable R8 and dart obfuscate.
|
||||
|
||||
## Bugs fixed
|
||||
|
||||
* OMPL import not shown in group.
|
||||
* OPML import not shown in group.
|
||||
|
||||
## Minor UI change
|
||||
|
||||
|
@ -22,7 +22,7 @@ The podcast search engine is powered by [ListenNotes](https://listennotes.com).
|
||||
* Podcast group management
|
||||
* Playlist support
|
||||
* Sleep timer / speed setting
|
||||
* OMPL file export and import
|
||||
* OPML file export and import
|
||||
* Auto syncing in background
|
||||
* Listening and subscription history record
|
||||
* Dark mode / accent color
|
||||
|
@ -58,7 +58,7 @@ class _PopupMenuState extends State<PopupMenu> {
|
||||
var file = File(path);
|
||||
try {
|
||||
final opml = file.readAsStringSync();
|
||||
Map<String, List<OmplOutline>> data = PodcastsBackup.parseOMPL(opml);
|
||||
Map<String, List<OmplOutline>> data = PodcastsBackup.parseOPML(opml);
|
||||
for (var entry in data.entries) {
|
||||
var title = entry.key;
|
||||
var list = entry.value.reversed;
|
||||
|
@ -54,13 +54,13 @@ class PodcastsBackup {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
static parseOMPL(String opml) {
|
||||
static parseOPML(String opml) {
|
||||
var data = <String, List<OmplOutline>>{};
|
||||
// var opml = file.readAsStringSync();
|
||||
var content = xml.XmlDocument.parse(opml);
|
||||
var title =
|
||||
content.findAllElements('head').first.findElements('title').first.text;
|
||||
developer.log(title, name: 'Import OMPL');
|
||||
developer.log(title, name: 'Import OPML');
|
||||
var groups = content.findAllElements('body').first.findElements('outline');
|
||||
if (title != 'Tsacdop Feed Groups') {
|
||||
var total = content
|
||||
|
@ -44,7 +44,7 @@ class _DataBackupState extends State<DataBackup> {
|
||||
now.month.toString() +
|
||||
now.day.toString() +
|
||||
now.second.toString();
|
||||
var file = File(path.join(tempdir.path, 'tsacdop_ompl_$datePlus.xml'));
|
||||
var file = File(path.join(tempdir.path, 'tsacdop_opml_$datePlus.xml'));
|
||||
await file.writeAsString(opml.toXmlString());
|
||||
return file;
|
||||
}
|
||||
@ -57,7 +57,7 @@ class _DataBackupState extends State<DataBackup> {
|
||||
Future<void> _shareFile(File file) async {
|
||||
final bytes = await file.readAsBytes();
|
||||
await WcFlutterShare.share(
|
||||
sharePopupTitle: 'share Clip',
|
||||
sharePopupTitle: 'Share file',
|
||||
fileName: file.path.split('/').last,
|
||||
mimeType: 'text/plain',
|
||||
bytesOfFile: bytes.buffer.asUint8List());
|
||||
@ -653,7 +653,7 @@ class __LoginGpodderState extends State<_LoginGpodder> {
|
||||
var rssExp = RegExp(r'^(https?):\/\/(.*)');
|
||||
final opml = await gpodder.getAllPodcast();
|
||||
if (opml != '') {
|
||||
Map<String, List<OmplOutline>> data = PodcastsBackup.parseOMPL(opml);
|
||||
Map<String, List<OmplOutline>> data = PodcastsBackup.parseOPML(opml);
|
||||
for (var entry in data.entries) {
|
||||
var list = entry.value.reversed;
|
||||
for (var rss in list) {
|
||||
@ -1005,7 +1005,7 @@ class __GpodderInfoState extends State<_GpodderInfo> {
|
||||
var rssExp = RegExp(r'^(https?):\/\/(.*)');
|
||||
final opml = await _gpodder.getAllPodcast();
|
||||
if (opml != '') {
|
||||
Map<String, List<OmplOutline>> data = PodcastsBackup.parseOMPL(opml);
|
||||
Map<String, List<OmplOutline>> data = PodcastsBackup.parseOPML(opml);
|
||||
for (var entry in data.entries) {
|
||||
var list = entry.value.reversed;
|
||||
for (var rss in list) {
|
||||
|
@ -440,7 +440,7 @@ class GroupList extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
/// Subscribe podcast from OMPL.
|
||||
/// Subscribe podcast from OPML.
|
||||
Future<bool> _subscribeNewPodcast(
|
||||
{String id, String groupName = 'Home'}) async {
|
||||
//List<String> groupNames = _groups.map((e) => e.name).toList();
|
||||
|
Loading…
x
Reference in New Issue
Block a user