Merge pull request #4678 from ByteHamster/update-local-folder-properties
Update local folder properties on refresh
This commit is contained in:
commit
95f020ab62
|
@ -191,7 +191,6 @@ public class AddFeedFragment extends Fragment {
|
|||
throw new IllegalArgumentException("Unable to retrieve document tree");
|
||||
}
|
||||
Feed dirFeed = new Feed(Feed.PREFIX_LOCAL_FOLDER + uri.toString(), null, documentFile.getName());
|
||||
dirFeed.setDescription(getString(R.string.local_feed_description));
|
||||
dirFeed.setItems(Collections.emptyList());
|
||||
dirFeed.setSortOrder(SortOrder.EPISODE_TITLE_A_Z);
|
||||
Feed fromDatabase = DBTasks.updateFeed(getContext(), dirFeed, false);
|
||||
|
|
|
@ -97,15 +97,11 @@ public class LocalFeedUpdater {
|
|||
// set default feed image
|
||||
feed.setImageUrl(getDefaultIconUrl(context));
|
||||
}
|
||||
if (feed.getPreferences().getAutoDownload()) {
|
||||
feed.getPreferences().setAutoDownload(false);
|
||||
feed.getPreferences().setAutoDeleteAction(FeedPreferences.AutoDeleteAction.NO);
|
||||
try {
|
||||
DBWriter.setFeedPreferences(feed.getPreferences()).get();
|
||||
} catch (ExecutionException | InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
feed.getPreferences().setAutoDownload(false);
|
||||
feed.getPreferences().setAutoDeleteAction(FeedPreferences.AutoDeleteAction.NO);
|
||||
feed.setDescription(context.getString(R.string.local_feed_description));
|
||||
feed.setAuthor(context.getString(R.string.local_folder));
|
||||
|
||||
// update items, delete items without existing file;
|
||||
// only delete items if the folder contains at least one element to avoid accidentally
|
||||
|
|
|
@ -741,7 +741,10 @@
|
|||
<string name="discover_more">more »</string>
|
||||
<string name="discover_powered_by_itunes">Suggestions by iTunes</string>
|
||||
<string name="search_powered_by">Results by %1$s</string>
|
||||
|
||||
<!-- Local feeds -->
|
||||
<string name="add_local_folder">Add local folder</string>
|
||||
<string name="local_folder">Local folder</string>
|
||||
<string name="reconnect_local_folder">Re-connect local folder</string>
|
||||
<string name="reconnect_local_folder_warning">In case of permission denials, you can use this to re-connect to the exact same folder. Do not select another folder.</string>
|
||||
<string name="local_feed_description">This virtual podcast was created by adding a folder to AntennaPod.</string>
|
||||
|
|
Loading…
Reference in New Issue