mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Code cleanup
This commit is contained in:
parent
ea7b79893d
commit
39ff821aee
8 changed files with 18 additions and 30 deletions
|
|
@ -3,7 +3,6 @@ package com.cappielloantonio.play.subsonic.api.albumsonglist;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
|
|
@ -20,14 +19,13 @@ public class AlbumSongListClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final AlbumSongListService albumSongListService;
|
||||
|
||||
public AlbumSongListClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.cappielloantonio.play.subsonic.api.browsing;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
|
|
@ -20,14 +19,13 @@ public class BrowsingClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final BrowsingService browsingService;
|
||||
|
||||
public BrowsingClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
@ -141,5 +139,6 @@ public class BrowsingClient {
|
|||
|
||||
private Cache getCache() {
|
||||
int cacheSize = 10 * 1024 * 1024;
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null; }
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.cappielloantonio.play.subsonic.api.mediaannotation;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
|
|
@ -20,14 +19,13 @@ public class MediaAnnotationClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final MediaAnnotationService mediaAnnotationService;
|
||||
|
||||
public MediaAnnotationClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
@ -76,5 +74,6 @@ public class MediaAnnotationClient {
|
|||
|
||||
private Cache getCache() {
|
||||
int cacheSize = 10 * 1024 * 1024;
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null; }
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ package com.cappielloantonio.play.subsonic.api.medialibraryscanning;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.api.system.SystemService;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
|
@ -21,14 +19,13 @@ public class MediaLibraryScanningClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final MediaLibraryScanningService mediaLibraryScanningService;
|
||||
|
||||
public MediaLibraryScanningClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
@ -67,5 +64,6 @@ public class MediaLibraryScanningClient {
|
|||
|
||||
private Cache getCache() {
|
||||
int cacheSize = 10 * 1024 * 1024;
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null; }
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.cappielloantonio.play.subsonic.api.mediaretrieval;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
|
|
@ -20,14 +19,13 @@ public class MediaRetrievalClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final MediaRetrievalService mediaRetrievalService;
|
||||
|
||||
public MediaRetrievalClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
@ -66,5 +64,6 @@ public class MediaRetrievalClient {
|
|||
|
||||
private Cache getCache() {
|
||||
int cacheSize = 10 * 1024 * 1024;
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null; }
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.cappielloantonio.play.subsonic.api.playlist;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
|
|
@ -22,14 +21,13 @@ public class PlaylistClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final PlaylistService playlistService;
|
||||
|
||||
public PlaylistClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
@ -83,5 +81,6 @@ public class PlaylistClient {
|
|||
|
||||
private Cache getCache() {
|
||||
int cacheSize = 10 * 1024 * 1024;
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null; }
|
||||
return context != null ? new Cache(context.getCacheDir(), cacheSize) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.cappielloantonio.play.subsonic.api.searching;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
|
|
@ -20,14 +19,13 @@ public class SearchingClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final SearchingService searchingService;
|
||||
|
||||
public SearchingClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.cappielloantonio.play.subsonic.api.system;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.cappielloantonio.play.subsonic.utils.CacheUtil;
|
||||
|
|
@ -20,14 +19,13 @@ public class SystemClient {
|
|||
|
||||
private final Context context;
|
||||
private final Subsonic subsonic;
|
||||
private Retrofit retrofit;
|
||||
private final SystemService systemService;
|
||||
|
||||
public SystemClient(Context context, Subsonic subsonic) {
|
||||
this.context = context;
|
||||
this.subsonic = subsonic;
|
||||
|
||||
this.retrofit = new Retrofit.Builder()
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(subsonic.getUrl())
|
||||
.addConverterFactory(TikXmlConverterFactory.create())
|
||||
.client(getOkHttpClient())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue