Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
Removed out-of-scope startup tasks
Browse files Browse the repository at this point in the history
It's not really necessary for Shuttle to comb through the MediaStore and try to repair year tags. That can be done using the tag editor anyway.

The same can be said for cleaning genres up. The 'delete old resources' code is legacy and not really relevant anymore.
  • Loading branch information
timusus committed Apr 6, 2020
1 parent d620837 commit 5fbb005
Showing 1 changed file with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,34 +171,6 @@ public void onCreate() {
.onErrorComplete()
.subscribeOn(Schedulers.io())
.subscribe();

Completable.timer(5, TimeUnit.SECONDS)
.andThen(Completable.defer(this::repairMediaStoreYearFromTags))
.doOnError(throwable -> LogUtils.logException(TAG, "Failed to update year from tags", throwable))
.onErrorComplete()
.subscribeOn(Schedulers.io())
.subscribe();

Completable.timer(10, TimeUnit.SECONDS)
.andThen(Completable.defer(this::cleanGenres))
.doOnError(throwable -> LogUtils.logException(TAG, "Failed to clean genres", throwable))
.onErrorComplete()
.subscribeOn(Schedulers.io())
.subscribe();

Completable.timer(15, TimeUnit.SECONDS)
.andThen(Completable.defer(this::cleanMostPlayedPlaylist))
.doOnError(throwable -> LogUtils.logException(TAG, "Failed to clean most played", throwable))
.onErrorComplete()
.subscribeOn(Schedulers.io())
.subscribe();

Completable.timer(20, TimeUnit.SECONDS)
.andThen(Completable.defer(LegacyUtils::deleteOldResources))
.doOnError(throwable -> LogUtils.logException(TAG, "Failed to delete old resources", throwable))
.onErrorComplete()
.subscribeOn(Schedulers.io())
.subscribe();
}

public RefWatcher getRefWatcher() {
Expand Down

0 comments on commit 5fbb005

Please sign in to comment.