Commit Graph

5221 Commits

Author SHA1 Message Date
Stein Magnus Jodal
7b667028e1 docs: Unbreak docs building 2013-12-15 21:38:48 +01:00
kingosticks
69b1f5e270 get_version changelog entry 2013-12-15 20:38:45 +00:00
kingosticks
9f93fbaa36 property for get_version and documented 2013-12-15 20:37:41 +00:00
kingosticks
e1bb03789b expose mopidy version to core API 2013-12-15 18:50:05 +00:00
Paul Connolley
418e5689dc Preliminary commit for browserify compatibility
This is the first stage of my commits for issue #609 that will make the
npm module browserify friendly and browser friendly.

The grunt-browserify module has been introduced to replace
grunt-contrib-concat. Browserify automatically concatenates files and so
there is no need for a concat step.

The faye-websocket module was problematic so I moved the require out to
a separate module within the lib directory. The websocket module is a
folder containing a package.json, directing library consumers to the
entry point that is appropriate for their environment. Browserify picks
browser.js (which simply returns an object holding window.WebSocket)
while everyone else gets the faye-websocket module.

In addition, as browserify handles all the requires, there's no need to
detect the environment or include any pre-built modules. I've removed
the pre-built when and faye-websocket files in favour of letting
browserify use the modules within node_modules. This should make it
easier to maintain dependencies in future versions of this library.

One side effect of this browserify compatibility is that, in order to
allow the library to be globally available in the browser as `Mopidy`,
I've had to set Mopidy as the exported object instead of as a key of the
exported object. To elaborate further, the current API would be like the
following:

    var Mopidy = require('mopidy').Mopidy;

However, with this change, the API would be like this:

    var Mopidy = require('mopidy');

I'm not sure whether this would be an issue and so I think it's worth
discussing further. It's possible that node developers won't have a
problem but, if they did, a potential workaround within the mopidy.js
file would be:

   Mopidy.Mopidy = Mopidy;

This would allow developers to choose either of the following:

    var Mopidy = require('mopidy');
    var Mopidy = require('mopidy').Mopidy;

Could be a little odd to do this though

When testing the browserify build, I noticed a strange error thrown when
making the initial websocket connection. I managed to track it down to
an IE 'feature' that crops up when you alias in-built functions. In
particular, the when module was aliasing setImmediate to an internal
function (nextTick.) In a newer version of when, the function is
instead aliased to the browserify process.nextTick. This works well
because substack already had that covered.

With when@2.7.0, IE11 appears to be working well. IE10 is still pending
a test.
2013-12-15 01:52:24 +00:00
Stein Magnus Jodal
1bdc941b9c Merge master into develop 2013-12-10 09:34:21 +01:00
Stein Magnus Jodal
1f27ef2929 Merge pull request #607 from jeremybmerrill/patch-2
replaces outdated option --show-config with correct `mopidy config` in docs
2013-12-10 00:34:06 -08:00
Thomas Kemmer
9bf7e39425 fix flake8 error E302 2013-12-10 06:57:16 +01:00
Jeremy B. Merrill
4e5431c77a replaces outdated option --show-config with correct mopidy config in docs 2013-12-09 19:27:41 -05:00
Thomas Kemmer
584dc1eaf6 add playlists test for writing EXTM3U files 2013-12-09 16:13:05 +01:00
Thomas Kemmer
a7b5e455a0 fix writing of runtime to EXTM3U 2013-12-09 16:12:46 +01:00
Thomas Kemmer
18c44e0d8a add translator tests for EXTM3U files 2013-12-09 15:54:28 +01:00
Thomas Kemmer
b6ee1707d3 add translator tests for EXTM3U files 2013-12-09 15:52:46 +01:00
Thomas Kemmer
5d3851b3e1 EXTM3U playlist saving 2013-12-09 06:09:16 +01:00
Thomas Kemmer
a5c02c1034 basic EXTM3U playlist support 2013-12-08 15:23:23 +01:00
Stein Magnus Jodal
e90c3eaf19 requirements: Move docs requirements to docs/ 2013-12-06 10:28:07 +01:00
Stein Magnus Jodal
a937d5e117 requirements: Fold testing requirements into docs 2013-12-06 10:23:57 +01:00
Stein Magnus Jodal
8295dd4f4a requirements: Fold http.txt into Mopidy-HTTP docs 2013-12-06 10:23:29 +01:00
Stein Magnus Jodal
101600d8d2 requirements: Remove core.txt, since it duplicates setup.py 2013-12-06 10:09:54 +01:00
Thomas Adamcik
1a032c5f92 Merge pull request #603 from adamcik/feature/lookup-stream-metadata
Add metadata lookup to streaming backend.
2013-12-05 15:06:01 -08:00
Thomas Adamcik
0fac8120d4 streaming: Code review adjustments 2013-12-06 00:04:36 +01:00
Thomas Adamcik
7c7db63659 docs: Add stream/timeout config value to docs 2013-12-05 23:03:50 +01:00
Thomas Adamcik
e37b1a1754 docs: Add streaming metadata lookup to changelog 2013-12-05 23:01:57 +01:00
Thomas Adamcik
d9b704d0d8 streaming: Add scanner lookup of stream metadata.
This adds support for looking up metada for all any any protocols the streaming
backend will support. This should also ensure that file:// files get metadata.
2013-12-05 22:58:48 +01:00
Thomas Adamcik
1379c38370 audio: Improve audio_data_to_track handling.
- Handle missing or none data for duration and mtime
- Add organization, location and copyright mapping used for streams.
2013-12-05 22:56:19 +01:00
Thomas Adamcik
a036e84a20 audio: Update scanner to not use gst.Bus.poll
Turns out poll sets up it's own mainloop in the default context causing us to
segfault.
2013-12-05 22:43:27 +01:00
Stein Magnus Jodal
eed74236a8 Merge pull request #602 from ruudud/document-492-workaround
Document workaround example for #492
2013-12-05 13:05:51 -08:00
PÃ¥l Ruud
91710e3618 Document workaround example for #492
The example is using an Icecast fallback stream that plays a silent MP3 file
when Mopidy sends the shutdown signal.

Tested and found working, however had minor issues with the client
(mpg123) playing the stream was getting out of sync when rapidly changing
songs.
Looking at the Icecast logs, it revealed that the switch between the mopidy and
the fallback stream happened immediately, so the issue is probably with the
client.
2013-12-05 21:49:49 +01:00
Stein Magnus Jodal
4142f0285b Remove 'Music Server' from app name in mopidy.desktop 2013-12-05 09:00:40 +01:00
Stein Magnus Jodal
dc4ce9a6af Merge pull request #599 from adamcik/feature/preroll-live-streams
audio: Cleanup scanner code and support live sources
2013-12-04 14:51:56 -08:00
Thomas Adamcik
10a448f90d audio: Cleanup scanner code and support live sources
- Make attributes internal with _ naming
- Cleanup handling of min durtion. Min set to None disables the check.
- Check state change result for no preroll which indicates a live source which
  must transistion to playing to get tags etc.
2013-12-04 23:41:39 +01:00
Stein Magnus Jodal
d7fc04e354 Merge branch 'feature/local-json' into develop 2013-12-04 23:30:16 +01:00
Stein Magnus Jodal
4a599eec0c docs: Minor tweaks 2013-12-04 23:30:01 +01:00
Stein Magnus Jodal
07784ed058 Merge branch 'develop' into feature/local-json 2013-12-04 23:27:21 +01:00
Stein Magnus Jodal
14ee030dad config: Formatting 2013-12-04 23:08:21 +01:00
Thomas Adamcik
acdc65e9c7 docs: Update changelog with pluggable libraries. 2013-12-04 23:04:30 +01:00
Thomas Adamcik
9794826f26 local: Review changes 2013-12-04 22:52:24 +01:00
Thomas Adamcik
4f7176cac8 local: Cleanup uri conversion helper naming and implementation. 2013-12-04 22:48:37 +01:00
Thomas Adamcik
ad53a067ae local: Split out library reading and writting
- Create $XDG_DATA_DIR/mopidy/local in the local extension's validate env.
- Make sure we handle bad data causing ValueError in JSON decoding
- Initializing empty file causes more harm than good as it just leads to a
  ValueError. Switched to doing write_library(json_file, {})
- Helpers have been updated to be library oriented, not track. This paves the
  way for having {tracks: {uri: ...}, artist: {uri: ...}, ...} type
  denormalized data.
2013-12-04 22:38:16 +01:00
Thomas Adamcik
9c2d38e989 local: Remove tag cache support
- Updates doc references to tag cache
- Removes tag cache from config and marks it deprecated
- Removes tag cache from setup.py
- Removes tag cache from config converter
- Removes tag cache from tests
- Converts local library tests to use JSON.
2013-12-04 22:38:16 +01:00
Thomas Adamcik
da63942b48 config: Improve handling of Deprecated config values 2013-12-04 22:38:16 +01:00
Stein Magnus Jodal
2a2d725804 docs: Add Moped client, update other web clients 2013-12-04 22:31:41 +01:00
Stein Magnus Jodal
81e437ae70 docs: Document value separation in config values with lists 2013-12-03 19:07:25 +01:00
Thomas Adamcik
26ec956a08 config: Add deprecated config value support.
This makes it possible to mark a key as deprecated, this implies it will be
ignored if present, and never included in the resulting config.
2013-11-29 00:15:03 +01:00
Thomas Adamcik
121d2c782a docs: Add info about local-json and pluggable libraries 2013-11-28 23:42:12 +01:00
Thomas Adamcik
3bbcb4d121 local: Review comment fixes 2013-11-28 23:20:03 +01:00
Thomas Adamcik
118095e522 local: Add new json based library
- Sets local-tagcache as disabled
- Implements new library that uses a gzip compressed json as storage.
- Thanks to reuse of existing serialization code this is a fairly small change.
2013-11-27 23:39:53 +01:00
Thomas Adamcik
ca358e05db local: Move find_exact and search out of tag cache. 2013-11-27 23:27:31 +01:00
Thomas Adamcik
4161c2bf27 local: Fix inconsistent uri handling in local scanner
We now only operate on local track uris, instead of a funny mix of local and
file uris. To achieve this we instead maintain a uri->path mapping to use for
the actual scanning.
2013-11-27 23:19:10 +01:00
Thomas Adamcik
603b57ef3c utils: Remove find_uris and update find_files
- find_uris is no more
- find_files now returns file paths relative to path being searched
- find_files now only works on directories
- find_files tests have been updated to reflect changes
- local scanner has gotten a minimal update to reflect this alteration
2013-11-27 22:50:35 +01:00