1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-12 21:22:17 +00:00
Commit Graph

25 Commits

Author SHA1 Message Date
Alban Féron
81d141e540
pyupgrade 2020-11-22 16:12:14 +01:00
Alban Féron
cec216684d
Add ignored articles support
Closes #200
2020-11-09 17:31:04 +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
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
mvn23
3e51bf2a6d Change music folder IDs to int 2019-09-14 12:39:05 +02:00
Alban Féron
75b89e5f45
Basic (untested) jukebox interface based on an external command 2019-09-01 14:59:19 +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
3924ada03e Added a config variable to define if the watcher should be started 2019-04-13 17:14:03 +02:00
spl0k
afbd84a5b9 Changed how the DaemonClient get its address + better exception
I'm still not satisfied but can't come up with a good solution
2019-04-10 21:15:18 +02:00
spl0k
751f00dac8 Daemon now listen for remot commands, adding/removing watched folders on the fly
#77 part 5
2019-04-08 19:16:41 +02: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
2b1977892e Generate a secret key only once 2018-04-01 12:32:36 +02:00
spl0k
0988d4319e Unified file headers 2018-03-04 21:49:56 +01:00
spl0k
8674965c03 Read config files without interpolation
Fixes #84
2018-01-08 19:17:00 +01:00
spl0k
1605fcd202 Py3: imports, exceptions, dicts
Ref #75
2018-01-06 00:33:45 +01:00
spl0k
6daedc6919 I'm on a pony 2017-12-19 23:16:55 +01:00
spl0k
bb72ce8f7c Slight changes to watcher
Configurable scan delay
Test friendliness
2017-12-05 22:48:55 +01:00
spl0k
c515a25b69 Config sample update 2017-11-29 22:55:39 +01:00
spl0k
a62976ba9d Reworked config handling 2017-11-27 22:30:13 +01:00
Óscar García Amor
a1619dd96a Improve config.py to read file only in check 2017-08-08 10:37:22 +02:00
Óscar García Amor
47237fd8e7 Add missing return in config.py 2017-08-07 10:59:21 +02:00
Óscar García Amor
2a3f13bb82 WIP: Rewrite config.py to make project more clean 2017-08-07 08:58:32 +02:00
Jelmer Vernooij
2eb65c33f3 Move all code into a package. 2014-05-01 02:55:39 +02:00