Giter Club home page Giter Club logo

wissl's Introduction

Wissl

http://msch.fr/wissl

Wissl allows you to play your music over the internet using a web interface, without uploading it to a third-party.

The server side component is a Java application that indexes music files and exposes it using HTTP/REST/JSON.

The Wissl server runs by default in an embedded mode that contains a Javascript web application that can play music on the server using HTML5 or Flash audio.

Wissl is designed with home users in mind and aims to be simple and easy to use.

Quickstart

To build Wissl, you need Java 6+ and Maven. In the root directory, run mvn package.

The generated file target/wissl-VER.war is a self executable webapp archive. You can run it with java -jar wissl.jar, it will run the server on http://localhost:8080. To use a different HTTP port, use the following switch: java -jar wissl.jar -Dwsl.http.port=1234.

If you want a higher degree of control over deployment, you can also use this WAR file within any application server such as tomcat.

Screenshot

screenshot

Development

You can easily import the sources into eclipse using Import existing maven project. The maven setup allows starting Wissl in an embedded Jetty container using the command: mvn jetty:run. Static resources such as CSS and JS files can then be edited while this Jetty server is running.

Libraries used

License

Wissl is Copyright (c) 2013, Mathieu Schnoor.

It is licensed under the GNU General Public License (v3), a copy of which can be found in the LICENSE file or at this address: http://www.gnu.org/licenses/gpl.html

wissl's People

Contributors

mschn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wissl's Issues

/user/add does not return anything

The user creation method does not return anything.
It should return the newly created user so that clients may at least know the generated UID.

lazy load album art on artists page

currently when loading the artists page,
up to 10 albums per artist will be directly fetched on the server.

when there are 300 artists, this causes a massive slowdown of the application and everything is blocked until all images have been downloaded.

only the images currently displayed should be downloaded.

Indexer timer

The indexer doesn't replay each 'wsl.refresh.rate' (1 hour actually), thread is down and will not start again automacally.
When indexer stops, 'running' is false et 'kill' is true, 'while' boucle is finished, thread sleep is not used again.
Timer may be outside of the indexer boucle.

pageload issues just after logging in

Sometimes, page loading fails silently just after logging in :

  • user logs in
  • ?artists is displayed
  • user clicks on settings
  • page changes briefly to ?settings
  • page reverts to ?artists almost instantly
  • hash in URL bar shows ?settings
    After this, navigation seems OK
    There must be an issue with the history / pageload handling when it is first called.

add internationalization

Every message and label displayed is currently in english language.

Every text message and label that is shown to the end user should be internationalized.

Language selection should then default to the browser locale, and be customizable.

random playlist fails when library contains no songs

playlist/random assumes there are always songs in the library,
and fails if there are no songs. Relevant stacktrace :

java.lang.ArrayIndexOutOfBoundsException: 0 fr.msch.wissl.server.REST.randomPlaylist(REST.java:583)`

By default, clients will request a random playlist of 20 songs.
It should also be checked whether asking for 20 random songs when there are 10 songs in the library is correctly handled,
ie there should be 10 songs in random order.

hide error messages on login page

on fatal error, the local session is destroyed and the login page is shown along with a message.

most of the time, this is because the session has expired or the user logged in using another computer.
in those cases, no message should be displayed.

there should be a small icon or label that can be expanded into the full message if necessary.

create automated tests

Performance / functional tests for the REST server can easily be created using curl and bash.

commit eclipse settings to repo

Some eclipse project settings are pretty much needed.
Example:

  • javascript formatter settings
  • java formatter settings
  • tomcat launch configuration
  • ignore validation for javascript minified sources

add SSL launcher

The Launcher currently starts a new server using plain HTTP.

There should be an option to enable HTTPS, if possible without any user configuration.

show confirmation dialog on page reload

Navigating other pages on the site does not stop song playback.
Refreshing the page or changing page does.

When playing a song and trying to navigator away from the page, or refreshing it, a confirmation dialog should be displayed.

Improve REST javadoc

the REST.java class exposes all public API REST endpoints.
The attached javadoc should be so good that it can be published as documentation as is.

DB constraint violation when deleting user

If an user has defined one or more playlists, trying to remove it leads to a DB constraint violation.
Playlists referencing the user to delete should be deleted before removing the user itself.

Relevant stacktrace :

org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "FK_USER: PUBLIC.PLAYLIST FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(USER_ID)"; SQL statement: DELETE FROM user WHERE user_id=? [23503-164] org.h2.engine.SessionRemote.done(SessionRemote.java:565)
org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:183) org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:143)
org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129) com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
fr.msch.wissl.server.H2DB.removeUser(H2DB.java:497) fr.msch.wissl.server.REST.removeUsers(REST.java:421)`

preload next song in playlist

Currently, the player.js client waits for the current song playback to finish before it loads the next song in the playlist.
Because of this there can be a gap of several seconds between two consecutive songs.

player.js should begin preloading the next song as soon as the current song has finished loading.

Application unusable if client internet provider uses multiple IPs

The server will disconnect a session if the request source IP does not match the one used during session creation.

If the client uses a network that does load balancing with multiple internet connections,
then two consecutive requests from the same browser with the same session can have two different source IP.

In such a scenario, the client gets disconnected all the time and cannot use the application.

less verbose indexer warnings in log file

whenever the indexer runs and files to index a file, it will leave a WARN log event.
since it's always the same files that cannot be indexed, every hour we get 200 log events which always say the same thing. Instead we could have something like:

WARN: 245 files were not indexed. Details in file: /tmp/wsl/indexer.fail.log

FileOrganizer output format

Add a property to choose the output format of the FileOragnizer module.

Today, output is "Artists/Album/Position Title.ext".

Create an output format using song informations (%artist, %album, %title...) to oragnize files.

display 'about' in page instead of dialog

The about dialog is small an makes little sense.

It would be better to have the contents of this dialog in a dedicated ?about page instead, where more information could be displayed, and better formatted.

rotate log files

Logs are always appended to the same physical file.

As logs grow, this can become unpractical.

Log files should be rotated when they reach a certain number of lines.

improve launcher startup notification

Currently, the Launcher waits for the Jetty server to be fully started to either open a browser to localhost:8080.
This will take a couple seconds at best, or sometimes up to 20 seconds if the system is a bit cranky.
During these 20 seconds, nothing happens, nothing is displayed.

The Launcher should display something to the user while the server is starting.

/playlist/create should wrap response content

Right now /playlist/create return directly the playlist JSON representation.
To conform with the rest of the API, and to allow adding data to the response in the future,
the playlist should be wrapped in an other JSON object, ie:
{
"playlist" : PLAYLIST
}

detect if launcher is already running

Currently, if I try to run the launcher while it's already running on the same port,
i'll end up with a failure because the port is already bound.

Instead, I could simply try to connect to localhost:port/wissl/ and if a server is already up, notify the user and do nothing.

change user password

Users cannot change their password, which might have been defined by a different person as the admin chooses the password when creating an account.

Users should be able to redefine their password at will through the 'user' page.

give keyboard focus to forms & buttons when user input is required

On the login page, keyboard focus should be given to the 'login' form field.
For various dialogs requiring user interaction, the first form item should also have keyboard focus.
For dialogs requiring no interaction, the 'OK' or 'Close' button should have focus.

add playlist reorganization

The order of songs cannot be changed in a playlist.

The playlist display page should allow drag and drop reorganization.

create new user on first login

When logging in for the first time,
there should be no default 'admin' user. Instead, the client should be able to create a 'bootstrap' admin-level user.

This will prevent having a default admin:admin user that may be kept forever.

add search feature

There is currently no search feature.

One can use the web browser page search feature to find a specific artist in the artist page,
but there should be a real search feature that matches queries to artists / albums / songs / genres / playlists / users.

history navigation breaks document.title

document.title is set to whatever is currently playing.
navigating back in the history causes the title to be reset to whatever was playing at the time that history event was recorded.

maybe history should not try to touch document.title at all.

shuffle playback

Currently only linear playback of a playlist is supported.

There should be a 'shuffle' playback mode that plays the current playlist in a random order.

album artwork browser caching is not reliable

On some browsers like chrome, album artwork caching does not work properly.
If the album artwork image changes and is still in cache, there is currently no proper way to reload it from server.

improve folder selection in 'add music' dialog

folder selection in 'add music' dialog is a bit hard to use,
you have to select the folder you want to add and click 'add'.

When entering a folder and clicking add without selecting a folder, the current directory should be added.

add server-side audio transcoding

In some cases, the server should be able to transcode audio, to:

  • enable playback for unsupported formats, such as FLAC or WMA.
  • downsample high quality files when bandwidth is low

This could be achieved by something like FFMPEG.

add volume control

There currently is no volume control feature.

Although volume control is redundant with the OS functionalities,
it can be useful when multiple web applications use sound in the same browser,
ie one tab is Wissl and another is Youtube.

add 'force scan' feature

Sometimes I manually edit the music folder and want to see changes immediately.
Admin section needs a 'force scan' button so that indexer is run now.

display indexer progress

RIght now the only way of knowing if the Indexer is working is either to read the logs, or to refresh the library page to see if it changes.

The indexer should be able to give a progress estimate in %age, and return it to a client with administrator privileges.

idv1 genre is not properly extracted

The ?songs/id client page displays album genre.
It seems that when the tag is ID3v1, this information in not properly displayed / extracted.

The encoded tag value is shown instead of the textual equivalent, ie we get (1) instead of Classic Rock.

Log some info on shutdown

Sometimes the server seems to shut down for no reason.
It does not crash, and goes through the shutdown methods nicely.
Maybe the JVM decided to exit, maybe the OS decided to reboot.

There should be a little more info logged on shutdown to be able to see what actually happened.

add welcome page

The default page is currently the one that displays all indexed artists.

Instead, it should default to a 'welcome' page that contains various information about the application :
ie current user, statistics, search, most listened, playlists, etc

Log rotation does not work on Windows

Instead of rotating the file, the following log entry is written :
Failed to rotate logs. Could not move old file.

This probably corresponds to some hidden exception

'last played song' for user is not correctly reported

last played song should be the song that is currently playing for the given user.
right now it is actually the next song in the playlist, because:

  • user clicks song 1
  • song 1 plays
  • song 1 is set as last played song
  • song 2 is pre downloaded while song 1 is still playing
  • song 2 is set as last played song

The pre-downloading of song 2 should not trigger a change of 'last played song'

add contextual actions for search result selection

It is currently possible to select multiple entries for songs and albums in search results,
but there no actions to apply on this selection in the navigation bar.
Actions should be similar to the ones in the library: add to playlist, play now, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.