updated changelog

This commit is contained in:
Rudis Muiznieks 2023-04-28 21:55:42 -05:00
parent 9b6e947ff3
commit 9886781afe
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
4 changed files with 21 additions and 17 deletions

View File

@ -28,6 +28,8 @@
<p>Radiostasis is an <a href='https://code.sitosis.com/rudism/radiostasis' target='_blank'>open source</a> passion project by Rudis Muiznieks, a software engineer who happens to love Old Time Radio. Radiostasis is a constant work in progress, with many improvements planned for the future. Currently the site is completely free to use&mdash;Rudis foots all the bills to host this site on his own&mdash;but premium features may be introduced in future updates to help offset some of the costs.</p> <p>Radiostasis is an <a href='https://code.sitosis.com/rudism/radiostasis' target='_blank'>open source</a> passion project by Rudis Muiznieks, a software engineer who happens to love Old Time Radio. Radiostasis is a constant work in progress, with many improvements planned for the future. Currently the site is completely free to use&mdash;Rudis foots all the bills to host this site on his own&mdash;but premium features may be introduced in future updates to help offset some of the costs.</p>
<p>Please send questions, bug reports, suggestions, or just say hello to Rudis at <a href='mailto:support@radiostasis.com'>support@radiostasis.com</a>.</p> <p>Please send questions, bug reports, suggestions, or just say hello to Rudis at <a href='mailto:support@radiostasis.com'>support@radiostasis.com</a>.</p>
<h3>Change Log</h3> <h3>Change Log</h3>
<h4>2023-04-28</h4>
<p>The playlist now displays the currently playing episode at the top, and will re-queue that episode if another episode is played.</p>
<h4>2023-04-13</h4> <h4>2023-04-13</h4>
<p>Added toast notifications for queue operations and playback errors.</p> <p>Added toast notifications for queue operations and playback errors.</p>
<h4>2023-04-09</h4> <h4>2023-04-09</h4>

View File

@ -444,6 +444,14 @@ var Playlist = /** @class */ (function () {
this.notify('Playlist cleared.'); this.notify('Playlist cleared.');
} }
}; };
Playlist.prototype.reQueueNowPlaying = function () {
var currentEpisode = this.nowPlayingEpisodeHandler
? this.nowPlayingEpisodeHandler()
: null;
if (currentEpisode) {
this.unshiftEpisodes([currentEpisode]);
}
};
Playlist.prototype.playlistChanged = function () { Playlist.prototype.playlistChanged = function () {
this.shiftCurrent(); this.shiftCurrent();
this.unshiftCurrent(); this.unshiftCurrent();
@ -491,14 +499,6 @@ var Playlist = /** @class */ (function () {
this.queueTab.classList.remove('expanded'); this.queueTab.classList.remove('expanded');
} }
}; };
Playlist.prototype.reQueueNowPlaying = function () {
var currentEpisode = this.nowPlayingEpisodeHandler
? this.nowPlayingEpisodeHandler()
: null;
if (currentEpisode) {
this.unshiftEpisodes([currentEpisode]);
}
};
Playlist.prototype.createQueueListItem = function (episode, withControls) { Playlist.prototype.createQueueListItem = function (episode, withControls) {
var _this = this; var _this = this;
if (withControls === void 0) { withControls = true; } if (withControls === void 0) { withControls = true; }
@ -600,6 +600,7 @@ var Radiostasis = /** @class */ (function () {
.item(0)) === null || _a === void 0 ? void 0 : _a.addEventListener('click', function (e) { .item(0)) === null || _a === void 0 ? void 0 : _a.addEventListener('click', function (e) {
var _a; var _a;
if (((_a = _this.player.currentEpisode()) === null || _a === void 0 ? void 0 : _a.id) !== episode.id) { if (((_a = _this.player.currentEpisode()) === null || _a === void 0 ? void 0 : _a.id) !== episode.id) {
_this.playlist.reQueueNowPlaying();
_this.player.playEpisode(episode); _this.player.playEpisode(episode);
} }
e.preventDefault(); e.preventDefault();

View File

@ -160,6 +160,15 @@ class Playlist {
} }
} }
public reQueueNowPlaying(): void {
const currentEpisode = this.nowPlayingEpisodeHandler
? this.nowPlayingEpisodeHandler()
: null;
if (currentEpisode) {
this.unshiftEpisodes([currentEpisode]);
}
}
private playlistChanged(): void { private playlistChanged(): void {
this.shiftCurrent(); this.shiftCurrent();
this.unshiftCurrent(); this.unshiftCurrent();
@ -208,15 +217,6 @@ class Playlist {
} }
} }
private reQueueNowPlaying(): void {
const currentEpisode = this.nowPlayingEpisodeHandler
? this.nowPlayingEpisodeHandler()
: null;
if (currentEpisode) {
this.unshiftEpisodes([currentEpisode]);
}
}
private createQueueListItem( private createQueueListItem(
episode: Episode, episode: Episode,
withControls = true withControls = true

View File

@ -63,6 +63,7 @@ class Radiostasis {
.item(0) .item(0)
?.addEventListener('click', (e) => { ?.addEventListener('click', (e) => {
if (this.player.currentEpisode()?.id !== episode.id) { if (this.player.currentEpisode()?.id !== episode.id) {
this.playlist.reQueueNowPlaying();
this.player.playEpisode(episode); this.player.playEpisode(episode);
} }
e.preventDefault(); e.preventDefault();