Skip to content

Releases: BytePhilHD/SpotifyLink

v1.4.2 - Bug fixes

Choose a tag to compare

@BytePhilHD BytePhilHD released this 24 Sep 16:01

Full Changelog: v1.4.0...v1.4.2

v1.4.0 - Performance improvements

Pre-release

Choose a tag to compare

@BytePhilHD BytePhilHD released this 12 Sep 09:39

v1.4.0

Highlights

Clients no longer poll the server. The server now watches Spotify centrally and pushes
updates through the existing WebSocket only when something actually changed. Previously
every client sent a refresh request every 2 seconds, regardless of whether anything had
changed — with 50 guests that was ~25 requests per second for roughly one real change
every 3 minutes.

Changed

  • Push instead of polling: one central Spotify poll per second, broadcast on change only.
    Updates now arrive when they happen instead of up to 2 seconds later.
  • The queue is only polled while at least one client has it open (new queue-subscribe action).
  • No Spotify requests at all when no client is connected or while playback is paused.
  • Search input is debounced by 250 ms instead of firing one Spotify search per keystroke.
  • The Spotify display name is cached instead of being requested for every admin update.
  • Admin actions (play/pause, next, back, new session code) trigger an immediate push.
  • default.cfg now ships webaddress=http://127.0.0.1:80/ for local first-time setup.

Fixed

  • Reconnects stacked refresh timers: setInterval lived inside the socket setup and was
    never cleared, so every reconnect added another timer permanently. Replaced by a single
    reconnect timer with exponential backoff (1s → 15s).
  • The first request for the current track or the queue always returned null.
  • Admin-only fields were written into the shared cache object, which leaked the session
    code and the Spotify display name to regular guests.
  • The orange "already requested" marker never worked — the client read isInQueue /
    played while the server sends inQueue.
  • Concurrent writes to the same WebSocket from the push loop and the message handler could
    throw WritePendingException; writes are now serialized per client.
  • A failed write no longer drops a client whose connection is still open.

Internal

  • New BroadcastService (session registry, poll loop, change detection) and ClientSession.
  • refresh now only delivers the initial state after connecting.

v1.3.1 - Bug fixes and visual optimizations for PC

Choose a tag to compare

@BytePhilHD BytePhilHD released this 19 Aug 08:34

Fixed huge bug which stopped SpotifyLink from working.
PC optimizations
Bug fixes

v1.2.3 - Bug fix and optimizations

Choose a tag to compare

@BytePhilHD BytePhilHD released this 04 May 14:00

Fixed Out of array boundaries bug when searching.

Full Changelog: v1.2.2...v1.2.3

v1.2.2 - Performance improvements

Choose a tag to compare

@BytePhilHD BytePhilHD released this 02 Feb 09:44

This release includes several changes to improve the functionality and user experience of the SpotifyLink application. The main changes involve updating the version number, adjusting timing intervals, removing redundant code, and enhancing the user interface.

Version Update:

  • pom.xml: Updated the version from 1.2.1 to 1.2.2.

Timing Interval Adjustments:

  • src/main/de.bytephil/authorization/SpotifyAPIConnector.java: Reduced the interval for checking the current track info from 2 seconds to 1 second.
  • src/main/de.bytephil/handlers/SpotifyHandler.java: Reduced the interval for getting the queue as song objects from 3 seconds to 1 second.

Code Simplification:

  • src/main/de.bytephil/main/Main.java: Removed redundant code for handling the username when the song is not playing.

User Interface Enhancements:

  • src/main/resources/WebPages/assets/script/mainpage.js: Added initialization for songAdded and counter variables to improve the display message when a song is added.
  • src/main/resources/WebPages/assets/script/mainpage.js: Improved the readability of the message displayed when an incorrect session code is entered.

v1.2.1 - Session Code fix

Choose a tag to compare

@BytePhilHD BytePhilHD released this 26 Dec 16:26

Session code gets now displayed all the time on the admin page instead of just when a song is playing and a user is logged in.

v1.2.0 - Added session codes

Choose a tag to compare

@BytePhilHD BytePhilHD released this 23 Dec 11:05

This version includes several changes to the SpotifyLink project, focusing on adding session management, improving the user interface, and refactoring the code for better organization and readability. The most important changes are grouped by theme below.

Session Management Improvements:

  • Added sessionCode generation and validation methods in the Main class to manage user sessions. (src/main/de.bytephil/main/Main.java, [1] [2] [3] [4]
  • Updated WebSocket message handling to include session code validation and actions based on user type (ADMIN, USER, FORBIDDEN). (src/main/de.bytephil/main/Main.java, [1] [2] [3] [4] [5]

User Interface Enhancements:

  • Modified admin.html to display and manage session codes, including buttons for sharing and regenerating the session code. (src/main/resources/WebPages/admin.html, [1] [2]
  • Updated adminscript.js to handle session code display and sharing functionality. (src/main/resources/WebPages/assets/script/adminscript.js, [1] [2] [3] [4]

Code Refactoring:

  • Refactored WebSocket message handling in adminscript.js to use a unified data structure for sending actions and content. (src/main/resources/WebPages/assets/script/adminscript.js, src/main/resources/WebPages/assets/script/adminscript.jsL140-R155)
  • Removed redundant code and improved readability in the Main class by consolidating message handling logic. (src/main/de.bytephil/main/Main.java, [1] [2]

New Features:

  • Added a new UserType enum to manage different user roles within the application. (src/main/de.bytephil/enums/UserType.java, src/main/de.bytephil/enums/UserType.javaR1-R5)
  • Introduced a secure random session code generator to enhance session management security. (src/main/de.bytephil/main/Main.java, src/main/de.bytephil/main/Main.javaR300-R326)

Minor Changes:

  • Updated the project version in pom.xml to 1.2.0. (pom.xml, pom.xmlL10-R10)
  • Removed unnecessary imports and print statements to clean up the codebase. (src/main/de.bytephil/main/Main.java, [1] [2]

v1.1.0 - Added User queue and improved performance / errors

Choose a tag to compare

@BytePhilHD BytePhilHD released this 11 Dec 08:51

Added new functionality to show the current user queue. This can be shown by clicking dropdown button. The next 3 songs are then shown in 'Real-Time' (every 3 seconds).

Heavily reduced load on Spotify API by making synchronized get functions which only request every 2 (current Song) and 3 (queue songs) seconds.

Dependency Updates:

  • Upgraded project version from 1.0.8 to 1.1.0 in pom.xml.
  • Added lombok dependency in pom.xml to simplify code with annotations.

Error Handling Improvements:

  • Replaced specific exception handling with a general Exception catch block and improved error logging in AuthenticationURI.java and SpotifyAPIConnector.java. [1] [2]
  • Updated SearchRequest.java to use Console.printError for consistent error logging. [1] [2] [3]

New Features:

  • Introduced SongObject class to represent song details, with lombok annotations for getters, setters, and constructors.
  • Added methods in SpotifyHandler.java to fetch and cache Spotify queue as SongObject instances.

Code Cleanup:

  • Removed unused imports and methods in SpotifyAPIConnector.java and AuthenticationURI.java. [1] [2] [3]
  • Deleted ConsoleCommandHandler.java as it was no longer needed.

Additional Changes:

  • Enhanced Main.java to handle application startup state and integrate the new queue fetching feature. [1] [2] [3]

v1.0.8 - Bug Fixes and Performance Improvements

Choose a tag to compare

@BytePhilHD BytePhilHD released this 09 Dec 18:48

Dependency Updates:

  • Updated the version of the project from 1.0-SNAPSHOT to 1.0.8 in pom.xml.
  • Upgraded the spotify-web-api-java dependency from version 8.4.1 to 9.0.0 in pom.xml.

Code Refactoring:

  • Refactored constant variables clientId and clientSecret to uppercase (CLIENT_ID and CLIENT_SECRET) in AuthenticationURI.java, SpotifyAPIConnector.java, and SearchRequest.java [1] [2] [3].
  • Removed unused import statements and reordered them in AuthenticationURI.java, SearchRequest.java, and ServerConfiguration.java [1] [2] [3].

WebSocket Enhancements:

  • Enhanced WebSocket setup to support both ws and wss protocols in adminscript.js and mainpage.js [1] [2].
  • Modified the WebSocket refresh function to send "refresh-Admin" instead of "refresh" in adminscript.js.

Error Handling Improvements:

  • Improved error handling in Main.java by catching specific exceptions (IOException, ParseException, SpotifyWebApiException) and printing stack traces for unexpected errors.

Documentation Update:

  • Added a new section "Developing" to README.md with instructions on setting clientID and clientSecret values and building the project with Maven.

v1.0.7 - Added Spotify account switch button

Choose a tag to compare

@BytePhilHD BytePhilHD released this 07 Oct 16:40

Added information of currently logged in Spotify account on admin page with the option to change it. By clicking on the switch button, you get redirected to the Spotify authorization page and after that directly redirected to the main page, now connected with your account.

What's Changed

Full Changelog: v1.0.6...v1.0.7