1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-09-19 19:01:03 +00:00
Commit Graph

140 Commits

Author SHA1 Message Date
Alban Féron
81d141e540
pyupgrade 2020-11-22 16:12:14 +01:00
Alban Féron
dc5084ce47
Finish transcoding and cache if close to the end
Ref #202
2020-11-15 16:22:24 +01:00
Alban Féron
e29a09e2fa
Test for issue #202 2020-11-15 15:43:55 +01:00
Alban Féron
52fb367c44
Implement updateUser 2020-11-10 16:56:49 +01:00
Alban Féron
debb396b0e
Ability to grant jukebox right when creating an user from the API 2020-11-10 15:38:24 +01:00
Alban Féron
c2f5ec43b9
Album listing filtered by year or genre
Closes #47
2020-11-10 14:21:51 +01:00
Alban Féron
e0946c0e32
Remove the ability to skip XSD validation in tests
We have int folder ids for long now, this isn't needed anymore
2020-11-09 12:03:05 +01:00
Alban Féron
1be526b8d2
Subsonic API 1.10.2
Except for changes required to comply to the XSD specification,
this does not include any feature this version brings

Closes #194
2020-11-08 18:00:36 +01:00
Alban Féron
8e3cd5ef4d
Prevent tests from speing some ResourceWarnings 2020-11-08 16:02:35 +01:00
Alban Féron
5c46c96b53
Some fixes for Windows support (especially for tests)
The main motive here isn't full Windows support per, but being
able to run tests on Windows, as this is my main platform.
Booting a VM just to run tests is cumbersome.
2020-11-08 15:39:09 +01:00
Alban Féron
7d1825151e
Deduplicate on getAlbumList
Fixes #199
2020-11-07 15:44:09 +01:00
Alban Féron
194bf5e277
Add test for M4A embedded art 2020-11-01 15:55:06 +01:00
Alban Féron
b511b1c647
Errors don't set the HTTP status code
Some (if not all) just ignore the response if it's not a 200
and just consider the server borked.

Closes #192
2020-09-06 15:08:51 +02:00
Carl Hall
de91094ba9 Create features and tests for internet radio stations of Subsonic API
Implements:
getInternetRadioStations.view
createInternetRadioStation.view
updateInternetRadioStation.view
deleteInternetRadioStation.view
2020-06-14 22:22:53 -07:00
spl0k
7417766ac5
Fix for bad path encoding 2020-04-13 16:10:47 +02:00
Louis-Philippe Véronneau
f7ecf08bf2
remove directory with weird mojibake encoding 2020-04-12 22:26:43 -04:00
Alban Féron
acb6b773a9
Set Meta to use the same connection as other tables, and cache generated/retrieved secret keys 2020-01-19 17:30:30 +01:00
Alban Féron
078c98a427
Merge branch 'jukebox' 2019-12-24 15:47:19 +01:00
Alban Féron
1d01450f33
Dropping Python 2 support 2019-12-23 16:23:57 +01:00
Alban Féron
7cb825cedb
Update tests 2019-11-23 15:43:27 +01:00
Alban Féron
eeeb812c6d
Revert test file changes (wtf) 2019-11-23 15:34:30 +01:00
Alban Féron
d3bce83474
Docs update 2019-11-23 15:08:18 +01:00
mvn23
cc838f14d3 Fix tests and some small bugs 2019-10-01 16:55:23 +02:00
Alban Féron
3070f39e4f
Moving Last.fm test out of the main suite 2019-07-14 14:49:57 +02:00
Alban Féron
8a3ea151cc
Merge branch 'dependencies' 2019-07-13 17:09:56 +02:00
Alban Féron
14d0c2f57f
Forgot feeding data for the lyrics test 2019-07-13 16:55:21 +02:00
Alban Féron
d05f69dd26
Move lyrics test out of the main test suite
Ref #130
2019-07-13 16:40:46 +02:00
Alban Féron
cf3e03a1e7
Don't use DirEntry 2019-07-13 16:02:47 +02:00
Alban Féron
f3a12c78b4
Added setting to follow symlinks
#48, #146
2019-07-06 17:14:55 +02:00
Alban Féron
7c8a75d45c
Runnig black on everything 2019-06-29 17:25:44 +02:00
spl0k
e6a192483c Merge branch 'master' into daemon-rework 2019-06-01 16:21:13 +02:00
spl0k
10df0ada07 Don't store the mimetype in database
That's useless, it can be deduced from the path
Fixes #150
2019-05-18 15:50:30 +02:00
spl0k
bb36b38d52 Updated tests 2019-05-11 17:13:58 +02:00
spl0k
deaf17a005 Fixes #148 (and other possible related issues) 2019-05-11 16:09:46 +02:00
spl0k
e210f25bb3 Web UI now scans in background 2019-04-22 17:59:49 +02:00
spl0k
5b0b5ff29b Removed invalid test
The watcher now keeps running even if there's nothing to watch initially
so we can add watched folder later on
2019-04-10 21:29:00 +02:00
spl0k
db2799ef7e Reworked how the watcher is started 2019-03-31 18:06:45 +02:00
spl0k
270fa9883b Removing executable flag from files that shouldn't have it 2019-03-31 16:37:56 +02:00
spl0k
780c96c404 Fixed issues with float bitrate and empty tags
Thanks to @nextfullstorm
Closes #139
2019-03-23 17:08:46 +01:00
spl0k
e2cc51a0f0 Fixed issues when the watcher is set to log to /dev/null 2019-03-23 16:20:19 +01:00
spl0k
5367f068e1 Giving credit where credit is due 2019-02-09 16:19:30 +01:00
spl0k
cf846e88ee Merge remote-tracking branch 'pR0Ps/feature/transcode-cache' 2019-02-09 15:49:30 +01:00
spl0k
d7bbbfe383 Added test case for #133 2019-02-09 15:39:58 +01:00
Carey Metcalfe
0ac2376e07 Fix issues with hanging transcoding processes
When a connection that is consuming a generated response is closed,
Flask closes the generator making it raise the special `GeneratorExit`
exception when the program tries to yield from it again. Because the
`transcode` function was called (returning a generator) before being
passed into `set_generated`, the exception was being handled in the
wrong order.

By passing the `transcode` function to `set_generated` and letting
`set_transcode` call it to return a generator while generating the
response for the client, the exception properly bubbles up through
`transcode` into `set_generated`. This allows both of them to handle it
properly by stopping the subproceses and not caching the incomplete
response data respectively.
2019-02-03 23:23:00 -05:00
Carey Metcalfe
f106923f17 Remove unused 'Cache.protect' method 2019-02-03 22:56:03 -05:00
Carey Metcalfe
65d49a04c9 Implement a cache manager for album art and transcodes
Quick summary
-------------
- Adds a Cache class (plus tests for it) that provides an API for
  managing a cache of files on disk
- Adds two new settings to the configuration file: `cache_size` (default
  512MB) and `transcode_cache_size` (default 1GB).
- Creates two cache managers using the settings above: one for general
  stuff (currently album art) and one for transcodes
- Adds the caching of transcoded files to disk for future use
- Modifies the existing image caching to use the cache manager

Longer explanations and justifications
--------------------------------------
The reason I separated out transcodes into an entirely separate cache is
that I could imagine a single transcode pushing out a ton of smaller
images or other cached content. By separating them it should reduce the
number of deletes caused by adding something to the cache.

The cache manager allows for caching a value from a generator via
passthrough. This means that a generator can be transparently wrapped to
save its output in the cache. The bytes from the generator will be
written to a temp file in the cache and yielded back. When it completes,
the temp file will be renamed according to the provided cache key. This
is how caching transcoded music is implemented.

If multiple generators for the same key are started, they will all write
to individual temp files until they complete and race to overwrite each
other. Since the key should uniquely represent the content it indexes
the files will be identical so overwriting them is harmless.

The cache will store everything for a minimum amount of time
(configurable, default is set at 5 minutes). After this time has
elapsed, the data can be deleted to free up space. This minimum is so
that when you cache a file to the disk you can expect it to be there
after, even if another large file is added to the cache and requests
that some files are deleted to make space.

To ensure that a file will not be paged out of the cache regardless of
the minimum time, there is a `protect` context manager that will refuse
the delete the key from the cache as long as it's active.

The cache has a maximum size, however this is more of a recommendation
as opposed to a hard limit. The actual size will frequently exceed the
limit temporarily until something can be paged out.
2019-01-19 15:37:08 -05:00
spl0k
3b6186ebfc JSON: '_value_' -> 'value'
Closes #136
2019-01-19 15:04:56 +01:00
spl0k
7cfd958eeb Skip lyrics tests if ChartLyrics is down 2019-01-13 17:26:00 +01:00
spl0k
25c5c8277e Add support for downloadong folders and albums
Ref #131
2019-01-13 17:18:27 +01:00
spl0k
ac306f2725 Added method to list genres 2018-12-08 17:18:58 +01:00