Class LocalSongDataProvider
java.lang.Object
de.klassenserver7b.danceinterpreter.songprocessing.dataprovider.LocalSongDataProvider
- All Implemented Interfaces:
SongDataProvider
- Author:
- K7
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterates over DanceInterpreter.getFiles(), checks whether a file is currently locked / used by another process, then returns a list of all locked filesprivate File
getLocalSong
(boolean provideforced) Gets currently playing song by checking for locked files Asks user to select if multiple files are locked
HUAN WARNING: Works only on Windows based OSvoid
protected SongData
provideParameterizedData
(File f, boolean provideforced)
-
Field Details
-
log
private final org.slf4j.Logger log -
hash
private int hash -
datahash
private int datahash
-
-
Constructor Details
-
LocalSongDataProvider
public LocalSongDataProvider()
-
-
Method Details
-
provideSongData
- Specified by:
provideSongData
in interfaceSongDataProvider
- Returns:
-
provideParameterizedData
-
getLocalSong
Gets currently playing song by checking for locked files Asks user to select if multiple files are locked
HUAN WARNING: Works only on Windows based OS- Parameters:
provideforced
- Whether to not forcefully refresh the song if the new locked files list's hash matches the old one- Returns:
- File of the currently playing song or null if no song is playing / the hashes match
-
getBlockedFiles
Iterates over DanceInterpreter.getFiles(), checks whether a file is currently locked / used by another process, then returns a list of all locked files- Returns:
- List of locked files
-
provideAsync
public void provideAsync()- Specified by:
provideAsync
in interfaceSongDataProvider
-