feat: manual song import via SAF picker (copy to library + tag read + dedupe)
This commit is contained in:
parent
72e55ba319
commit
7372d30943
382 changed files with 383 additions and 69 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -13,6 +13,7 @@ import com.rada.data.local.dao.PlaylistDao;
|
||||||
import com.rada.data.local.dao.SavedSongDao;
|
import com.rada.data.local.dao.SavedSongDao;
|
||||||
import com.rada.data.repository.LibraryRepository;
|
import com.rada.data.repository.LibraryRepository;
|
||||||
import com.rada.data.repository.PlaylistRepository;
|
import com.rada.data.repository.PlaylistRepository;
|
||||||
|
import com.rada.data.repository.SongImporter;
|
||||||
import com.rada.data.repository.StationRepository;
|
import com.rada.data.repository.StationRepository;
|
||||||
import com.rada.data.repository.StreamFetcher;
|
import com.rada.data.repository.StreamFetcher;
|
||||||
import com.rada.data.repository.StreamRepository;
|
import com.rada.data.repository.StreamRepository;
|
||||||
|
|
@ -424,35 +425,35 @@ public final class DaggerRadAmpApp_HiltComponents_SingletonC {
|
||||||
|
|
||||||
@IdentifierNameString
|
@IdentifierNameString
|
||||||
private static final class LazyClassKeyProvider {
|
private static final class LazyClassKeyProvider {
|
||||||
static String com_rada_ui_player_NowPlayingViewModel = "com.rada.ui.player.NowPlayingViewModel";
|
|
||||||
|
|
||||||
static String com_rada_ui_player_PlayerViewModel = "com.rada.ui.player.PlayerViewModel";
|
|
||||||
|
|
||||||
static String com_rada_ui_streams_StreamsViewModel = "com.rada.ui.streams.StreamsViewModel";
|
static String com_rada_ui_streams_StreamsViewModel = "com.rada.ui.streams.StreamsViewModel";
|
||||||
|
|
||||||
|
static String com_rada_ui_player_NowPlayingViewModel = "com.rada.ui.player.NowPlayingViewModel";
|
||||||
|
|
||||||
static String com_rada_ui_library_LibraryViewModel = "com.rada.ui.library.LibraryViewModel";
|
static String com_rada_ui_library_LibraryViewModel = "com.rada.ui.library.LibraryViewModel";
|
||||||
|
|
||||||
static String com_rada_ui_stations_StationBrowserViewModel = "com.rada.ui.stations.StationBrowserViewModel";
|
static String com_rada_ui_player_PlayerViewModel = "com.rada.ui.player.PlayerViewModel";
|
||||||
|
|
||||||
static String com_rada_ui_playlists_PlaylistManagerViewModel = "com.rada.ui.playlists.PlaylistManagerViewModel";
|
static String com_rada_ui_playlists_PlaylistManagerViewModel = "com.rada.ui.playlists.PlaylistManagerViewModel";
|
||||||
|
|
||||||
@KeepFieldType
|
static String com_rada_ui_stations_StationBrowserViewModel = "com.rada.ui.stations.StationBrowserViewModel";
|
||||||
NowPlayingViewModel com_rada_ui_player_NowPlayingViewModel2;
|
|
||||||
|
|
||||||
@KeepFieldType
|
|
||||||
PlayerViewModel com_rada_ui_player_PlayerViewModel2;
|
|
||||||
|
|
||||||
@KeepFieldType
|
@KeepFieldType
|
||||||
StreamsViewModel com_rada_ui_streams_StreamsViewModel2;
|
StreamsViewModel com_rada_ui_streams_StreamsViewModel2;
|
||||||
|
|
||||||
|
@KeepFieldType
|
||||||
|
NowPlayingViewModel com_rada_ui_player_NowPlayingViewModel2;
|
||||||
|
|
||||||
@KeepFieldType
|
@KeepFieldType
|
||||||
LibraryViewModel com_rada_ui_library_LibraryViewModel2;
|
LibraryViewModel com_rada_ui_library_LibraryViewModel2;
|
||||||
|
|
||||||
@KeepFieldType
|
@KeepFieldType
|
||||||
StationBrowserViewModel com_rada_ui_stations_StationBrowserViewModel2;
|
PlayerViewModel com_rada_ui_player_PlayerViewModel2;
|
||||||
|
|
||||||
@KeepFieldType
|
@KeepFieldType
|
||||||
PlaylistManagerViewModel com_rada_ui_playlists_PlaylistManagerViewModel2;
|
PlaylistManagerViewModel com_rada_ui_playlists_PlaylistManagerViewModel2;
|
||||||
|
|
||||||
|
@KeepFieldType
|
||||||
|
StationBrowserViewModel com_rada_ui_stations_StationBrowserViewModel2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -508,35 +509,35 @@ public final class DaggerRadAmpApp_HiltComponents_SingletonC {
|
||||||
|
|
||||||
@IdentifierNameString
|
@IdentifierNameString
|
||||||
private static final class LazyClassKeyProvider {
|
private static final class LazyClassKeyProvider {
|
||||||
static String com_rada_ui_stations_StationBrowserViewModel = "com.rada.ui.stations.StationBrowserViewModel";
|
|
||||||
|
|
||||||
static String com_rada_ui_player_PlayerViewModel = "com.rada.ui.player.PlayerViewModel";
|
|
||||||
|
|
||||||
static String com_rada_ui_library_LibraryViewModel = "com.rada.ui.library.LibraryViewModel";
|
|
||||||
|
|
||||||
static String com_rada_ui_playlists_PlaylistManagerViewModel = "com.rada.ui.playlists.PlaylistManagerViewModel";
|
static String com_rada_ui_playlists_PlaylistManagerViewModel = "com.rada.ui.playlists.PlaylistManagerViewModel";
|
||||||
|
|
||||||
static String com_rada_ui_streams_StreamsViewModel = "com.rada.ui.streams.StreamsViewModel";
|
static String com_rada_ui_stations_StationBrowserViewModel = "com.rada.ui.stations.StationBrowserViewModel";
|
||||||
|
|
||||||
static String com_rada_ui_player_NowPlayingViewModel = "com.rada.ui.player.NowPlayingViewModel";
|
static String com_rada_ui_player_NowPlayingViewModel = "com.rada.ui.player.NowPlayingViewModel";
|
||||||
|
|
||||||
@KeepFieldType
|
static String com_rada_ui_streams_StreamsViewModel = "com.rada.ui.streams.StreamsViewModel";
|
||||||
StationBrowserViewModel com_rada_ui_stations_StationBrowserViewModel2;
|
|
||||||
|
|
||||||
@KeepFieldType
|
static String com_rada_ui_library_LibraryViewModel = "com.rada.ui.library.LibraryViewModel";
|
||||||
PlayerViewModel com_rada_ui_player_PlayerViewModel2;
|
|
||||||
|
|
||||||
@KeepFieldType
|
static String com_rada_ui_player_PlayerViewModel = "com.rada.ui.player.PlayerViewModel";
|
||||||
LibraryViewModel com_rada_ui_library_LibraryViewModel2;
|
|
||||||
|
|
||||||
@KeepFieldType
|
@KeepFieldType
|
||||||
PlaylistManagerViewModel com_rada_ui_playlists_PlaylistManagerViewModel2;
|
PlaylistManagerViewModel com_rada_ui_playlists_PlaylistManagerViewModel2;
|
||||||
|
|
||||||
@KeepFieldType
|
@KeepFieldType
|
||||||
StreamsViewModel com_rada_ui_streams_StreamsViewModel2;
|
StationBrowserViewModel com_rada_ui_stations_StationBrowserViewModel2;
|
||||||
|
|
||||||
@KeepFieldType
|
@KeepFieldType
|
||||||
NowPlayingViewModel com_rada_ui_player_NowPlayingViewModel2;
|
NowPlayingViewModel com_rada_ui_player_NowPlayingViewModel2;
|
||||||
|
|
||||||
|
@KeepFieldType
|
||||||
|
StreamsViewModel com_rada_ui_streams_StreamsViewModel2;
|
||||||
|
|
||||||
|
@KeepFieldType
|
||||||
|
LibraryViewModel com_rada_ui_library_LibraryViewModel2;
|
||||||
|
|
||||||
|
@KeepFieldType
|
||||||
|
PlayerViewModel com_rada_ui_player_PlayerViewModel2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class SwitchingProvider<T> implements Provider<T> {
|
private static final class SwitchingProvider<T> implements Provider<T> {
|
||||||
|
|
@ -561,7 +562,7 @@ public final class DaggerRadAmpApp_HiltComponents_SingletonC {
|
||||||
public T get() {
|
public T get() {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 0: // com.rada.ui.library.LibraryViewModel
|
case 0: // com.rada.ui.library.LibraryViewModel
|
||||||
return (T) new LibraryViewModel(singletonCImpl.provideLibraryRepositoryProvider.get(), singletonCImpl.providePlaylistRepositoryProvider.get(), singletonCImpl.providePlaybackManagerProvider.get());
|
return (T) new LibraryViewModel(singletonCImpl.provideLibraryRepositoryProvider.get(), singletonCImpl.providePlaylistRepositoryProvider.get(), singletonCImpl.providePlaybackManagerProvider.get(), singletonCImpl.songImporterProvider.get());
|
||||||
|
|
||||||
case 1: // com.rada.ui.player.NowPlayingViewModel
|
case 1: // com.rada.ui.player.NowPlayingViewModel
|
||||||
return (T) new NowPlayingViewModel(singletonCImpl.providePlaybackManagerProvider.get());
|
return (T) new NowPlayingViewModel(singletonCImpl.providePlaybackManagerProvider.get());
|
||||||
|
|
@ -674,6 +675,8 @@ public final class DaggerRadAmpApp_HiltComponents_SingletonC {
|
||||||
|
|
||||||
private Provider<PlaylistRepository> providePlaylistRepositoryProvider;
|
private Provider<PlaylistRepository> providePlaylistRepositoryProvider;
|
||||||
|
|
||||||
|
private Provider<SongImporter> songImporterProvider;
|
||||||
|
|
||||||
private Provider<StationRepository> provideStationRepositoryProvider;
|
private Provider<StationRepository> provideStationRepositoryProvider;
|
||||||
|
|
||||||
private Provider<StreamRepository> streamRepositoryProvider;
|
private Provider<StreamRepository> streamRepositoryProvider;
|
||||||
|
|
@ -694,9 +697,10 @@ public final class DaggerRadAmpApp_HiltComponents_SingletonC {
|
||||||
this.providePlaybackManagerProvider = DoubleCheck.provider(new SwitchingProvider<PlaybackManager>(singletonCImpl, 0));
|
this.providePlaybackManagerProvider = DoubleCheck.provider(new SwitchingProvider<PlaybackManager>(singletonCImpl, 0));
|
||||||
this.providePlaylistDaoProvider = DoubleCheck.provider(new SwitchingProvider<PlaylistDao>(singletonCImpl, 5));
|
this.providePlaylistDaoProvider = DoubleCheck.provider(new SwitchingProvider<PlaylistDao>(singletonCImpl, 5));
|
||||||
this.providePlaylistRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<PlaylistRepository>(singletonCImpl, 4));
|
this.providePlaylistRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<PlaylistRepository>(singletonCImpl, 4));
|
||||||
this.provideStationRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<StationRepository>(singletonCImpl, 6));
|
this.songImporterProvider = DoubleCheck.provider(new SwitchingProvider<SongImporter>(singletonCImpl, 6));
|
||||||
this.streamRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<StreamRepository>(singletonCImpl, 7));
|
this.provideStationRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<StationRepository>(singletonCImpl, 7));
|
||||||
this.streamFetcherProvider = DoubleCheck.provider(new SwitchingProvider<StreamFetcher>(singletonCImpl, 8));
|
this.streamRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<StreamRepository>(singletonCImpl, 8));
|
||||||
|
this.streamFetcherProvider = DoubleCheck.provider(new SwitchingProvider<StreamFetcher>(singletonCImpl, 9));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -750,13 +754,16 @@ public final class DaggerRadAmpApp_HiltComponents_SingletonC {
|
||||||
case 5: // com.rada.data.local.dao.PlaylistDao
|
case 5: // com.rada.data.local.dao.PlaylistDao
|
||||||
return (T) AppModule_ProvidePlaylistDaoFactory.providePlaylistDao(singletonCImpl.provideDatabaseProvider.get());
|
return (T) AppModule_ProvidePlaylistDaoFactory.providePlaylistDao(singletonCImpl.provideDatabaseProvider.get());
|
||||||
|
|
||||||
case 6: // com.rada.data.repository.StationRepository
|
case 6: // com.rada.data.repository.SongImporter
|
||||||
|
return (T) new SongImporter(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule), singletonCImpl.provideLibraryRepositoryProvider.get());
|
||||||
|
|
||||||
|
case 7: // com.rada.data.repository.StationRepository
|
||||||
return (T) AppModule_ProvideStationRepositoryFactory.provideStationRepository(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));
|
return (T) AppModule_ProvideStationRepositoryFactory.provideStationRepository(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));
|
||||||
|
|
||||||
case 7: // com.rada.data.repository.StreamRepository
|
case 8: // com.rada.data.repository.StreamRepository
|
||||||
return (T) new StreamRepository(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));
|
return (T) new StreamRepository(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));
|
||||||
|
|
||||||
case 8: // com.rada.data.repository.StreamFetcher
|
case 9: // com.rada.data.repository.StreamFetcher
|
||||||
return (T) new StreamFetcher();
|
return (T) new StreamFetcher();
|
||||||
|
|
||||||
default: throw new AssertionError(id);
|
default: throw new AssertionError(id);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.rada.data.repository;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import dagger.internal.DaggerGenerated;
|
||||||
|
import dagger.internal.Factory;
|
||||||
|
import dagger.internal.QualifierMetadata;
|
||||||
|
import dagger.internal.ScopeMetadata;
|
||||||
|
import javax.annotation.processing.Generated;
|
||||||
|
import javax.inject.Provider;
|
||||||
|
|
||||||
|
@ScopeMetadata("javax.inject.Singleton")
|
||||||
|
@QualifierMetadata("dagger.hilt.android.qualifiers.ApplicationContext")
|
||||||
|
@DaggerGenerated
|
||||||
|
@Generated(
|
||||||
|
value = "dagger.internal.codegen.ComponentProcessor",
|
||||||
|
comments = "https://dagger.dev"
|
||||||
|
)
|
||||||
|
@SuppressWarnings({
|
||||||
|
"unchecked",
|
||||||
|
"rawtypes",
|
||||||
|
"KotlinInternal",
|
||||||
|
"KotlinInternalInJava",
|
||||||
|
"cast",
|
||||||
|
"deprecation"
|
||||||
|
})
|
||||||
|
public final class SongImporter_Factory implements Factory<SongImporter> {
|
||||||
|
private final Provider<Context> contextProvider;
|
||||||
|
|
||||||
|
private final Provider<LibraryRepository> libraryRepositoryProvider;
|
||||||
|
|
||||||
|
public SongImporter_Factory(Provider<Context> contextProvider,
|
||||||
|
Provider<LibraryRepository> libraryRepositoryProvider) {
|
||||||
|
this.contextProvider = contextProvider;
|
||||||
|
this.libraryRepositoryProvider = libraryRepositoryProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SongImporter get() {
|
||||||
|
return newInstance(contextProvider.get(), libraryRepositoryProvider.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SongImporter_Factory create(Provider<Context> contextProvider,
|
||||||
|
Provider<LibraryRepository> libraryRepositoryProvider) {
|
||||||
|
return new SongImporter_Factory(contextProvider, libraryRepositoryProvider);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SongImporter newInstance(Context context, LibraryRepository libraryRepository) {
|
||||||
|
return new SongImporter(context, libraryRepository);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,7 @@ package com.rada.ui.library;
|
||||||
|
|
||||||
import com.rada.data.repository.LibraryRepository;
|
import com.rada.data.repository.LibraryRepository;
|
||||||
import com.rada.data.repository.PlaylistRepository;
|
import com.rada.data.repository.PlaylistRepository;
|
||||||
|
import com.rada.data.repository.SongImporter;
|
||||||
import com.rada.player.PlaybackManager;
|
import com.rada.player.PlaybackManager;
|
||||||
import dagger.internal.DaggerGenerated;
|
import dagger.internal.DaggerGenerated;
|
||||||
import dagger.internal.Factory;
|
import dagger.internal.Factory;
|
||||||
|
|
@ -32,28 +33,34 @@ public final class LibraryViewModel_Factory implements Factory<LibraryViewModel>
|
||||||
|
|
||||||
private final Provider<PlaybackManager> playbackManagerProvider;
|
private final Provider<PlaybackManager> playbackManagerProvider;
|
||||||
|
|
||||||
|
private final Provider<SongImporter> songImporterProvider;
|
||||||
|
|
||||||
public LibraryViewModel_Factory(Provider<LibraryRepository> libraryRepositoryProvider,
|
public LibraryViewModel_Factory(Provider<LibraryRepository> libraryRepositoryProvider,
|
||||||
Provider<PlaylistRepository> playlistRepositoryProvider,
|
Provider<PlaylistRepository> playlistRepositoryProvider,
|
||||||
Provider<PlaybackManager> playbackManagerProvider) {
|
Provider<PlaybackManager> playbackManagerProvider,
|
||||||
|
Provider<SongImporter> songImporterProvider) {
|
||||||
this.libraryRepositoryProvider = libraryRepositoryProvider;
|
this.libraryRepositoryProvider = libraryRepositoryProvider;
|
||||||
this.playlistRepositoryProvider = playlistRepositoryProvider;
|
this.playlistRepositoryProvider = playlistRepositoryProvider;
|
||||||
this.playbackManagerProvider = playbackManagerProvider;
|
this.playbackManagerProvider = playbackManagerProvider;
|
||||||
|
this.songImporterProvider = songImporterProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LibraryViewModel get() {
|
public LibraryViewModel get() {
|
||||||
return newInstance(libraryRepositoryProvider.get(), playlistRepositoryProvider.get(), playbackManagerProvider.get());
|
return newInstance(libraryRepositoryProvider.get(), playlistRepositoryProvider.get(), playbackManagerProvider.get(), songImporterProvider.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LibraryViewModel_Factory create(
|
public static LibraryViewModel_Factory create(
|
||||||
Provider<LibraryRepository> libraryRepositoryProvider,
|
Provider<LibraryRepository> libraryRepositoryProvider,
|
||||||
Provider<PlaylistRepository> playlistRepositoryProvider,
|
Provider<PlaylistRepository> playlistRepositoryProvider,
|
||||||
Provider<PlaybackManager> playbackManagerProvider) {
|
Provider<PlaybackManager> playbackManagerProvider,
|
||||||
return new LibraryViewModel_Factory(libraryRepositoryProvider, playlistRepositoryProvider, playbackManagerProvider);
|
Provider<SongImporter> songImporterProvider) {
|
||||||
|
return new LibraryViewModel_Factory(libraryRepositoryProvider, playlistRepositoryProvider, playbackManagerProvider, songImporterProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LibraryViewModel newInstance(LibraryRepository libraryRepository,
|
public static LibraryViewModel newInstance(LibraryRepository libraryRepository,
|
||||||
PlaylistRepository playlistRepository, PlaybackManager playbackManager) {
|
PlaylistRepository playlistRepository, PlaybackManager playbackManager,
|
||||||
return new LibraryViewModel(libraryRepository, playlistRepository, playbackManager);
|
SongImporter songImporter) {
|
||||||
|
return new LibraryViewModel(libraryRepository, playlistRepository, playbackManager, songImporter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue