├── NTifyShowStable.png ├── src ├── main │ ├── java │ │ └── com │ │ │ ├── github │ │ │ └── kwhat │ │ │ │ └── jnativehook │ │ │ │ ├── .DEPINFO │ │ │ │ ├── mouse │ │ │ │ ├── package-info.java │ │ │ │ ├── NativeMouseWheelAdapter.java │ │ │ │ ├── NativeMouseAdapter.java │ │ │ │ ├── NativeMouseMotionAdapter.java │ │ │ │ ├── NativeMouseInputAdapter.java │ │ │ │ └── NativeMouseInputListener.java │ │ │ │ ├── keyboard │ │ │ │ ├── package-info.java │ │ │ │ └── NativeKeyAdapter.java │ │ │ │ └── dispatcher │ │ │ │ └── package-info.java │ │ │ └── spotifyxp │ │ │ ├── deps │ │ │ ├── io │ │ │ │ └── .DEPINFO │ │ │ ├── mslinks │ │ │ │ ├── .DEPINFO │ │ │ │ ├── Serializable.java │ │ │ │ ├── ShellLinkException.java │ │ │ │ ├── UnsupportedItemIDException.java │ │ │ │ ├── UnsupportedCLSIDException.java │ │ │ │ ├── extra │ │ │ │ │ └── Stub.java │ │ │ │ └── data │ │ │ │ │ ├── BitSet32.java │ │ │ │ │ ├── Size.java │ │ │ │ │ ├── ItemIDUnknown.java │ │ │ │ │ ├── ItemIDRoot.java │ │ │ │ │ ├── CNRLinkFlags.java │ │ │ │ │ └── LinkInfoFlags.java │ │ │ ├── javazoom │ │ │ │ └── jl │ │ │ │ │ └── decoder │ │ │ │ │ ├── .DEPINFO │ │ │ │ │ └── FrameDecoder.java │ │ │ ├── com │ │ │ │ └── spotify │ │ │ │ │ └── .DEPINFO │ │ │ ├── xyz │ │ │ │ └── gianlu │ │ │ │ │ ├── .DEPINFO │ │ │ │ │ ├── README.md │ │ │ │ │ ├── zeroconf │ │ │ │ │ ├── PacketListener.java │ │ │ │ │ ├── RecordANY.java │ │ │ │ │ ├── RecordPTR.java │ │ │ │ │ ├── RecordA.java │ │ │ │ │ └── RecordAAAA.java │ │ │ │ │ └── librespot │ │ │ │ │ ├── player │ │ │ │ │ ├── crossfade │ │ │ │ │ │ ├── GainInterpolator.java │ │ │ │ │ │ ├── LinearIncreasingInterpolator.java │ │ │ │ │ │ └── LinearDecreasingInterpolator.java │ │ │ │ │ ├── mixing │ │ │ │ │ │ └── output │ │ │ │ │ │ │ ├── SinkException.java │ │ │ │ │ │ │ ├── StreamOutput.java │ │ │ │ │ │ │ └── SinkOutput.java │ │ │ │ │ ├── contexts │ │ │ │ │ │ ├── GeneralFiniteContext.java │ │ │ │ │ │ ├── GeneralInfiniteContext.java │ │ │ │ │ │ └── SearchContext.java │ │ │ │ │ ├── decoders │ │ │ │ │ │ └── SeekableInputStream.java │ │ │ │ │ └── metrics │ │ │ │ │ │ └── NewPlaybackIdEvent.java │ │ │ │ │ ├── audio │ │ │ │ │ ├── HaltListener.java │ │ │ │ │ ├── GeneralWritableStream.java │ │ │ │ │ ├── decrypt │ │ │ │ │ │ ├── AudioDecrypt.java │ │ │ │ │ │ └── NoopAudioDecrypt.java │ │ │ │ │ ├── format │ │ │ │ │ │ ├── AudioQualityPicker.java │ │ │ │ │ │ └── SuperAudioFormat.java │ │ │ │ │ ├── DecodedAudioStream.java │ │ │ │ │ └── storage │ │ │ │ │ │ └── AudioFile.java │ │ │ │ │ ├── mercury │ │ │ │ │ ├── SubListener.java │ │ │ │ │ └── ProtobufMercuryRequest.java │ │ │ │ │ ├── core │ │ │ │ │ └── PacketsReceiver.java │ │ │ │ │ ├── json │ │ │ │ │ ├── GenericJson.java │ │ │ │ │ ├── JsonWrapper.java │ │ │ │ │ └── StationsWrapper.java │ │ │ │ │ ├── common │ │ │ │ │ ├── Log4JUncaughtExceptionHandler.java │ │ │ │ │ └── NameThreadFactory.java │ │ │ │ │ ├── metadata │ │ │ │ │ ├── UnsupportedId.java │ │ │ │ │ └── PlaylistId.java │ │ │ │ │ ├── decoders │ │ │ │ │ └── SeekableInputStream.java │ │ │ │ │ ├── dealer │ │ │ │ │ └── MessageType.java │ │ │ │ │ └── cache │ │ │ │ │ └── JournalHeader.java │ │ │ ├── se │ │ │ │ └── michaelthelin │ │ │ │ │ └── spotify │ │ │ │ │ ├── .DEPINFO │ │ │ │ │ ├── model_objects │ │ │ │ │ ├── special │ │ │ │ │ │ └── README.md │ │ │ │ │ └── miscellaneous │ │ │ │ │ │ └── README.md │ │ │ │ │ ├── requests │ │ │ │ │ └── data │ │ │ │ │ │ ├── search │ │ │ │ │ │ └── interfaces │ │ │ │ │ │ │ └── ISearchModelObject.java │ │ │ │ │ │ ├── personalization │ │ │ │ │ │ └── interfaces │ │ │ │ │ │ │ └── IArtistTrackModelObject.java │ │ │ │ │ │ ├── IPagingRequestBuilder.java │ │ │ │ │ │ ├── IPagingCursorbasedRequestBuilder.java │ │ │ │ │ │ ├── AbstractDataRequest.java │ │ │ │ │ │ ├── AbstractDataPagingRequest.java │ │ │ │ │ │ ├── AbstractDataPagingCursorbasedRequest.java │ │ │ │ │ │ └── episodes │ │ │ │ │ │ └── SaveEpisodesRequest.java │ │ │ │ │ ├── exceptions │ │ │ │ │ └── detailed │ │ │ │ │ │ ├── ForbiddenException.java │ │ │ │ │ │ ├── BadRequestException.java │ │ │ │ │ │ ├── NotFoundException.java │ │ │ │ │ │ ├── BadGatewayException.java │ │ │ │ │ │ ├── UnauthorizedException.java │ │ │ │ │ │ ├── InternalServerErrorException.java │ │ │ │ │ │ ├── ServiceUnavailableException.java │ │ │ │ │ │ └── TooManyRequestsException.java │ │ │ │ │ ├── SpotifyApiThreading.java │ │ │ │ │ └── enums │ │ │ │ │ ├── AlbumType.java │ │ │ │ │ ├── Modality.java │ │ │ │ │ ├── AlbumGroup.java │ │ │ │ │ ├── ProductType.java │ │ │ │ │ ├── CopyrightType.java │ │ │ │ │ ├── CurrentlyPlayingType.java │ │ │ │ │ ├── ReleaseDatePrecision.java │ │ │ │ │ ├── ModelObjectType.java │ │ │ │ │ └── Action.java │ │ │ └── de │ │ │ │ └── werwolf2303 │ │ │ │ └── sql │ │ │ │ ├── SQLElement.java │ │ │ │ ├── SQLEntryTypes.java │ │ │ │ └── SQLInsert.java │ │ │ ├── testing │ │ │ └── Test.java │ │ │ ├── guielements │ │ │ ├── README.MD │ │ │ └── DefTable.java │ │ │ ├── panels │ │ │ ├── View.java │ │ │ └── Views.java │ │ │ ├── support │ │ │ ├── SupportModule.java │ │ │ └── SupportModuleLoader.java │ │ │ ├── events │ │ │ ├── EventSubscriber.java │ │ │ ├── LoggerEvent.java │ │ │ ├── HtmlDialogEvents.java │ │ │ └── LibraryChange.java │ │ │ ├── setup │ │ │ └── SetupState.java │ │ │ ├── theming │ │ │ ├── Theme.java │ │ │ └── themes │ │ │ │ ├── Ugly.java │ │ │ │ ├── MacOS.java │ │ │ │ └── DarkGreen.java │ │ │ ├── utils │ │ │ ├── SystemUtils.java │ │ │ ├── NameValuePair.java │ │ │ ├── ClipboardUtil.java │ │ │ ├── AsyncActionListener.java │ │ │ └── ArchitectureDetection.java │ │ │ ├── Flags.java │ │ │ ├── args │ │ │ ├── Argument.java │ │ │ ├── Debug.java │ │ │ ├── NoMediaControl.java │ │ │ ├── Language.java │ │ │ ├── Help.java │ │ │ ├── Development.java │ │ │ ├── SetupComplete.java │ │ │ └── CustomSaveDir.java │ │ │ ├── dialogs │ │ │ ├── CancelDialog.form │ │ │ ├── HTMLDialog.form │ │ │ └── LyricsDialog.form │ │ │ ├── configuration │ │ │ ├── ICustomConfigValue.java │ │ │ └── ConfigValueTypes.java │ │ │ ├── swingextension │ │ │ ├── PaintPanel.java │ │ │ ├── JDialog.java │ │ │ ├── SettingsTable.java │ │ │ └── EasyJLabelUI.java │ │ │ ├── stabilizer │ │ │ └── GlobalExceptionHandler.java │ │ │ ├── api │ │ │ └── OAuthPKCE.java │ │ │ ├── injector │ │ │ ├── InjectorInterface.java │ │ │ └── InjectorStore.form │ │ │ ├── audio │ │ │ └── Quality.java │ │ │ └── video │ │ │ └── VLCPlayer.java │ ├── resources │ │ ├── sfd.ser │ │ ├── Application.json │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ ├── ntify.icns │ │ ├── ntify.ico │ │ ├── ntify.png │ │ ├── setup.png │ │ ├── com │ │ │ └── github │ │ │ │ └── kwhat │ │ │ │ └── jnativehook │ │ │ │ └── lib │ │ │ │ ├── linux │ │ │ │ ├── arm │ │ │ │ │ └── libJNativeHook.so │ │ │ │ ├── x86 │ │ │ │ │ └── libJNativeHook.so │ │ │ │ ├── arm64 │ │ │ │ │ └── libJNativeHook.so │ │ │ │ └── x86_64 │ │ │ │ │ └── libJNativeHook.so │ │ │ │ ├── windows │ │ │ │ ├── arm │ │ │ │ │ └── JNativeHook.dll │ │ │ │ ├── x86 │ │ │ │ │ └── JNativeHook.dll │ │ │ │ └── x86_64 │ │ │ │ │ └── JNativeHook.dll │ │ │ │ └── darwin │ │ │ │ ├── arm64 │ │ │ │ └── libJNativeHook.dylib │ │ │ │ └── x86_64 │ │ │ │ └── libJNativeHook.dylib │ │ ├── icons │ │ │ ├── playerplaydark.svg │ │ │ ├── playerplaywhite.svg │ │ │ ├── playerplaynextdark.svg │ │ │ ├── playerplaynextwhite.svg │ │ │ ├── heart.svg │ │ │ ├── historywhite.svg │ │ │ ├── historydark.svg │ │ │ ├── historyselected.svg │ │ │ ├── playerplaypreviousdark.svg │ │ │ ├── playerplaypreviouswhite.svg │ │ │ ├── heartfilled.svg │ │ │ ├── userwhite.svg │ │ │ ├── userdark.svg │ │ │ ├── repeatwhite.svg │ │ │ ├── repeatdark.svg │ │ │ ├── repeatselected.svg │ │ │ ├── microphonedark.svg │ │ │ ├── microphonewhite.svg │ │ │ ├── microphoneselected.svg │ │ │ ├── volumehalfwhite.svg │ │ │ ├── volumemutewhite.svg │ │ │ ├── dotswhite.svg │ │ │ ├── volumehalfdark.svg │ │ │ ├── dotsdark.svg │ │ │ ├── volumemutedark.svg │ │ │ ├── accountdark.svg │ │ │ ├── accountwhite.svg │ │ │ ├── playerpausedark.svg │ │ │ ├── playerpausewhite.svg │ │ │ ├── volumefullwhite.svg │ │ │ ├── volumefulldark.svg │ │ │ ├── shufflewhite.svg │ │ │ ├── shuffledark.svg │ │ │ ├── shuffleselected.svg │ │ │ ├── videodark.svg │ │ │ ├── videowhite.svg │ │ │ ├── videoselected.svg │ │ │ ├── closedark.svg │ │ │ ├── closewhite.svg │ │ │ ├── podcastwhite.svg │ │ │ ├── podcastdark.svg │ │ │ ├── mverticaldark.svg │ │ │ ├── mverticalwhite.svg │ │ │ ├── mverticalselectedwhite.svg │ │ │ ├── mverticalselecteddark.svg │ │ │ ├── settingswhite.svg │ │ │ ├── settingsdark.svg │ │ │ ├── albumwhite.svg │ │ │ ├── albumdark.svg │ │ │ ├── playlistdark.svg │ │ │ ├── playlistwhite.svg │ │ │ ├── refreshdark.svg │ │ │ ├── refreshwhite.svg │ │ │ ├── trackdark.svg │ │ │ └── trackwhite.svg │ │ └── about.html │ └── proto │ │ └── player_state.proto └── assembly │ └── jar-with-deps-with-exclude.xml ├── .gitmodules ├── .gitignore ├── .github └── ISSUE_TEMPLATE │ └── bug_report.md └── available_svgs_viewer.py /NTifyShowStable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/NTifyShowStable.png -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/.DEPINFO: -------------------------------------------------------------------------------- 1 | https://github.com/kwhat/jnativehook -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/io/.DEPINFO: -------------------------------------------------------------------------------- 1 | https://github.com/BlackOverlord666/mslinks -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/.DEPINFO: -------------------------------------------------------------------------------- 1 | https://github.com/DmitriiShamrikov/mslinks -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/javazoom/jl/decoder/.DEPINFO: -------------------------------------------------------------------------------- 1 | https://github.com/libgdx/jlayer-gdx -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/com/spotify/.DEPINFO: -------------------------------------------------------------------------------- 1 | https://github.com/librespot-org/librespot-java -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/.DEPINFO: -------------------------------------------------------------------------------- 1 | https://github.com/librespot-org/librespot-java -------------------------------------------------------------------------------- /src/main/resources/sfd.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/sfd.ser -------------------------------------------------------------------------------- /src/main/resources/Application.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name" : "NTify", 3 | "ReleaseCandidate" : "Public Beta" 4 | } -------------------------------------------------------------------------------- /src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: com.spotifyxp.Initiator 3 | -------------------------------------------------------------------------------- /src/main/resources/ntify.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/ntify.icns -------------------------------------------------------------------------------- /src/main/resources/ntify.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/ntify.ico -------------------------------------------------------------------------------- /src/main/resources/ntify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/ntify.png -------------------------------------------------------------------------------- /src/main/resources/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/setup.png -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/.DEPINFO: -------------------------------------------------------------------------------- 1 | https://github.com/spotify-web-api-java/spotify-web-api-java -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/model_objects/special/README.md: -------------------------------------------------------------------------------- 1 | # Special Objects 2 | 3 | Objects, that are nowhere defined, but returned by requests. -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/testing/Test.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.testing; 2 | 3 | public class Test { 4 | public static void main(String[] args) throws Exception { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/linux/arm/libJNativeHook.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/linux/arm/libJNativeHook.so -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/linux/x86/libJNativeHook.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/linux/x86/libJNativeHook.so -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/windows/arm/JNativeHook.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/windows/arm/JNativeHook.dll -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/windows/x86/JNativeHook.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/windows/x86/JNativeHook.dll -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/linux/arm64/libJNativeHook.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/linux/arm64/libJNativeHook.so -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/linux/x86_64/libJNativeHook.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/linux/x86_64/libJNativeHook.so -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/windows/x86_64/JNativeHook.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/windows/x86_64/JNativeHook.dll -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/darwin/arm64/libJNativeHook.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/darwin/arm64/libJNativeHook.dylib -------------------------------------------------------------------------------- /src/main/resources/com/github/kwhat/jnativehook/lib/darwin/x86_64/libJNativeHook.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NTifyApp/NTify/HEAD/src/main/resources/com/github/kwhat/jnativehook/lib/darwin/x86_64/libJNativeHook.dylib -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/de/werwolf2303/sql/SQLElement.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.de.werwolf2303.sql; 2 | 3 | public interface SQLElement { 4 | void provideSession(SQLSession.SQLSessionPrivate sqlSession); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/README.md: -------------------------------------------------------------------------------- 1 | Changes made: 2 | 3 | - Added an event to catch token refresh 4 | - Lyrics refresh tick inside Vorabis and MP3 decoder 5 | - AudioVisualizer refresh tick inside Vorabis and MP3 decoder 6 | - Fix connectionId update being ignored -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/model_objects/miscellaneous/README.md: -------------------------------------------------------------------------------- 1 | # Miscellaneous Objects 2 | 3 | Objects, that are defined on an API endpoint reference page, but not within 4 | the [main object model](https://developer.spotify.com/documentation/web-api/reference/object-model/). -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/mpris-java"] 2 | path = deps/mpris-java 3 | url = https://github.com/NTifyApp/mpris-java 4 | [submodule "deps/JavaSetupTool"] 5 | path = deps/JavaSetupTool 6 | url = https://github.com/werwolf2303/JavaSetupTool 7 | [submodule "deps/vlcj"] 8 | path = deps/vlcj 9 | url = https://github.com/NTifyApp/vlcj -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/search/interfaces/ISearchModelObject.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data.search.interfaces; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.model_objects.IModelObject; 4 | 5 | public interface ISearchModelObject extends IModelObject { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerplaydark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerplaywhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/personalization/interfaces/IArtistTrackModelObject.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data.personalization.interfaces; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.model_objects.IModelObject; 4 | 5 | public interface IArtistTrackModelObject extends IModelObject { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerplaynextdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerplaynextwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/icons/historywhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/historydark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/historyselected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerplaypreviousdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerplaypreviouswhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/heartfilled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/icons/userwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/zeroconf/PacketListener.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.xyz.gianlu.zeroconf; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * An interface that will be notified of a packet transmission 7 | * 8 | * @see Zeroconf#addReceiveListener 9 | * @see Zeroconf#addSendListener 10 | */ 11 | public interface PacketListener { 12 | void packetEvent(@NotNull Packet packet); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/icons/userdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/about.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

%APPNAME%

4 |
5 |
6 | (TRANSLATE)ui.about.description(TRANSLATE) 7 |
8 | (TRANSLATE)ui.about.tested(TRANSLATE) 9 |
10 |
11 |

(TRANSLATE)ui.about.deps(TRANSLATE)

12 |
13 |
14 | 15 | 16 |
-------------------------------------------------------------------------------- /src/main/resources/icons/repeatwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/repeatdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/repeatselected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/microphonedark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/microphonewhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/microphoneselected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/de/werwolf2303/sql/SQLEntryTypes.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.de.werwolf2303.sql; 2 | 3 | public enum SQLEntryTypes { 4 | STRING("TEXT"), 5 | INTEGER("INTEGER"), 6 | BOOLEAN("BIT"), 7 | DATE("DATE"); 8 | 9 | private final String realType; 10 | 11 | SQLEntryTypes(String realType) { 12 | this.realType = realType; 13 | } 14 | 15 | public String getRealType() { 16 | return this.realType; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/icons/volumehalfwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/volumemutewhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/dotswhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/icons/volumehalfdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/dotsdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/icons/volumemutedark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/accountdark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/main/resources/icons/accountwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerpausedark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/icons/playerpausewhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store 2 | /cache/ 3 | /out/ 4 | /target/ 5 | /build/ 6 | /scripts/bin 7 | /data/ 8 | /scripts/.venv 9 | XPDebuggingTools.jar 10 | X 11 | /Modules 12 | src/main/resources/SpotifyXP-Updater.jar 13 | ExternalDebugger.jar 14 | access_token 15 | .idea/ 16 | .classpath 17 | .project 18 | qodana.yaml 19 | SpotifyXP.iml 20 | ToDo 21 | /src/main/java/com/spotifyxp/deps/org/ 22 | /src/main/java/com/spotifyxp/deps/de/werwolf2303/javasetuptool 23 | /src/main/java/com/spotifyxp/deps/uk 24 | /src/main/resources/vlc 25 | /XPAirDebug.jar -------------------------------------------------------------------------------- /src/main/resources/icons/volumefullwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/icons/volumefulldark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/icons/shufflewhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/icons/shuffledark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/icons/shuffleselected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/IPagingRequestBuilder.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.model_objects.specification.Paging; 4 | import com.spotifyxp.deps.se.michaelthelin.spotify.requests.IRequest; 5 | 6 | public interface IPagingRequestBuilder, ?>> 7 | extends IRequest.Builder, BT> { 8 | BT limit(final Integer limit); 9 | 10 | BT offset(final Integer offset); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/icons/videodark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/icons/videowhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/icons/videoselected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/IPagingCursorbasedRequestBuilder.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.model_objects.specification.PagingCursorbased; 4 | import com.spotifyxp.deps.se.michaelthelin.spotify.requests.IRequest; 5 | 6 | public interface IPagingCursorbasedRequestBuilder, ?>> 7 | extends IRequest.Builder, BT> { 8 | BT limit(final Integer limit); 9 | 10 | BT after(final A after); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/proto/player_state.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package spotifyxp.playerstate; 4 | 5 | option java_package = "com.spotifyxp.protogens"; 6 | 7 | enum EntityType { 8 | TRACK = 0; 9 | EPISODE = 1; 10 | } 11 | 12 | message PlayableUri { 13 | string id = 1; 14 | EntityType type = 2; 15 | } 16 | 17 | message State { 18 | PlayableUri currentTrack = 1; 19 | int64 currentTimeSlider = 2; 20 | int64 currentTimeSliderMax = 3; 21 | string currentTimeString = 4; 22 | string durationString = 5; 23 | string currentVolumeString = 6; 24 | repeated PlayableUri playableHistory = 7; 25 | repeated PlayableUri playableQueue = 8; 26 | } -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/ForbiddenException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * The server understood the request, but is refusing to fulfill it. 7 | */ 8 | public class ForbiddenException extends IOException { 9 | 10 | public ForbiddenException() { 11 | super(); 12 | } 13 | 14 | public ForbiddenException(String message) { 15 | super(message); 16 | } 17 | 18 | public ForbiddenException(String message, Throwable cause) { 19 | super(message, cause); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/BadRequestException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * The request could not be understood by the server due to malformed syntax. 7 | */ 8 | public class BadRequestException extends IOException { 9 | 10 | public BadRequestException() { 11 | super(); 12 | } 13 | 14 | public BadRequestException(String message) { 15 | super(message); 16 | } 17 | 18 | public BadRequestException(String message, Throwable cause) { 19 | super(message, cause); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * The requested resource could not be found. This error can be due to a temporary or permanent condition. 7 | */ 8 | public class NotFoundException extends IOException { 9 | 10 | public NotFoundException() { 11 | super(); 12 | } 13 | 14 | public NotFoundException(String message) { 15 | super(message); 16 | } 17 | 18 | public NotFoundException(String message, Throwable cause) { 19 | super(message, cause); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/BadGatewayException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * The server was acting as a gateway or proxy and received an invalid response from the upstream server. 7 | */ 8 | public class BadGatewayException extends IOException { 9 | 10 | public BadGatewayException() { 11 | super(); 12 | } 13 | 14 | public BadGatewayException(String message) { 15 | super(message); 16 | } 17 | 18 | public BadGatewayException(String message, Throwable cause) { 19 | super(message, cause); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/Serializable.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks; 16 | 17 | import com.spotifyxp.deps.io.ByteWriter; 18 | 19 | import java.io.IOException; 20 | 21 | public interface Serializable { 22 | void serialize(ByteWriter bw) throws IOException; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/guielements/README.MD: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | ## Do not use these classes in your extension -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/ShellLinkException.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks; 16 | 17 | public class ShellLinkException extends Exception { 18 | public ShellLinkException() { 19 | super(); 20 | } 21 | 22 | public ShellLinkException(String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/UnauthorizedException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * The request requires user authorization or, if the request included authorization credentials, authorization has been 7 | * refused for those credentials. 8 | */ 9 | public class UnauthorizedException extends IOException { 10 | 11 | public UnauthorizedException() { 12 | super(); 13 | } 14 | 15 | public UnauthorizedException(String message) { 16 | super(message); 17 | } 18 | 19 | public UnauthorizedException(String message, Throwable cause) { 20 | super(message, cause); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/UnsupportedItemIDException.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/DmitriiShamrikov/mslinks 3 | 4 | Copyright (c) 2022 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks; 16 | 17 | public class UnsupportedItemIDException extends ShellLinkException { 18 | public UnsupportedItemIDException(int typeFlags) { 19 | super(String.format("unsupported ItemID type %02x", typeFlags)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/icons/closedark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/main/resources/icons/closewhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/UnsupportedCLSIDException.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks; 16 | 17 | import com.spotifyxp.deps.mslinks.data.GUID; 18 | 19 | public class UnsupportedCLSIDException extends ShellLinkException { 20 | public UnsupportedCLSIDException(GUID clsid) { 21 | super(clsid.toString()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/InternalServerErrorException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * You should never receive this error because our clever coders catch them all ... but if you are unlucky enough to get 7 | * one, please report it to us. 8 | */ 9 | public class InternalServerErrorException extends IOException { 10 | 11 | public InternalServerErrorException() { 12 | super(); 13 | } 14 | 15 | public InternalServerErrorException(String message) { 16 | super(message); 17 | } 18 | 19 | public InternalServerErrorException(String message, Throwable cause) { 20 | super(message, cause); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/panels/View.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.panels; 17 | 18 | public interface View { 19 | void makeVisible(); 20 | void makeInvisible(); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/ServiceUnavailableException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * The server is currently unable to handle the request due to a temporary condition which will be alleviated after some 7 | * delay. You can choose to resend the request again. 8 | */ 9 | public class ServiceUnavailableException extends IOException { 10 | 11 | public ServiceUnavailableException() { 12 | super(); 13 | } 14 | 15 | public ServiceUnavailableException(String message) { 16 | super(message); 17 | } 18 | 19 | public ServiceUnavailableException(String message, Throwable cause) { 20 | super(message, cause); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/AbstractDataRequest.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.requests.AbstractRequest; 4 | 5 | public abstract class AbstractDataRequest extends AbstractRequest { 6 | protected AbstractDataRequest(final Builder builder) { 7 | super(builder); 8 | } 9 | 10 | public static abstract class Builder> extends AbstractRequest.Builder { 11 | protected Builder(String accessToken) { 12 | super(); 13 | 14 | assert (accessToken != null); 15 | assert (!accessToken.isEmpty()); 16 | 17 | setHeader("Authorization", "Bearer " + accessToken); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/zeroconf/RecordANY.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.xyz.gianlu.zeroconf; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | import java.nio.ByteBuffer; 6 | 7 | public class RecordANY extends Record { 8 | 9 | RecordANY() { 10 | super(TYPE_ANY); 11 | } 12 | 13 | RecordANY(String name) { 14 | this(); 15 | setName(name); 16 | } 17 | 18 | @Override 19 | protected void readData(int len, ByteBuffer in) { 20 | throw new IllegalStateException(); 21 | } 22 | 23 | @Override 24 | protected int writeData(ByteBuffer out, Packet packet) { 25 | return -1; 26 | } 27 | 28 | @Override 29 | @NotNull 30 | public String toString() { 31 | return "{type:any, name:\"" + getName() + "\"}"; 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/support/SupportModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.support; 17 | 18 | public interface SupportModule { 19 | String getOSName(); 20 | 21 | void run(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/events/EventSubscriber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.events; 17 | 18 | @FunctionalInterface 19 | public interface EventSubscriber { 20 | void run(Object... data); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/setup/SetupState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.setup; 17 | 18 | public enum SetupState { 19 | WELCOME, 20 | THIRD_PARTY_LICENSES, 21 | FILE_INFO, 22 | COMPLETE 23 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Log file (Under %AppData%/NTify/logs)** 24 | Drag log file here 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. Windows XP] 28 | - Processor 29 | - Architecture: [x86 or x64] 30 | - RAM 31 | - Version: [e.g. fxjf483d] 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /src/main/resources/icons/podcastwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/main/resources/icons/podcastdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/theming/Theme.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.theming; 17 | 18 | public interface Theme { 19 | String getAuthor(); 20 | 21 | boolean isLight(); 22 | 23 | void initTheme(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/icons/mverticaldark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/resources/icons/mverticalwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/resources/icons/mverticalselectedwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/utils/SystemUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.utils; 17 | 18 | public class SystemUtils { 19 | public static int getUsableRAMmb() { 20 | return (int) (Runtime.getRuntime().maxMemory() / (1024 * 1024)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/resources/icons/mverticalselecteddark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/resources/icons/settingswhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/de/werwolf2303/sql/SQLInsert.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.de.werwolf2303.sql; 2 | 3 | import java.sql.Date; 4 | 5 | public class SQLInsert { 6 | private final Object object; 7 | private final SQLEntryTypes type; 8 | 9 | public SQLInsert(Object object, SQLEntryTypes type) { 10 | this.object = object; 11 | this.type = type; 12 | } 13 | 14 | public Object getObject() { 15 | return object; 16 | } 17 | 18 | public String getString() { 19 | return (String) object; 20 | } 21 | 22 | public Boolean getBoolean() { 23 | return (Boolean) object; 24 | } 25 | 26 | public Date getDate() { 27 | return (Date) object; 28 | } 29 | 30 | public Integer getInteger() { 31 | return (Integer) object; 32 | } 33 | 34 | public SQLEntryTypes getType() { 35 | return type; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/crossfade/GainInterpolator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.crossfade; 18 | 19 | interface GainInterpolator { 20 | float interpolate(float x); 21 | 22 | float last(); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/icons/settingsdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/AbstractDataPagingRequest.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.model_objects.specification.Paging; 4 | 5 | public abstract class AbstractDataPagingRequest extends AbstractDataRequest { 6 | protected AbstractDataPagingRequest(final AbstractDataRequest.Builder builder) { 7 | super(builder); 8 | } 9 | 10 | public static abstract class Builder> 11 | extends AbstractDataRequest.Builder, BT> 12 | implements IPagingRequestBuilder { 13 | protected Builder(String accessToken) { 14 | super(accessToken); 15 | 16 | assert (!accessToken.isEmpty()); 17 | 18 | setHeader("Authorization", "Bearer " + accessToken); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/panels/Views.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.panels; 17 | 18 | public enum Views { 19 | HOME, 20 | BROWSE, 21 | LIBRARY, 22 | SEARCH, 23 | HOTLIST, 24 | QUEUE, 25 | FEEDBACK, 26 | ARTIST, 27 | TRACKPANEL, 28 | BROWSESECTION 29 | } -------------------------------------------------------------------------------- /src/main/resources/icons/albumwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/icons/albumdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/Flags.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp; 17 | 18 | public class Flags { 19 | public static final boolean macosSupport = true; 20 | public static final boolean linuxSupport = true; 21 | public static final boolean videoPlaybackSupport = true; 22 | } 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/AbstractDataPagingCursorbasedRequest.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.model_objects.specification.PagingCursorbased; 4 | 5 | public abstract class AbstractDataPagingCursorbasedRequest extends AbstractDataRequest { 6 | protected AbstractDataPagingCursorbasedRequest(final AbstractDataRequest.Builder builder) { 7 | super(builder); 8 | } 9 | 10 | public static abstract class Builder> extends AbstractDataRequest.Builder, BT> implements IPagingCursorbasedRequestBuilder { 11 | protected Builder(String accessToken) { 12 | super(accessToken); 13 | 14 | assert (!accessToken.isEmpty()); 15 | 16 | setHeader("Authorization", "Bearer " + accessToken); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/SpotifyApiThreading.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify; 2 | 3 | import java.util.concurrent.Callable; 4 | import java.util.concurrent.CompletableFuture; 5 | import java.util.concurrent.ExecutorService; 6 | import java.util.concurrent.Executors; 7 | 8 | public class SpotifyApiThreading { 9 | 10 | public static final ExecutorService THREADPOOL = Executors.newCachedThreadPool(); 11 | 12 | public static CompletableFuture executeAsync(final Callable callable) { 13 | CompletableFuture future = new CompletableFuture<>(); 14 | 15 | SpotifyApiThreading.THREADPOOL.execute(() -> { 16 | try { 17 | future.complete(callable.call()); 18 | } catch (Exception e) { 19 | future.completeExceptionally(e); 20 | } 21 | }); 22 | 23 | return future; 24 | } 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/events/LoggerEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.events; 17 | 18 | @SuppressWarnings("EmptyMethod") 19 | public interface LoggerEvent { 20 | void log(String message); 21 | 22 | void err(String message); 23 | 24 | void info(String message); 25 | 26 | void crit(String message); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/HaltListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio; 18 | 19 | /** 20 | * @author Gianlu 21 | */ 22 | public interface HaltListener { 23 | void streamReadHalted(int chunk, long time); 24 | 25 | void streamReadResumed(int chunk, long time); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/mercury/SubListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.mercury; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | /** 22 | * @author Gianlu 23 | */ 24 | public interface SubListener { 25 | void event(@NotNull MercuryClient.Response resp); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/Argument.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | /** 19 | * An interface to define an extensions main class 20 | */ 21 | public interface Argument { 22 | Runnable runArgument(String commands); 23 | 24 | String getName(); 25 | 26 | String getDescription(); 27 | 28 | boolean hasParameter(); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/events/HtmlDialogEvents.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.events; 17 | 18 | import javax.swing.*; 19 | 20 | public interface HtmlDialogEvents { 21 | void unsupportedHTMLTag(String tagname); 22 | 23 | void close(JDialog dialog); 24 | 25 | void open(JDialog dialog); 26 | 27 | void resize(JDialog dialog); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/GeneralWritableStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio; 18 | 19 | import java.io.IOException; 20 | 21 | /** 22 | * @author Gianlu 23 | */ 24 | public interface GeneralWritableStream { 25 | void writeChunk(byte[] buffer, int chunkIndex, boolean cached) throws IOException; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/decrypt/AudioDecrypt.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio.decrypt; 18 | 19 | import java.io.IOException; 20 | 21 | /** 22 | * @author Gianlu 23 | */ 24 | public interface AudioDecrypt { 25 | void decryptChunk(int chunkIndex, byte[] buffer) throws IOException; 26 | 27 | int decryptTimeMs(); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/mixing/output/SinkException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.mixing.output; 18 | 19 | /** 20 | * @author devgianlu 21 | */ 22 | public final class SinkException extends Exception { 23 | public SinkException(String message, Throwable cause) { 24 | super(message, cause); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/core/PacketsReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.core; 18 | 19 | import com.spotifyxp.deps.xyz.gianlu.librespot.crypto.Packet; 20 | import org.jetbrains.annotations.NotNull; 21 | 22 | /** 23 | * @author Gianlu 24 | */ 25 | public interface PacketsReceiver { 26 | void dispatch(@NotNull Packet packet); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/dialogs/CancelDialog.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/json/GenericJson.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.json; 18 | 19 | import com.google.gson.JsonObject; 20 | import org.jetbrains.annotations.NotNull; 21 | 22 | /** 23 | * @author devgianlu 24 | */ 25 | public final class GenericJson extends JsonWrapper { 26 | 27 | public GenericJson(@NotNull JsonObject obj) { 28 | super(obj); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/icons/playlistdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | playlist [#1002] 6 | Created with Sketch. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/icons/playlistwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | playlist [#1002] 6 | Created with Sketch. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/crossfade/LinearIncreasingInterpolator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.crossfade; 18 | 19 | class LinearIncreasingInterpolator implements GainInterpolator { 20 | @Override 21 | public float interpolate(float x) { 22 | return x; 23 | } 24 | 25 | @Override 26 | public float last() { 27 | return 1; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/exceptions/detailed/TooManyRequestsException.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.exceptions.detailed; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * Rate limiting has been applied. 7 | */ 8 | public class TooManyRequestsException extends IOException { 9 | 10 | private int retryAfter; 11 | 12 | public TooManyRequestsException() { 13 | super(); 14 | } 15 | 16 | public TooManyRequestsException(String message, int retryAfter) { 17 | super(message); 18 | this.setRetryAfter(retryAfter); 19 | } 20 | 21 | public TooManyRequestsException(String message) { 22 | super(message); 23 | } 24 | 25 | public TooManyRequestsException(String message, Throwable cause) { 26 | super(message, cause); 27 | } 28 | 29 | public int getRetryAfter() { 30 | return retryAfter; 31 | } 32 | 33 | public void setRetryAfter(int retryAfter) { 34 | this.retryAfter = retryAfter; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/crossfade/LinearDecreasingInterpolator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.crossfade; 18 | 19 | class LinearDecreasingInterpolator implements GainInterpolator { 20 | @Override 21 | public float interpolate(float x) { 22 | return 1 - x; 23 | } 24 | 25 | @Override 26 | public float last() { 27 | return 0; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/theming/themes/Ugly.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.theming.themes; 17 | 18 | import com.spotifyxp.theming.Theme; 19 | 20 | public class Ugly implements Theme { 21 | public Ugly() { 22 | } 23 | 24 | public String getAuthor() { 25 | return "Werwolf2303"; 26 | } 27 | 28 | public boolean isLight() { 29 | return true; 30 | } 31 | 32 | public void initTheme() { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/AlbumType.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * An enumeration of all possible album types. 8 | */ 9 | public enum AlbumType { 10 | 11 | ALBUM("album"), 12 | COMPILATION("compilation"), 13 | SINGLE("single"); 14 | 15 | private static final Map map = new HashMap<>(); 16 | 17 | static { 18 | for (AlbumType albumType : AlbumType.values()) { 19 | map.put(albumType.type, albumType); 20 | } 21 | } 22 | 23 | public final String type; 24 | 25 | AlbumType(final String type) { 26 | this.type = type; 27 | } 28 | 29 | public static AlbumType keyOf(String type) { 30 | return map.get(type); 31 | } 32 | 33 | /** 34 | * Get the album type as a string. 35 | * 36 | * @return Album type as string. 37 | */ 38 | public String getType() { 39 | return type; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/decrypt/NoopAudioDecrypt.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio.decrypt; 18 | 19 | /** 20 | * @author Gianlu 21 | */ 22 | public final class NoopAudioDecrypt implements AudioDecrypt { 23 | @Override 24 | public void decryptChunk(int chunkIndex, byte[] buffer) { 25 | } 26 | 27 | @Override 28 | public int decryptTimeMs() { 29 | return 0; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/mouse/package-info.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * Classes used for native mouse events. 21 | * 22 | * @version 2.0 23 | * @since 1.0 24 | */ 25 | package com.github.kwhat.jnativehook.mouse; 26 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/keyboard/package-info.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * Classes used for native keyboard events. 21 | * 22 | * @version 2.0 23 | * @since 1.0 24 | */ 25 | package com.github.kwhat.jnativehook.keyboard; 26 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/contexts/GeneralFiniteContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.contexts; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | public class GeneralFiniteContext extends AbsSpotifyContext { 22 | GeneralFiniteContext(@NotNull String context) { 23 | super(context); 24 | } 25 | 26 | @Override 27 | public final boolean isFinite() { 28 | return true; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/utils/NameValuePair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.utils; 17 | 18 | public class NameValuePair { 19 | private final String name; 20 | private final String value; 21 | 22 | public NameValuePair(String name, String value) { 23 | this.name = name; 24 | this.value = value; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public String getValue() { 32 | return value; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/contexts/GeneralInfiniteContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.contexts; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | public class GeneralInfiniteContext extends AbsSpotifyContext { 22 | GeneralInfiniteContext(@NotNull String context) { 23 | super(context); 24 | } 25 | 26 | @Override 27 | public final boolean isFinite() { 28 | return false; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/dispatcher/package-info.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * ExecutorService implementations for native event dispatch. 21 | * 22 | * @version 2.0 23 | * @since 2.0 24 | */ 25 | package com.github.kwhat.jnativehook.dispatcher; 26 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/Modality.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * An enumeration with the two modality types. 8 | * 9 | * @see Wikipedia: Mode (Music) 10 | */ 11 | public enum Modality { 12 | 13 | MAJOR(1), 14 | MINOR(0); 15 | 16 | private static final Map map = new HashMap<>(); 17 | 18 | static { 19 | for (Modality modality : Modality.values()) { 20 | map.put(modality.mode, modality); 21 | } 22 | } 23 | 24 | public final int mode; 25 | 26 | Modality(final int mode) { 27 | this.mode = mode; 28 | } 29 | 30 | public static Modality keyOf(int mode) { 31 | return map.get(mode); 32 | } 33 | 34 | /** 35 | * Get the {@link Modality} type as a string. 36 | * 37 | * @return {@link Modality} type as a string. 38 | */ 39 | public int getType() { 40 | return this.mode; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/assembly/jar-with-deps-with-exclude.xml: -------------------------------------------------------------------------------- 1 | 5 | jar-with-dependencies-and-exclude-classes 6 | 7 | jar 8 | 9 | false 10 | 11 | 12 | / 13 | false 14 | true 15 | runtime 16 | 17 | 18 | 19 | 20 | / 21 | ${project.build.outputDirectory} 22 | 23 | com/spotifyxp/Flags.class 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/contexts/SearchContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.contexts; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | /** 22 | * @author Gianlu 23 | */ 24 | public final class SearchContext extends GeneralFiniteContext { 25 | public final String searchTerm; 26 | 27 | public SearchContext(@NotNull String context, @NotNull String searchTerm) { 28 | super(context); 29 | this.searchTerm = searchTerm; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/format/AudioQualityPicker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio.format; 18 | 19 | import com.spotifyxp.deps.com.spotify.metadata.Metadata; 20 | import org.jetbrains.annotations.NotNull; 21 | import org.jetbrains.annotations.Nullable; 22 | 23 | import java.util.List; 24 | 25 | /** 26 | * @author Gianlu 27 | */ 28 | public interface AudioQualityPicker { 29 | 30 | @Nullable 31 | Metadata.AudioFile getFile(@NotNull List files); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/utils/ClipboardUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.utils; 17 | 18 | import java.awt.*; 19 | import java.awt.datatransfer.Clipboard; 20 | import java.awt.datatransfer.StringSelection; 21 | 22 | public class ClipboardUtil { 23 | public static void set(String text) { 24 | Toolkit toolkit = Toolkit.getDefaultToolkit(); 25 | Clipboard clipboard = toolkit.getSystemClipboard(); 26 | StringSelection strSel = new StringSelection(text); 27 | clipboard.setContents(strSel, null); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/json/JsonWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.json; 18 | 19 | import com.google.gson.JsonObject; 20 | import org.jetbrains.annotations.NotNull; 21 | 22 | /** 23 | * @author Gianlu 24 | */ 25 | public abstract class JsonWrapper { 26 | public final JsonObject obj; 27 | 28 | public JsonWrapper(@NotNull JsonObject obj) { 29 | this.obj = obj; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return obj.toString(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/AlbumGroup.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Compare to [AlbumType] this field represents relationship between the artist and the album. 8 | */ 9 | public enum AlbumGroup { 10 | 11 | ALBUM("album"), 12 | APPEARS_ON("appears_on"), 13 | COMPILATION("compilation"), 14 | SINGLE("single"); 15 | 16 | private static final Map map = new HashMap<>(); 17 | 18 | static { 19 | for (AlbumGroup albumGroup : AlbumGroup.values()) { 20 | map.put(albumGroup.group, albumGroup); 21 | } 22 | } 23 | 24 | public final String group; 25 | 26 | AlbumGroup(final String group) { 27 | this.group = group; 28 | } 29 | 30 | public static AlbumGroup keyOf(String type) { 31 | return map.get(type); 32 | } 33 | 34 | /** 35 | * Get the album group as a string. 36 | * 37 | * @return Album group as string. 38 | */ 39 | public String getGroup() { 40 | return group; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/dialogs/HTMLDialog.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/ProductType.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * An enumeration of all possible Spotify product types. 8 | */ 9 | public enum ProductType { 10 | 11 | BASIC_DESKTOP("basic-desktop"), 12 | DAYPASS("daypass"), 13 | FREE("free"), 14 | OPEN("open"), 15 | PREMIUM("premium"); 16 | 17 | private static final Map map = new HashMap<>(); 18 | 19 | static { 20 | for (ProductType productType : ProductType.values()) { 21 | map.put(productType.type, productType); 22 | } 23 | } 24 | 25 | public final String type; 26 | 27 | ProductType(final String type) { 28 | this.type = type; 29 | } 30 | 31 | public static ProductType keyOf(String type) { 32 | return map.get(type); 33 | } 34 | 35 | /** 36 | * Get the Spotify product type as a string. 37 | * 38 | * @return The Spotify product type as a string. 39 | */ 40 | public String getType() { 41 | return type; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/DecodedAudioStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio; 18 | 19 | import com.spotifyxp.deps.xyz.gianlu.librespot.audio.format.SuperAudioFormat; 20 | import org.jetbrains.annotations.NotNull; 21 | 22 | 23 | /** 24 | * @author devgianlu 25 | */ 26 | public interface DecodedAudioStream { 27 | @NotNull 28 | AbsChunkedInputStream stream(); 29 | 30 | @NotNull 31 | SuperAudioFormat codec(); 32 | 33 | @NotNull 34 | String describe(); 35 | 36 | int decryptTimeMs(); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/common/Log4JUncaughtExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.common; 18 | 19 | import com.spotifyxp.logging.ConsoleLoggingModules; 20 | import org.jetbrains.annotations.NotNull; 21 | 22 | /** 23 | * @author devgianlu 24 | */ 25 | public class Log4JUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { 26 | 27 | @Override 28 | public void uncaughtException(@NotNull Thread t, Throwable e) { 29 | ConsoleLoggingModules.error("[{}]", t.getName(), e); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/CopyrightType.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import com.spotifyxp.deps.se.michaelthelin.spotify.model_objects.specification.Copyright; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * An enumeration of all possible {@link Copyright} types. 10 | */ 11 | public enum CopyrightType { 12 | 13 | C("c"), 14 | P("p"); 15 | 16 | private static final Map map = new HashMap<>(); 17 | 18 | static { 19 | for (CopyrightType copyrightType : CopyrightType.values()) { 20 | map.put(copyrightType.type, copyrightType); 21 | } 22 | } 23 | 24 | public final String type; 25 | 26 | CopyrightType(final String type) { 27 | this.type = type; 28 | } 29 | 30 | public static CopyrightType keyOf(String type) { 31 | return map.get(type); 32 | } 33 | 34 | /** 35 | * Get the {@link Copyright} type as a string. 36 | * 37 | * @return {@link Copyright} type as string. 38 | */ 39 | public String getType() { 40 | return type; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/mouse/NativeMouseWheelAdapter.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.github.kwhat.jnativehook.mouse; 19 | 20 | /** 21 | * @deprecated No need to extend this class, implement the {@code NativeMouseWheelListener} interface instead 22 | */ 23 | 24 | public class NativeMouseWheelAdapter implements NativeMouseWheelListener { 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/configuration/ICustomConfigValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.configuration; 17 | 18 | import javax.swing.*; 19 | import java.awt.event.ItemListener; 20 | import java.util.ArrayList; 21 | 22 | public interface ICustomConfigValue{ 23 | ConfigValueTypes internalType(); 24 | 25 | boolean check(); 26 | 27 | JComponent getComponent(); 28 | 29 | void setOnClickListener(ItemListener listener); 30 | 31 | void writeDefault(); 32 | 33 | Object getValue(); 34 | 35 | Object getDefaultValue(); 36 | 37 | ArrayList getPossibleValues(); 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/dialogs/LyricsDialog.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/swingextension/PaintPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.swingextension; 17 | 18 | import javax.swing.*; 19 | import java.awt.*; 20 | 21 | public class PaintPanel extends JPanel { 22 | 23 | @FunctionalInterface 24 | public interface onPaint { 25 | void run(Graphics g); 26 | } 27 | 28 | private onPaint onPaint; 29 | 30 | public PaintPanel(onPaint onPaint) { 31 | this.onPaint = onPaint; 32 | } 33 | 34 | 35 | @Override 36 | public void paint(Graphics g) { 37 | super.paint(g); 38 | onPaint.run(g); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/utils/AsyncActionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.utils; 17 | 18 | import java.awt.event.ActionEvent; 19 | import java.awt.event.ActionListener; 20 | 21 | public class AsyncActionListener implements ActionListener { 22 | private final ActionListener listener; 23 | 24 | public AsyncActionListener(ActionListener listener) { 25 | this.listener = listener; 26 | } 27 | 28 | @Override 29 | public void actionPerformed(ActionEvent e) { 30 | Thread thread = new Thread(() -> listener.actionPerformed(e)); 31 | thread.start(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/CurrentlyPlayingType.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * An enumeration of all possible currently playing types. 8 | */ 9 | public enum CurrentlyPlayingType { 10 | 11 | TRACK("track"), 12 | EPISODE("episode"), 13 | AD("ad"), 14 | UNKNOWN("unknown"); 15 | 16 | private static final Map map = new HashMap<>(); 17 | 18 | static { 19 | for (CurrentlyPlayingType currentlyPlayingType : CurrentlyPlayingType.values()) { 20 | map.put(currentlyPlayingType.type, currentlyPlayingType); 21 | } 22 | } 23 | 24 | 25 | private final String type; 26 | 27 | CurrentlyPlayingType(final String type) { 28 | this.type = type; 29 | } 30 | 31 | public static CurrentlyPlayingType keyOf(String type) { 32 | return map.get(type); 33 | } 34 | 35 | /** 36 | * Get the currently playing type as a string. 37 | * 38 | * @return The currently playing type as a string. 39 | */ 40 | public String getType() { 41 | return type; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/Debug.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | public class Debug implements Argument { 21 | @Override 22 | public Runnable runArgument(String parameter1) { 23 | return () -> PublicValues.debug = true; 24 | } 25 | 26 | @Override 27 | public String getName() { 28 | return "debug"; 29 | } 30 | 31 | @Override 32 | public String getDescription() { 33 | return "Enables Debugging"; 34 | } 35 | 36 | @Override 37 | public boolean hasParameter() { 38 | return false; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/ReleaseDatePrecision.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * An enumeration of all possible release date precisions. 8 | */ 9 | public enum ReleaseDatePrecision { 10 | 11 | DAY("day"), 12 | MONTH("month"), 13 | YEAR("year"); 14 | 15 | private static final Map map = new HashMap<>(); 16 | 17 | static { 18 | for (ReleaseDatePrecision releaseDatePrecision : ReleaseDatePrecision.values()) { 19 | map.put(releaseDatePrecision.precision, releaseDatePrecision); 20 | } 21 | } 22 | 23 | public final String precision; 24 | 25 | ReleaseDatePrecision(final String precision) { 26 | this.precision = precision; 27 | } 28 | 29 | public static ReleaseDatePrecision keyOf(String precision) { 30 | return map.get(precision); 31 | } 32 | 33 | /** 34 | * Get the release date precision as a string. 35 | * 36 | * @return The release date precision as a string. 37 | */ 38 | public String getPrecision() { 39 | return precision; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/utils/ArchitectureDetection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.utils; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | public class ArchitectureDetection { 21 | public ArchitectureDetection() { 22 | String arch = System.getProperty("os.arch"); 23 | if (arch.equals("x86_64")) { 24 | PublicValues.architecture = Architecture.amd64; 25 | return; 26 | } 27 | PublicValues.architecture = Architecture.valueOf(arch); 28 | } 29 | 30 | public enum Architecture { 31 | x86, 32 | amd64, 33 | arm, 34 | arm64 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/icons/refreshdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 11 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/icons/refreshwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 11 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/mercury/ProtobufMercuryRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.mercury; 18 | 19 | import com.google.protobuf.Message; 20 | import com.google.protobuf.Parser; 21 | import org.jetbrains.annotations.NotNull; 22 | 23 | /** 24 | * @author Gianlu 25 | */ 26 | public class ProtobufMercuryRequest

{ 27 | final RawMercuryRequest request; 28 | final Parser

parser; 29 | 30 | ProtobufMercuryRequest(@NotNull RawMercuryRequest request, @NotNull Parser

parser) { 31 | this.request = request; 32 | this.parser = parser; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/storage/AudioFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio.storage; 18 | 19 | import com.spotifyxp.deps.xyz.gianlu.librespot.audio.GeneralWritableStream; 20 | 21 | import java.io.Closeable; 22 | import java.io.IOException; 23 | 24 | /** 25 | * @author Gianlu 26 | */ 27 | public interface AudioFile extends Closeable, GeneralWritableStream { 28 | void writeChunk(byte[] chunk, int chunkIndex, boolean cached) throws IOException; 29 | 30 | void writeHeader(int id, byte[] bytes, boolean cached) throws IOException; 31 | 32 | void streamError(int chunkIndex, short code); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/stabilizer/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.stabilizer; 17 | 18 | import com.spotifyxp.logging.ConsoleLogging; 19 | import com.spotifyxp.utils.GraphicalMessage; 20 | 21 | @SuppressWarnings("CallToPrintStackTrace") 22 | public class GlobalExceptionHandler implements Thread.UncaughtExceptionHandler { 23 | @Override 24 | public void uncaughtException(Thread thread, Throwable throwable) { 25 | ConsoleLogging.Throwable(throwable); 26 | throwable.printStackTrace(); 27 | if (throwable instanceof OutOfMemoryError) { 28 | GraphicalMessage.sorryErrorExit("Out of memory"); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /available_svgs_viewer.py: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | import tkinter 3 | import os 4 | import tksvg 5 | from tkscrolledframe import ScrolledFrame 6 | 7 | gui = tkinter.Tk() 8 | gui.title("Available svgs viewer") 9 | 10 | width = 600 11 | height = 400 12 | images = [] 13 | 14 | scroll_frame = ScrolledFrame(gui, width=width, height=height) 15 | scroll_frame.pack(side='top', expand=True, fill='both') 16 | scroll_frame.bind_scroll_wheel(gui) 17 | 18 | frame = scroll_frame.display_widget(Frame) 19 | 20 | width_of_image = width / 5 21 | x = 0 22 | y = 0 23 | for file in os.listdir("src/main/resources/icons"): 24 | if x == 5: 25 | y += 1 26 | x = 0 27 | filename = os.path.splitext(os.path.basename(file))[0] 28 | if filename.endswith("white"): continue 29 | iframe = tkinter.Frame(frame, width=width_of_image, height=width_of_image + (width_of_image / 100 * 20)) 30 | iframe.grid(column=x, row=y) 31 | svg_image = tksvg.SvgImage(data=open("src/main/resources/icons/" + file, "r").read(), scaletoheight=width_of_image) 32 | images.append(svg_image) 33 | tkinter.Label(iframe, image=svg_image).grid(column=0, row=0) 34 | tkinter.Label(iframe, text=filename).grid(column=0, row=1) 35 | x += 1 36 | 37 | gui.wm_minsize(width + 110, height) 38 | try: 39 | gui.mainloop() 40 | except KeyboardInterrupt: 41 | pass -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/NoMediaControl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | public class NoMediaControl implements Argument { 21 | 22 | @Override 23 | public Runnable runArgument(String commands) { 24 | return () -> PublicValues.enableMediaControl = false; 25 | } 26 | 27 | @Override 28 | public String getName() { 29 | return "disablemediacontrol"; 30 | } 31 | 32 | @Override 33 | public String getDescription() { 34 | return "Disbles media control per media keys"; 35 | } 36 | 37 | @Override 38 | public boolean hasParameter() { 39 | return false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/Language.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | public class Language implements Argument { 21 | @Override 22 | public Runnable runArgument(String parameter1) { 23 | return () -> PublicValues.language.setNoAutoFindLanguage(parameter1); 24 | } 25 | 26 | @Override 27 | public String getName() { 28 | return "language"; 29 | } 30 | 31 | @Override 32 | public String getDescription() { 33 | return "Sets the language to use (Parameter z.b 'de' or 'en')"; 34 | } 35 | 36 | @Override 37 | public boolean hasParameter() { 38 | return true; 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/extra/Stub.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks.extra; 16 | 17 | import com.spotifyxp.deps.io.ByteReader; 18 | import com.spotifyxp.deps.io.ByteWriter; 19 | import com.spotifyxp.deps.mslinks.Serializable; 20 | 21 | import java.io.IOException; 22 | 23 | public class Stub implements Serializable { 24 | 25 | private final int sign; 26 | private final byte[] data; 27 | 28 | public Stub(ByteReader br, int sz, int sgn) throws IOException { 29 | int len = sz - 8; 30 | sign = sgn; 31 | data = new byte[len]; 32 | for (int i = 0; i < len; i++) 33 | data[i] = (byte) br.read(); 34 | } 35 | 36 | @Override 37 | public void serialize(ByteWriter bw) throws IOException { 38 | bw.write4bytes(data.length + 8); 39 | bw.write4bytes(sign); 40 | bw.write(data); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/Help.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | public class Help implements Argument { 21 | @Override 22 | public Runnable runArgument(String parameter1) { 23 | return () -> { 24 | PublicValues.argParser.printHelp(); 25 | System.exit(0); 26 | }; 27 | } 28 | 29 | @Override 30 | public String getName() { 31 | return "help"; 32 | } 33 | 34 | @Override 35 | public String getDescription() { 36 | return "Prints this message"; 37 | } 38 | 39 | @Override 40 | public boolean hasParameter() { 41 | return false; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/ModelObjectType.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * An enumeration of all possible model object types. 8 | */ 9 | public enum ModelObjectType { 10 | 11 | ALBUM("album"), 12 | ARTIST("artist"), 13 | AUDIO_FEATURES("audio_features"), 14 | EPISODE("episode"), 15 | GENRE("genre"), 16 | PLAYLIST("playlist"), 17 | SHOW("show"), 18 | TRACK("track"), 19 | USER("user"); 20 | 21 | private static final Map map = new HashMap<>(); 22 | 23 | static { 24 | for (ModelObjectType modelObjectType : ModelObjectType.values()) { 25 | map.put(modelObjectType.type, modelObjectType); 26 | } 27 | } 28 | 29 | public final String type; 30 | 31 | ModelObjectType(final String type) { 32 | this.type = type; 33 | } 34 | 35 | public static ModelObjectType keyOf(String type) { 36 | return map.get(type); 37 | } 38 | 39 | /** 40 | * Get the model object type as a string. 41 | * 42 | * @return The model object type as a string. 43 | */ 44 | public String getType() { 45 | return this.type; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/mouse/NativeMouseAdapter.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.github.kwhat.jnativehook.mouse; 19 | 20 | /** 21 | * Adapter implementation of the NativeMouseListener interface. The methods are empty so the super 22 | * call is obsolete. 23 | * 24 | * @author Johannes Boczek 25 | * @deprecated No need to extend this class, implement the {@code NativeMouseListener} interface instead 26 | */ 27 | 28 | public class NativeMouseAdapter implements NativeMouseListener { 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/keyboard/NativeKeyAdapter.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.github.kwhat.jnativehook.keyboard; 19 | 20 | /** 21 | * Adapter implementation of the NativeKeyListener interface. The methods are empty so the super 22 | * call is obsolete. 23 | * 24 | * @author Johannes Boczek 25 | * @since 2.1 26 | * @deprecated No need to extend this class, implement the {@code NativeKeyListener} interface instead 27 | */ 28 | 29 | public class NativeKeyAdapter implements NativeKeyListener { 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/data/BitSet32.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks.data; 16 | 17 | import com.spotifyxp.deps.io.ByteReader; 18 | import com.spotifyxp.deps.io.ByteWriter; 19 | import com.spotifyxp.deps.mslinks.Serializable; 20 | 21 | import java.io.IOException; 22 | 23 | public class BitSet32 implements Serializable { 24 | private int d; 25 | 26 | public BitSet32(int n) { 27 | d = n; 28 | } 29 | 30 | public BitSet32(ByteReader data) throws IOException { 31 | d = (int) data.read4bytes(); 32 | } 33 | 34 | protected boolean get(int i) { 35 | return (d & (1 << i)) != 0; 36 | } 37 | 38 | protected void set(int i) { 39 | d = (d & ~(1 << i)) | (1 << i); 40 | } 41 | 42 | protected void clear(int i) { 43 | d = d & ~(1 << i); 44 | } 45 | 46 | public void serialize(ByteWriter bw) throws IOException { 47 | bw.write4bytes(d); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/mouse/NativeMouseMotionAdapter.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.github.kwhat.jnativehook.mouse; 19 | 20 | /** 21 | * Adapter implementation of the NativeMouseMotionListener interface. The methods are empty so the 22 | * super call is obsolete. 23 | * 24 | * @author Johannes Boczek 25 | * @deprecated No need to extend this class, implement the {@code NativeMouseMotionListener} interface instead 26 | */ 27 | 28 | public class NativeMouseMotionAdapter implements NativeMouseMotionListener { 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/Development.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | public class Development implements Argument { 21 | @Override 22 | public Runnable runArgument(String parameter1) { 23 | return new Runnable() { 24 | @Override 25 | public void run() { 26 | PublicValues.devMode = true; 27 | } 28 | }; 29 | } 30 | 31 | @Override 32 | public String getName() { 33 | return "devMode"; 34 | } 35 | 36 | @Override 37 | public String getDescription() { 38 | return "Enable devMode"; 39 | } 40 | 41 | @Override 42 | public boolean hasParameter() { 43 | return false; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/decoders/SeekableInputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.decoders; 18 | 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | 22 | /** 23 | * @author devgianlu 24 | */ 25 | public abstract class SeekableInputStream extends InputStream { 26 | public abstract int size(); 27 | 28 | public abstract int position(); 29 | 30 | public abstract void seek(int seekZero) throws IOException; 31 | 32 | public abstract long skip(long skip) throws IOException; 33 | 34 | public abstract int read(byte[] buffer, int index, int length) throws IOException; 35 | 36 | public abstract void close(); 37 | 38 | public abstract int decodedLength(); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/mouse/NativeMouseInputAdapter.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.github.kwhat.jnativehook.mouse; 19 | 20 | /** 21 | * Adapter implementation of the NativeMouseInputListener interface. The methods are empty so the 22 | * super call is obsolete. 23 | * 24 | * @author Johannes Boczek 25 | * @since 2.1 26 | * @deprecated No need to extend this class, implement the {@code NativeMouseInputListener} interface instead 27 | */ 28 | 29 | public class NativeMouseInputAdapter implements NativeMouseInputListener { 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/metadata/UnsupportedId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.metadata; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | /** 22 | * @author Gianlu 23 | */ 24 | public final class UnsupportedId implements PlayableId { 25 | private final String uri; 26 | 27 | UnsupportedId(@NotNull String uri) { 28 | this.uri = uri; 29 | } 30 | 31 | @Override 32 | public boolean hasGid() { 33 | return false; 34 | } 35 | 36 | @Override 37 | public @NotNull String toSpotifyUri() { 38 | return uri; 39 | } 40 | 41 | @NotNull 42 | @Override 43 | public String toString() { 44 | return "UnsupportedId{" + toSpotifyUri() + '}'; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/github/kwhat/jnativehook/mouse/NativeMouseInputListener.java: -------------------------------------------------------------------------------- 1 | /* JNativeHook: Global keyboard and mouse listeners for Java. 2 | * Copyright (C) 2006-2021 Alexander Barker. All Rights Reserved. 3 | * https://github.com/kwhat/jnativehook/ 4 | * 5 | * JNativeHook is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published 7 | * by the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * JNativeHook is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.github.kwhat.jnativehook.mouse; 19 | 20 | /** 21 | * A listener implementing all the methods in both the NativeMouseListener and 22 | * NativeMouseMotionListener interfaces. 23 | * 24 | * @author Alexander Barker (alex@1stleg.com) 25 | * @version 2.0 26 | * @see NativeMouseEvent 27 | * @since 1.0 28 | */ 29 | public interface NativeMouseInputListener extends NativeMouseListener, NativeMouseMotionListener { 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/data/Size.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks.data; 16 | 17 | import com.spotifyxp.deps.io.ByteWriter; 18 | import com.spotifyxp.deps.mslinks.Serializable; 19 | 20 | import java.io.IOException; 21 | 22 | public class Size implements Serializable { 23 | private int x, y; 24 | 25 | public Size() { 26 | x = y = 0; 27 | } 28 | 29 | public Size(int _x, int _y) { 30 | x = _x; 31 | y = _y; 32 | } 33 | 34 | public int getX() { 35 | return x; 36 | } 37 | 38 | public Size setX(int x) { 39 | this.x = x; 40 | return this; 41 | } 42 | 43 | public int getY() { 44 | return y; 45 | } 46 | 47 | public Size setY(int y) { 48 | this.y = y; 49 | return this; 50 | } 51 | 52 | @Override 53 | public void serialize(ByteWriter bw) throws IOException { 54 | bw.write2bytes(x); 55 | bw.write2bytes(y); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/support/SupportModuleLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.support; 17 | 18 | import com.spotifyxp.Flags; 19 | 20 | import java.util.ArrayList; 21 | 22 | public class SupportModuleLoader { 23 | private static final ArrayList supportModules = new ArrayList<>(); 24 | 25 | public SupportModuleLoader() { 26 | if(Flags.linuxSupport) supportModules.add(new LinuxSupportModule()); 27 | if(Flags.macosSupport) supportModules.add(new MacOSXSupportModule()); 28 | } 29 | 30 | public void loadModules() { 31 | for (SupportModule module : supportModules) { 32 | if (module.getOSName().equals(System.getProperty("os.name"))) { 33 | module.run(); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/swingextension/JDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.swingextension; 17 | 18 | import com.spotifyxp.PublicValues; 19 | import com.spotifyxp.panels.ContentPanel; 20 | import com.spotifyxp.utils.Resources; 21 | import com.spotifyxp.utils.Utils; 22 | 23 | import javax.imageio.ImageIO; 24 | import java.io.IOException; 25 | 26 | public class JDialog extends javax.swing.JDialog { 27 | public JDialog() throws IOException { 28 | super(ContentPanel.frame); 29 | setIconImage(ImageIO.read(new Resources().readToInputStream("ntify.png"))); 30 | } 31 | 32 | public void pack() { 33 | if (ContentPanel.frame.isVisible()) { 34 | Utils.moveToScreen(this, PublicValues.screenNumber); 35 | } 36 | super.pack(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/api/OAuthPKCE.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.api; 17 | 18 | import com.spotifyxp.manager.InstanceManager; 19 | import com.spotifyxp.utils.Token; 20 | 21 | public class OAuthPKCE { 22 | private String token; 23 | 24 | public OAuthPKCE() { 25 | token = Token.getDefaultToken(); 26 | } 27 | 28 | /** 29 | * Returns the Spotify api token that was generated from the spotify server 30 | * 31 | * @return API Token 32 | */ 33 | public String getToken() { 34 | return token; 35 | } 36 | 37 | 38 | /** 39 | * Refreshes the Spotify api token 40 | */ 41 | public void refresh() { 42 | token = Token.getDefaultToken(); 43 | InstanceManager.getSpotifyApi().setAccessToken(token); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/decoders/SeekableInputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.decoders; 18 | 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | 22 | /** 23 | * @author devgianlu 24 | */ 25 | @SuppressWarnings("NullableProblems") 26 | public abstract class SeekableInputStream extends InputStream { 27 | public abstract int size(); 28 | 29 | public abstract int position(); 30 | 31 | public abstract void seek(int seekZero) throws IOException; 32 | 33 | public abstract long skip(long skip) throws IOException; 34 | 35 | public abstract int read(byte[] buffer, int index, int length) throws IOException; 36 | 37 | public abstract void close(); 38 | 39 | public abstract int decodedLength(); 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/zeroconf/RecordPTR.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.xyz.gianlu.zeroconf; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | import java.nio.ByteBuffer; 6 | 7 | public class RecordPTR extends Record { 8 | private String value; 9 | 10 | RecordPTR() { 11 | super(TYPE_PTR); 12 | } 13 | 14 | RecordPTR(String name, String value) { 15 | this(); 16 | setName(name); 17 | this.value = value; 18 | } 19 | 20 | /** 21 | * For queries 22 | */ 23 | RecordPTR(String name) { 24 | this(); 25 | setName(name); 26 | } 27 | 28 | @Override 29 | protected void readData(int len, ByteBuffer in) { 30 | value = readName(in); 31 | } 32 | 33 | @Override 34 | protected int writeData(ByteBuffer out, Packet packet) { 35 | return value != null ? writeName(value, out, packet) : -1; 36 | } 37 | 38 | public String getValue() { 39 | return value; 40 | } 41 | 42 | @Override 43 | @NotNull 44 | public String toString() { 45 | StringBuilder sb = new StringBuilder(); 46 | sb.append("{type:ptr, name:\""); 47 | sb.append(getName()); 48 | sb.append('\"'); 49 | if (value != null) { 50 | sb.append(", value:\""); 51 | sb.append(getValue()); 52 | sb.append('\"'); 53 | } 54 | sb.append('}'); 55 | return sb.toString(); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/dealer/MessageType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.dealer; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | /** 22 | * @author Gianlu 23 | */ 24 | public enum MessageType { 25 | PING("ping"), PONG("pong"), MESSAGE("message"), REQUEST("request"); 26 | 27 | private final String val; 28 | 29 | MessageType(@NotNull String val) { 30 | this.val = val; 31 | } 32 | 33 | @NotNull 34 | public static MessageType parse(@NotNull String type) { 35 | for (MessageType msg : values()) 36 | if (msg.val.equals(type)) 37 | return msg; 38 | 39 | throw new IllegalArgumentException("Unknown MessageType: " + type); 40 | } 41 | 42 | @NotNull 43 | public String value() { 44 | return val; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/SetupComplete.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | import com.spotifyxp.PublicValues; 19 | import com.spotifyxp.logging.ConsoleLogging; 20 | 21 | @SuppressWarnings("ConstantValue") 22 | public class SetupComplete implements Argument { 23 | @Override 24 | public Runnable runArgument(String parameter1) { 25 | return () -> { 26 | PublicValues.foundSetupArgument = true; 27 | ConsoleLogging.info("Found setup argument => " + PublicValues.foundSetupArgument); 28 | }; 29 | } 30 | 31 | @Override 32 | public String getName() { 33 | return "setup-complete"; 34 | } 35 | 36 | @Override 37 | public String getDescription() { 38 | return "Run SpotifyXP without Setup"; 39 | } 40 | 41 | @Override 42 | public boolean hasParameter() { 43 | return false; 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/events/LibraryChange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.events; 17 | 18 | public class LibraryChange { 19 | public enum Type { 20 | ARTIST, 21 | ALBUM, 22 | SHOW, 23 | EPISODE, 24 | TRACK, 25 | PLAYLIST 26 | } 27 | 28 | public enum Action { 29 | REMOVE, 30 | ADD 31 | } 32 | 33 | private final Type type; 34 | private final Action action; 35 | private final String uri; 36 | 37 | public LibraryChange(String uri, Type type, Action action) { 38 | this.uri = uri; 39 | this.type = type; 40 | this.action = action; 41 | } 42 | 43 | public Type getType() { 44 | return type; 45 | } 46 | 47 | public Action getAction() { 48 | return action; 49 | } 50 | 51 | public String getUri() { 52 | return uri; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/injector/InjectorInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.injector; 17 | 18 | import java.util.ArrayList; 19 | 20 | public interface InjectorInterface { 21 | /** 22 | * Will be removed in favor of the plugin.json 23 | */ 24 | @Deprecated 25 | default String getIdentifier() {return "";} 26 | 27 | /** 28 | * Will be removed in favor of the plugin.json 29 | */ 30 | @Deprecated 31 | default String getVersion() {return "";} 32 | 33 | /** 34 | * Will be removed in favor of the plugin.json 35 | */ 36 | @Deprecated 37 | default String getAuthor() {return "";} 38 | 39 | /** 40 | * Will be removed in favor of the plugin.json 41 | */ 42 | @Deprecated 43 | default ArrayList getDependencies() { 44 | return new ArrayList<>(); 45 | } 46 | 47 | void init(); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/json/StationsWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.json; 18 | 19 | import com.google.gson.JsonObject; 20 | import com.spotifyxp.deps.com.spotify.context.ContextTrackOuterClass; 21 | import com.spotifyxp.deps.xyz.gianlu.librespot.common.ProtoUtils; 22 | import org.jetbrains.annotations.NotNull; 23 | 24 | import java.util.List; 25 | 26 | /** 27 | * @author devgianlu 28 | */ 29 | public final class StationsWrapper extends JsonWrapper { 30 | public StationsWrapper(@NotNull JsonObject obj) { 31 | super(obj); 32 | } 33 | 34 | @NotNull 35 | public String uri() { 36 | return obj.get("uri").getAsString(); 37 | } 38 | 39 | @NotNull 40 | public List tracks() { 41 | return ProtoUtils.jsonToContextTracks(obj.getAsJsonArray("tracks")); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/configuration/ConfigValueTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.configuration; 17 | 18 | import java.util.NoSuchElementException; 19 | 20 | /** 21 | * Holds all available config value types 22 | */ 23 | public enum ConfigValueTypes { 24 | STRING, 25 | INT, 26 | BOOLEAN, 27 | CUSTOM; 28 | 29 | public static ConfigValueTypes parse(Object object) { 30 | if (object instanceof String) { 31 | return ConfigValueTypes.STRING; 32 | } else if (object instanceof Integer) { 33 | return ConfigValueTypes.INT; 34 | } else if (object instanceof Boolean) { 35 | return ConfigValueTypes.BOOLEAN; 36 | } else if (ICustomConfigValue.class.isAssignableFrom(object.getClass())) { 37 | return ConfigValueTypes.CUSTOM; 38 | } 39 | throw new NoSuchElementException(object.toString()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/enums/Action.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.enums; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * An enumeration of all possible {@link Action} types. 8 | * 9 | * @see Disallows object 10 | */ 11 | public enum Action { 12 | 13 | INTERRUPTING_PLAYBACK("interrupting_playback"), 14 | PAUSING("pausing"), 15 | RESUMING("resuming"), 16 | SEEKING("seeking"), 17 | SKIPPING_NEXT("skipping_next"), 18 | SKIPPING_PREV("skipping_prev"), 19 | TOGGLING_REPEAT_CONTEXT("toggling_repeat_context"), 20 | TOGGLING_SHUFFLE("toggling_shuffle"), 21 | TOGGLING_REPEAT_TRACK("toggling_repeat_track"), 22 | TRANSFERRING_PLAYBACK("transferring_playback"); 23 | 24 | private static final Map map = new HashMap<>(); 25 | 26 | static { 27 | for (Action action : Action.values()) { 28 | map.put(action.key, action); 29 | } 30 | } 31 | 32 | public final String key; 33 | 34 | Action(final String key) { 35 | this.key = key; 36 | } 37 | 38 | public static Action keyOf(String key) { 39 | return map.get(key); 40 | } 41 | 42 | /** 43 | * Get the {@link Action} key as a string. 44 | * 45 | * @return {@link Action} key as string. 46 | */ 47 | public String getKey() { 48 | return key; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/mixing/output/StreamOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.mixing.output; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | import java.io.IOException; 22 | import java.io.OutputStream; 23 | 24 | /** 25 | * @author devgianlu 26 | */ 27 | public final class StreamOutput implements SinkOutput { 28 | private final OutputStream stream; 29 | private final boolean close; 30 | 31 | public StreamOutput(@NotNull OutputStream stream, boolean close) { 32 | this.stream = stream; 33 | this.close = close; 34 | } 35 | 36 | @Override 37 | public void write(byte[] buffer, int offset, int len) throws IOException { 38 | stream.write(buffer, offset, len); 39 | } 40 | 41 | @Override 42 | public void close() throws IOException { 43 | if (close) stream.close(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/data/ItemIDUnknown.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/DmitriiShamrikov/mslinks 3 | 4 | Copyright (c) 2022 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks.data; 16 | 17 | import com.spotifyxp.deps.io.ByteReader; 18 | import com.spotifyxp.deps.io.ByteWriter; 19 | import com.spotifyxp.deps.mslinks.ShellLinkException; 20 | 21 | import java.io.IOException; 22 | 23 | public class ItemIDUnknown extends ItemID { 24 | 25 | protected byte[] data; 26 | 27 | public ItemIDUnknown(int flags) { 28 | super(flags); 29 | } 30 | 31 | @Override 32 | public void load(ByteReader br, int maxSize) throws IOException, ShellLinkException { 33 | int startPos = br.getPosition(); 34 | 35 | super.load(br, maxSize); 36 | 37 | int bytesRead = br.getPosition() - startPos; 38 | data = new byte[maxSize - bytesRead]; 39 | br.read(data); 40 | } 41 | 42 | @Override 43 | public void serialize(ByteWriter bw) throws IOException { 44 | super.serialize(bw); 45 | bw.write(data); 46 | } 47 | 48 | @Override 49 | public String toString() { 50 | return String.format("", typeFlags); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/injector/InjectorStore.form: -------------------------------------------------------------------------------- 1 | 2 |

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/mixing/output/SinkOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.mixing.output; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | import org.jetbrains.annotations.Range; 21 | 22 | import java.io.Closeable; 23 | import java.io.IOException; 24 | 25 | /** 26 | * @author devgianlu 27 | */ 28 | public interface SinkOutput extends Closeable { 29 | default boolean start(@NotNull OutputAudioFormat format) throws SinkException { 30 | return false; 31 | } 32 | 33 | void write(byte[] buffer, int offset, int len) throws IOException; 34 | 35 | default boolean setVolume(@Range(from = 0, to = 1) float volume) { 36 | return false; 37 | } 38 | 39 | default void release() { 40 | } 41 | 42 | default void drain() { 43 | } 44 | 45 | default void flush() { 46 | } 47 | 48 | default void stop() { 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/zeroconf/RecordA.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.xyz.gianlu.zeroconf; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | import java.io.IOException; 7 | import java.net.Inet4Address; 8 | import java.net.InetAddress; 9 | import java.nio.ByteBuffer; 10 | 11 | public class RecordA extends Record { 12 | private byte[] address; 13 | 14 | RecordA() { 15 | super(TYPE_A); 16 | } 17 | 18 | RecordA(String name, Inet4Address address) { 19 | this(); 20 | setName(name); 21 | setTTL(120); 22 | this.address = address.getAddress(); 23 | } 24 | 25 | @Override 26 | protected void readData(int len, ByteBuffer in) { 27 | address = new byte[len]; 28 | in.get(address); 29 | } 30 | 31 | @Override 32 | protected int writeData(ByteBuffer out, Packet packet) { 33 | if (address != null) { 34 | out.put(address); 35 | return address.length; 36 | } else { 37 | return -1; 38 | } 39 | } 40 | 41 | @Nullable 42 | public Inet4Address getAddress() { 43 | try { 44 | return address == null ? null : (Inet4Address) InetAddress.getByAddress(address); 45 | } catch (IOException ex) { 46 | throw new IllegalStateException(ex); 47 | } 48 | } 49 | 50 | @Override 51 | @NotNull 52 | public String toString() { 53 | return "{type:a, name:\"" + getName() + "\", address:\"" + getAddress() + "\"}"; 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/args/CustomSaveDir.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.args; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | public class CustomSaveDir implements Argument { 21 | @Override 22 | public Runnable runArgument(String parameter1) { 23 | return () -> { 24 | PublicValues.fileslocation = parameter1; 25 | PublicValues.configfilepath = PublicValues.fileslocation + "/config.json"; 26 | PublicValues.customSaveDir = true; 27 | PublicValues.appLocation = PublicValues.fileslocation; 28 | }; 29 | } 30 | 31 | @Override 32 | public String getName() { 33 | return "custom-savedir"; 34 | } 35 | 36 | @Override 37 | public String getDescription() { 38 | return "Sets save directory (normally AppData) (Paramter z.b 'C://bla' or '/etc/bla')"; 39 | } 40 | 41 | @Override 42 | public boolean hasParameter() { 43 | return true; 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/zeroconf/RecordAAAA.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.xyz.gianlu.zeroconf; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | import java.io.IOException; 7 | import java.net.Inet6Address; 8 | import java.net.InetAddress; 9 | import java.nio.ByteBuffer; 10 | 11 | public class RecordAAAA extends Record { 12 | private byte[] address; 13 | 14 | RecordAAAA() { 15 | super(TYPE_AAAA); 16 | } 17 | 18 | RecordAAAA(String name, Inet6Address value) { 19 | this(); 20 | setName(name); 21 | setTTL(120); 22 | this.address = value.getAddress(); 23 | } 24 | 25 | @Override 26 | protected void readData(int len, ByteBuffer in) { 27 | address = new byte[len]; 28 | in.get(address); 29 | } 30 | 31 | @Override 32 | protected int writeData(ByteBuffer out, Packet packet) { 33 | if (address != null) { 34 | out.put(address); 35 | return address.length; 36 | } else { 37 | return -1; 38 | } 39 | } 40 | 41 | @Nullable 42 | public Inet6Address getAddress() { 43 | try { 44 | return address == null ? null : (Inet6Address) InetAddress.getByAddress(address); 45 | } catch (IOException ex) { 46 | throw new IllegalStateException(ex); 47 | } 48 | } 49 | 50 | @Override 51 | @NotNull 52 | public String toString() { 53 | return "{type:aaaa, name:\"" + getName() + "\", address:\"" + getAddress() + "\"}"; 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/guielements/DefTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.guielements; 17 | 18 | import com.spotifyxp.utils.RunnableQueue; 19 | 20 | import javax.swing.*; 21 | import java.util.concurrent.LinkedBlockingQueue; 22 | import java.util.concurrent.ThreadPoolExecutor; 23 | import java.util.concurrent.TimeUnit; 24 | 25 | public class DefTable extends JTable { 26 | final RunnableQueue queue = new RunnableQueue(new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>())); 27 | 28 | @Override 29 | public boolean isCellEditable(int row, int column) { 30 | return false; 31 | } 32 | 33 | @Override 34 | public int getSelectedRow() { 35 | if (getSelectedRowCount() > 1) { 36 | return super.getSelectedRows()[0]; 37 | } 38 | return super.getSelectedRow(); 39 | } 40 | 41 | public void addModifyAction(Runnable runnable) { 42 | queue.enqueue(runnable); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/se/michaelthelin/spotify/requests/data/episodes/SaveEpisodesRequest.java: -------------------------------------------------------------------------------- 1 | package com.spotifyxp.deps.se.michaelthelin.spotify.requests.data.episodes; 2 | 3 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 4 | import com.spotifyxp.deps.se.michaelthelin.spotify.requests.data.AbstractDataRequest; 5 | import okhttp3.MediaType; 6 | import okhttp3.RequestBody; 7 | import org.json.JSONObject; 8 | 9 | import java.io.IOException; 10 | 11 | @JsonDeserialize(builder = SaveEpisodesRequest.Builder.class) 12 | public class SaveEpisodesRequest extends AbstractDataRequest { 13 | 14 | protected SaveEpisodesRequest(AbstractDataRequest.Builder builder) { 15 | super(builder); 16 | } 17 | 18 | public static final class Builder extends AbstractDataRequest.Builder { 19 | 20 | public Builder(String accessToken) { 21 | super(accessToken); 22 | } 23 | 24 | public Builder ids(final String[] ids) { 25 | assert (ids != null); 26 | return setBody(RequestBody.create(new JSONObject().put("ids", ids).toString(), MediaType.get("application/json"))); 27 | } 28 | 29 | @Override 30 | protected Builder self() { 31 | return this; 32 | } 33 | 34 | @Override 35 | public SaveEpisodesRequest build() { 36 | setPath("/v1/me/episodes"); 37 | return new SaveEpisodesRequest(this); 38 | } 39 | } 40 | 41 | @Override 42 | public String execute() throws IOException { 43 | return putJson(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/audio/Quality.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.audio; 17 | 18 | /** 19 | * Holds all available audio qualities

20 | * - Normal
21 | * - High
22 | * - Very high 23 | */ 24 | public enum Quality { 25 | NORMAL("Normal", "NORMAL"), 26 | HIGH("High", "HIGH"), 27 | VERY_HIGH("VeryHigh", "VERYHIGH"); 28 | private final String toselect; 29 | private final String configValue; 30 | 31 | Quality(String toselect, String configValue) { 32 | this.toselect = toselect; 33 | this.configValue = configValue; 34 | } 35 | 36 | /** 37 | * Returns the audio quality as a readable string 38 | * 39 | * @return String 40 | */ 41 | public String getAsString() { 42 | return toselect; 43 | } 44 | 45 | /** 46 | * Returns the audio quality as a config value 47 | * 48 | * @return String 49 | */ 50 | public String configValue() { 51 | return configValue; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/theming/themes/MacOS.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.theming.themes; 17 | 18 | import ch.randelshofer.quaqua.QuaquaLookAndFeel; 19 | import com.spotifyxp.logging.ConsoleLogging; 20 | import com.spotifyxp.theming.Theme; 21 | import com.spotifyxp.utils.Utils; 22 | 23 | import javax.swing.*; 24 | 25 | public class MacOS implements Theme { 26 | public MacOS() { 27 | } 28 | 29 | public String getAuthor() { 30 | return "Werwolf2303"; 31 | } 32 | 33 | public boolean isLight() { 34 | return true; 35 | } 36 | 37 | public void initTheme() { 38 | 39 | if(Utils.getJavaVersion() > 8) { 40 | ConsoleLogging.error("Quaqua doesn't support Java version 9 or higher"); 41 | return; 42 | } 43 | 44 | try { 45 | UIManager.setLookAndFeel(new QuaquaLookAndFeel()); 46 | } catch (UnsupportedLookAndFeelException var2) { 47 | ConsoleLogging.Throwable(var2); 48 | } 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/data/ItemIDRoot.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/DmitriiShamrikov/mslinks 3 | 4 | Copyright (c) 2022 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks.data; 16 | 17 | import com.spotifyxp.deps.io.ByteReader; 18 | import com.spotifyxp.deps.mslinks.ShellLinkException; 19 | import com.spotifyxp.deps.mslinks.UnsupportedItemIDException; 20 | 21 | import java.io.IOException; 22 | 23 | public class ItemIDRoot extends ItemIDRegItem { 24 | 25 | public ItemIDRoot() { 26 | super(GROUP_ROOT | TYPE_ROOT_REGITEM); 27 | } 28 | 29 | public ItemIDRoot(int flags) throws UnsupportedItemIDException { 30 | super(flags | GROUP_ROOT); 31 | 32 | int subType = typeFlags & ID_TYPE_INGROUPMASK; 33 | if (subType != TYPE_ROOT_REGITEM) 34 | throw new UnsupportedItemIDException(typeFlags); 35 | } 36 | 37 | @Override 38 | public void load(ByteReader br, int maxSize) throws IOException, ShellLinkException { 39 | int endPos = br.getPosition() + maxSize; 40 | super.load(br, maxSize); 41 | br.seekTo(endPos); 42 | } 43 | 44 | @Override 45 | public String toString() { 46 | if (clsid.equals(Registry.CLSID_COMPUTER)) 47 | return ""; 48 | return super.toString(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/swingextension/SettingsTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.swingextension; 17 | 18 | import com.spotifyxp.PublicValues; 19 | 20 | import javax.swing.*; 21 | 22 | public class SettingsTable extends JPanel { 23 | int ycache = 10; 24 | 25 | public SettingsTable() { 26 | setLayout(null); 27 | } 28 | 29 | public void addSetting(String name, JComponent component) { 30 | JTextField field = new JTextField(name); 31 | field.setHorizontalAlignment(SwingConstants.RIGHT); 32 | field.setEditable(false); 33 | field.setBorder(BorderFactory.createEmptyBorder()); 34 | field.setForeground(PublicValues.globalFontColor); 35 | field.setBounds(10, ycache, getWidth() / 2 - 40, 30); 36 | component.setBounds(10 + field.getWidth(), ycache, getWidth() / 2, 30); 37 | component.setForeground(PublicValues.globalFontColor); 38 | add(component); 39 | add(field); 40 | ycache += component.getHeight() + 10; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/resources/icons/trackdark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | music [#1005] 6 | Created with Sketch. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/icons/trackwhite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | music [#1005] 6 | Created with Sketch. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/data/CNRLinkFlags.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks.data; 16 | 17 | import com.spotifyxp.deps.io.ByteReader; 18 | 19 | import java.io.IOException; 20 | 21 | public class CNRLinkFlags extends BitSet32 { 22 | 23 | public CNRLinkFlags(int n) { 24 | super(n); 25 | reset(); 26 | } 27 | 28 | public CNRLinkFlags(ByteReader data) throws IOException { 29 | super(data); 30 | reset(); 31 | } 32 | 33 | private void reset() { 34 | for (int i = 2; i < 32; i++) 35 | clear(i); 36 | } 37 | 38 | public boolean isValidDevice() { 39 | return get(0); 40 | } 41 | 42 | public boolean isValidNetType() { 43 | return get(1); 44 | } 45 | 46 | public CNRLinkFlags setValidDevice() { 47 | set(0); 48 | return this; 49 | } 50 | 51 | public CNRLinkFlags setValidNetType() { 52 | set(1); 53 | return this; 54 | } 55 | 56 | public CNRLinkFlags clearValidDevice() { 57 | clear(0); 58 | return this; 59 | } 60 | 61 | public CNRLinkFlags clearValidNetType() { 62 | clear(1); 63 | return this; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/javazoom/jl/decoder/FrameDecoder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 09/26/08 throw exception on subbband alloc error: Christopher G. Jennings (cjennings@acm.org) 11/19/04 1.0 moved to LGPL. 3 | * 12/12/99 Initial version. mdm@techie.com----------------------------------------------------------------------- This program is 4 | * free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published 5 | * by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. 9 | * 10 | * You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free 11 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | package com.spotifyxp.deps.javazoom.jl.decoder; 16 | 17 | /** 18 | * Implementations of FrameDecoder are responsible for decoding an MPEG audio frame. 19 | */ 20 | // REVIEW: the interface currently is too thin. There should be 21 | // methods to specify the output buffer, the synthesis filters and 22 | // possibly other objects used by the decoder. 23 | public interface FrameDecoder { 24 | /** 25 | * Decodes one frame of MPEG audio. 26 | */ 27 | void decodeFrame() throws DecoderException; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/cache/JournalHeader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.cache; 18 | 19 | import com.spotifyxp.deps.xyz.gianlu.librespot.common.Utils; 20 | import org.jetbrains.annotations.NotNull; 21 | import org.jetbrains.annotations.Nullable; 22 | 23 | import java.util.List; 24 | 25 | /** 26 | * @author Gianlu 27 | */ 28 | public final class JournalHeader { 29 | public final int id; 30 | public final byte[] value; 31 | 32 | JournalHeader(int id, @NotNull String value) { 33 | this.id = id; 34 | this.value = Utils.hexToBytes(value); 35 | } 36 | 37 | @Nullable 38 | public static JournalHeader find(List headers, byte id) { 39 | for (JournalHeader header : headers) 40 | if (header.id == id) 41 | return header; 42 | 43 | return null; 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return "JournalHeader{" + "id=" + id + ", value=" + Utils.bytesToHex(value) + '}'; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/video/VLCPlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.video; 17 | 18 | import java.awt.*; 19 | 20 | /** Because of hardware limitations, SpotifyXP can only have one video player. 21 | To let other classes that use the player know that another class wants to use it, the new class must 22 | call 'init' after 'isVideoPlaybackEnabled'. !!! Call 'release' when you don't need video playback anymore !!! 23 | **/ 24 | public interface VLCPlayer { 25 | boolean isVideoPlaybackEnabled(); 26 | Container getComponent(); 27 | 28 | /** 29 | * @param onTakeover - Will be called when a new class requests video playback 30 | */ 31 | void init(Runnable onTakeover); 32 | void play(String uriOrFile); 33 | void pause(); 34 | void stop(); 35 | void setLooping(boolean looping); 36 | boolean isLooping(); 37 | boolean isPlaying(); 38 | boolean wasReleased(); 39 | void resume(); 40 | void removeOnTakeOver(); 41 | 42 | /** 43 | * Releases system resources needed for vlc 44 | */ 45 | void release(); 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/audio/format/SuperAudioFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.audio.format; 18 | 19 | import com.spotifyxp.deps.com.spotify.metadata.Metadata; 20 | import org.jetbrains.annotations.NotNull; 21 | 22 | /** 23 | * @author Gianlu 24 | */ 25 | public enum SuperAudioFormat { 26 | MP3, VORBIS, AAC; 27 | 28 | @NotNull 29 | public static SuperAudioFormat get(@NotNull Metadata.AudioFile.Format format) { 30 | switch (format) { 31 | case OGG_VORBIS_96: 32 | case OGG_VORBIS_160: 33 | case OGG_VORBIS_320: 34 | return VORBIS; 35 | case MP3_256: 36 | case MP3_320: 37 | case MP3_160: 38 | case MP3_96: 39 | case MP3_160_ENC: 40 | return MP3; 41 | case AAC_24: 42 | case AAC_48: 43 | case AAC_24_NORM: 44 | return AAC; 45 | default: 46 | throw new IllegalArgumentException("Unknown audio format: " + format); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/swingextension/EasyJLabelUI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2024] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.swingextension; 17 | 18 | import javax.swing.*; 19 | import java.awt.*; 20 | import java.util.ArrayList; 21 | 22 | public class EasyJLabelUI extends JFrame { 23 | private static final ArrayList labels = new ArrayList<>(); 24 | private static JPanel panel; 25 | 26 | public EasyJLabelUI() { 27 | panel = new JPanel(); 28 | JScrollPane pane = new JScrollPane(panel); 29 | panel.setLayout(null); 30 | add(pane, BorderLayout.CENTER); 31 | } 32 | 33 | public void addJLabel(JLabel label) { 34 | if (isVisible()) return; 35 | labels.add(label); 36 | } 37 | 38 | @Override 39 | public void open() { 40 | int ycache = 8; 41 | for (JLabel label : labels) { 42 | label.setBounds(5, ycache, getPreferredSize().width, 15); 43 | panel.add(label); 44 | ycache += 20 + 3; 45 | panel.setPreferredSize(new Dimension(getPreferredSize().width, ycache + 10)); 46 | } 47 | super.open(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/metadata/PlaylistId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.metadata; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | import java.util.regex.Matcher; 22 | import java.util.regex.Pattern; 23 | 24 | /** 25 | * @author devgianlu 26 | */ 27 | public final class PlaylistId implements SpotifyId { 28 | private static final Pattern PATTERN = Pattern.compile("spotify:playlist:(.{22})"); 29 | public final String id; 30 | 31 | private PlaylistId(@NotNull String id) { 32 | this.id = id; 33 | } 34 | 35 | @NotNull 36 | public static PlaylistId fromUri(@NotNull String uri) { 37 | Matcher matcher = PATTERN.matcher(uri); 38 | if (matcher.find()) return new PlaylistId(matcher.group(1)); 39 | else throw new IllegalArgumentException("Not a Spotify playlist ID: " + uri); 40 | } 41 | 42 | @NotNull 43 | public String id() { 44 | return id; 45 | } 46 | 47 | @Override 48 | public @NotNull String toSpotifyUri() { 49 | return String.format("spotify:playlist:%s", id); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/mslinks/data/LinkInfoFlags.java: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/BlackOverlord666/mslinks 3 | 4 | Copyright (c) 2015 Dmitrii Shamrikov 5 | 6 | Licensed under the WTFPL 7 | You may obtain a copy of the License at 8 | 9 | http://www.wtfpl.net/about/ 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | */ 15 | package com.spotifyxp.deps.mslinks.data; 16 | 17 | import com.spotifyxp.deps.io.ByteReader; 18 | 19 | import java.io.IOException; 20 | 21 | public class LinkInfoFlags extends BitSet32 { 22 | 23 | public LinkInfoFlags(int n) { 24 | super(n); 25 | reset(); 26 | } 27 | 28 | public LinkInfoFlags(ByteReader data) throws IOException { 29 | super(data); 30 | reset(); 31 | } 32 | 33 | private void reset() { 34 | for (int i = 2; i < 32; i++) 35 | clear(i); 36 | } 37 | 38 | public boolean hasVolumeIDAndLocalBasePath() { 39 | return get(0); 40 | } 41 | 42 | public boolean hasCommonNetworkRelativeLinkAndPathSuffix() { 43 | return get(1); 44 | } 45 | 46 | public LinkInfoFlags setVolumeIDAndLocalBasePath() { 47 | set(0); 48 | return this; 49 | } 50 | 51 | public LinkInfoFlags setCommonNetworkRelativeLinkAndPathSuffix() { 52 | set(1); 53 | return this; 54 | } 55 | 56 | public LinkInfoFlags clearVolumeIDAndLocalBasePath() { 57 | clear(0); 58 | return this; 59 | } 60 | 61 | public LinkInfoFlags clearCommonNetworkRelativeLinkAndPathSuffix() { 62 | clear(1); 63 | return this; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/common/NameThreadFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.common; 18 | 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | import java.util.concurrent.ThreadFactory; 22 | import java.util.function.Function; 23 | 24 | /** 25 | * @author Gianlu 26 | */ 27 | public final class NameThreadFactory implements ThreadFactory { 28 | private final ThreadGroup group; 29 | private final Function nameProvider; 30 | 31 | public NameThreadFactory(@NotNull Function nameProvider) { 32 | this.nameProvider = nameProvider; 33 | SecurityManager s = System.getSecurityManager(); 34 | group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); 35 | } 36 | 37 | @Override 38 | public @NotNull Thread newThread(@NotNull Runnable r) { 39 | Thread t = new Thread(group, r, nameProvider.apply(r), 0); 40 | if (t.isDaemon()) t.setDaemon(false); 41 | if (t.getPriority() != Thread.NORM_PRIORITY) t.setPriority(Thread.NORM_PRIORITY); 42 | return t; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/theming/themes/DarkGreen.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright [2023-2025] [Gianluca Beil] 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.spotifyxp.theming.themes; 17 | 18 | import com.formdev.flatlaf.FlatDarkLaf; 19 | import com.spotifyxp.PublicValues; 20 | import com.spotifyxp.logging.ConsoleLogging; 21 | import com.spotifyxp.panels.ContentPanel; 22 | import com.spotifyxp.theming.Theme; 23 | 24 | import javax.swing.*; 25 | import java.awt.*; 26 | 27 | public class DarkGreen implements Theme { 28 | @Override 29 | public String getAuthor() { 30 | return "Werwolf2303"; 31 | } 32 | 33 | @Override 34 | public boolean isLight() { 35 | return false; 36 | } 37 | 38 | @Override 39 | public void initTheme() { 40 | ContentPanel.frame.setBackground(Color.getColor("#3c3f41")); 41 | ContentPanel.legacySwitch.setBackground(new Color(63, 63, 63)); 42 | PublicValues.borderColor = Color.black; 43 | try { 44 | UIManager.setLookAndFeel(new FlatDarkLaf()); 45 | } catch (UnsupportedLookAndFeelException e) { 46 | ConsoleLogging.Throwable(e); 47 | } 48 | PublicValues.globalFontColor = Color.green; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/spotifyxp/deps/xyz/gianlu/librespot/player/metrics/NewPlaybackIdEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 devgianlu 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.spotifyxp.deps.xyz.gianlu.librespot.player.metrics; 18 | 19 | import com.spotifyxp.deps.xyz.gianlu.librespot.core.EventService; 20 | import com.spotifyxp.deps.xyz.gianlu.librespot.core.TimeProvider; 21 | import org.jetbrains.annotations.NotNull; 22 | 23 | /** 24 | * Event structure for a new playback ID. 25 | * 26 | * @author devgianlu 27 | */ 28 | public final class NewPlaybackIdEvent implements EventService.GenericEvent { 29 | private final String sessionId; 30 | private final String playbackId; 31 | 32 | public NewPlaybackIdEvent(@NotNull String sessionId, @NotNull String playbackId) { 33 | this.sessionId = sessionId; 34 | this.playbackId = playbackId; 35 | } 36 | 37 | @Override 38 | @NotNull 39 | public EventService.EventBuilder build() { 40 | EventService.EventBuilder event = new EventService.EventBuilder(EventService.Type.NEW_PLAYBACK_ID); 41 | event.append(playbackId).append(sessionId).append(String.valueOf(TimeProvider.currentTimeMillis())); 42 | return event; 43 | } 44 | } 45 | --------------------------------------------------------------------------------