Commit Graph

485 Commits

Author SHA1 Message Date
sentriz
4280700621 fix(jukebox): use a tmp dir instead of file for mpv sock
closes #266
fixes #265

Release-As: 0.15.1
2022-12-08 14:37:16 +00:00
sentriz
6c8f6b3299 enable download role for all users
since we don't have any permission checks on download.view anyway

closes #264
2022-12-04 22:02:48 +00:00
sentriz
7e097c9bdf feat: allow for custom music folder path alias
closes #259
2022-11-21 20:51:26 +00:00
sentriz
3348ca6b5b feat(ui): add a link to wiki in transcode profile section
closes #254
2022-11-17 19:23:29 +00:00
sentriz
e1488b0d18 feat(jukebox): use mpv over ipc as a player backend 2022-11-16 19:40:40 +00:00
sentriz
7ab1612802 use os's path separator for playlist parse query 2022-11-16 19:40:40 +00:00
sentriz
ba283021c1 print artist name instead of object in lastfm tracks error 2022-11-14 14:06:11 +00:00
Brian Doherty
f6c95503c7 feat(scanner): added option to scan at startup
closes #251
2022-11-07 23:41:56 +00:00
brian-doherty
85cb0feb5a feat(podcasts): add an option to purge old episodes
* Record podcast episode plays in ModifiedAt field.

* Added podcast purger.
2022-11-07 23:30:34 +00:00
sentriz
1f8de66fc0 2022-11-03 15:27:59 +00:00
sentriz
131e56b3e6 refactor(subsonic): don't make getMusicFolder a method of ctrl 2022-11-02 22:21:19 +00:00
dertasiu
6e6404af73 feat(subsonic): return transcoded mime and transcoded suffix in subsonic responses
fixes #106

* Added support to TranscodedContentType and TranscodedSuffix

* Make sure that we have a profile

* Fix linting

* Fixed use of NewTCTrackByFolder instead of NewTrackByTags in handlers_by_tags.go

simplify a bit
2022-11-02 22:17:29 +00:00
brian-doherty
692ec68282 fix(subsonic): correct album orderding in getAlbumList, add starred request type in getAlbumList 2022-10-27 18:41:13 +00:00
sentriz
b332ce8285 delete left over albums count query in getStarred2 2022-10-26 23:49:17 +01:00
brian-doherty
e8759cb6c1 feat(subsonic): add support for track/album/artist ratings/stars
fixes #171
fixes #31

* Initial code. Compiles and passes unit tests.

* Moved average rating calculation from rating fetch to set rating function. Still only compiled and unit tested.

* Bug fixes

* Fixed bug in savePlayQueue. Removed unique_index for star / rating entries because it's not valid.

* Changed time format on stars to RFC3339Nano to match created date format.

* Lint fixes.

* More lint fixes.

* Removed add* functions and replaced with Preload.

* Fixed several bugs in handlers for getStarred and getStarred2.

* Fixed bug when using music folder ID.

Co-authored-by: Brian Doherty <brian@hplaptop.dohertyfamily.me>
2022-10-26 14:37:16 +01:00
sentriz
d47d5e17e9 fix(subsonic): return an error when no tracks provided in savePlayQueue 2022-10-08 17:23:12 +01:00
brian-doherty
ea28ff1df3 feat(scanner): add option to use fsnotify based scan watcher (#232)
* First cut at fsnotify support. Tested on Linux.

* Fixed bug in logging.

* Fixed lint issues.

* Added new scan watcher option to README.md

* Inverted conditional and dedented following code as per PR discussion.

* Changed command line switch and error return on ExecuteWatch() as per GH comments.

* Scan watcher: Removed scan at first start. Modified watcher to set a 10 second timer and then process in bulk.

Co-authored-by: Brian Doherty <brian@hplaptop.dohertyfamily.me>
2022-10-08 15:47:35 +01:00
sentriz
bfb91c9e92 fix play queue query 2022-09-22 00:23:58 +01:00
sentriz
f41dd0818b feat(subsonic): skip transcoding if request bitrate is the same as track bitrate
fixes #241
2022-09-22 01:18:58 +02:00
brian-doherty
03df207e63 feat(subsonic): support dsub edgecase for queries by decade
* Found a podcast that returns 403 without a UserAgent string so I added one. URL is https://feeds.buzzsprout.com/132359.rss

* Fixed lint issues including needed error checking.

* DSub swaps fromYear and toYear so swap them back in that case. TBD -- fix the same logic in ServeGetRandomSongs
2022-09-13 13:46:33 +00:00
sentriz
fdbb28209b fix(scanner): fix records with album name same as artist
and never use db.Where() with a struct

gorm was seeing a query like

    db.Where(Album{Left: left, Right: right})

but if the `left` variable was empty, gorm couldn't differentiate it with an empty field in the struct
so it generated SQL that we weren't expected

like

    SELECT * FROM albums WHERE right=?

instead of

    SELECT * FROM albums WHERE left=? AND right=?

fixes #230
2022-09-09 13:09:06 +01:00
Walter Huf
731a696bd7 feat: add a ping endpoint that doesn't create a session 2022-09-09 08:32:48 +00:00
sentriz
6c94f194df rewrite "" search queries as `` 2022-07-22 14:13:01 +01:00
sentriz
1a1f39f4e8 fix(subsonic): return song artist ID, album and song genres from search3
related: #229
2022-07-21 19:58:26 +01:00
sentriz
4557a4ec33 rewrite "" search queries as ``
closes #229
2022-07-21 14:57:37 +01:00
Brian Doherty
5e66261f0c feat(subsonic): add avatar support
closes: #228
2022-07-20 23:18:35 +01:00
brian-doherty
7ab378accb feat(subsonic): add internet radio support
* Initial commit of internet radio support.

* Added first test for internet radio.

* Refactor to prepare for more test cases.

* Added a few more tests. Realized that I was not calling as admin so added ability to mock admin.

* Added more internet radio tests. Added proper JSON unmarshaling for ID.

* More test cases. Fixed some accidental tabs in files.

* Fixed some more tabs.

* lint fixes

* Changed placeholder for homepage URL to fit into box.

* Finished out internet radio test cases. Found a few bad error codes in internet radio AND podcasts (mea culpa).

* Realized that delete via website was not checking properly if id existed. Fixed.

gofmt
2022-06-21 22:33:21 +01:00
sentriz
53a4247dfd feat(subsonic): add year and genre fields to track-by-folder response
fixes #223
2022-05-18 22:01:47 +01:00
brian-doherty
50e2818cc7 feat(subsonic): make the v param optional 2022-05-18 14:20:16 +01:00
brian-doherty
64d8e014b3 fixed rendering of podcast section on admin/home for both desktop and mobile 2022-05-15 15:08:17 +01:00
brian-doherty
182c96e966 refactor(podcast)!: make podcasts global not per user, to match spec
Release-As: 0.15.0
2022-05-03 22:42:03 +01:00
brian-doherty
f6687df3f3 feat(subsonic): add getNewestPodcasts 2022-04-21 20:13:47 +01:00
sentriz
dc4d9e4e96 feat(subsonic): add detailed logging about requested audio
closes #212
2022-04-21 01:31:37 +01:00
sentriz
6bebceccd9 delete guess expected size feature
it it doing some really bad guesses for opus files
2022-04-21 00:47:39 +01:00
sentriz
4658d07273 fix(lastfm): make a better guess at callback protocol when incoming connection is TLS
closes: #213

Co-authored-by: Brian Doherty <brian.r.doherty@gmail.com>
2022-04-20 23:11:20 +01:00
sentriz
8b803ecf20 refactor: move shared packages up a level 2022-04-13 01:10:46 +01:00
sentriz
165904c2bb feat(transcode): add a generic transcoding package for encoding/decoding/caching 2022-04-13 01:10:46 +01:00
sentriz
d7655cb9d1 fix(subsonic): change order of fromYear toYear query
closes #208
2022-04-02 18:04:57 +01:00
sentriz
01747c8940 fix(scanner): make sure we have an album artist before populating track
if we return early before i == 0 we mightn't have one

fixes #209
2022-04-02 18:03:14 +01:00
sentriz
a8e50c4a01 don't log listenbrainz scrobble errors
we're already logging at the subsonic level
2022-03-24 00:11:11 +00:00
sentriz
2440e69689 feat(subsonic): log error responses 2022-03-23 23:41:31 +00:00
sentriz
f2143e32ef fix(scanner): respect "is full" setting 2022-03-23 20:41:55 +00:00
sentriz
1ab47d6fbe feat(subsonic): update play stats when scrobbling
closes: #207

Co-authored-by: Brian Doherty <brian.r.doherty@gmail.com>
2022-03-22 20:39:57 +00:00
brian-doherty
59c404749f feat(server): support TLS
* Added https support. Will revert to http if either cert or key are empty strings.

* Update server/server.go

Co-authored-by: Senan Kelly <senan@senan.xyz>

* Fixed lint issues.

Co-authored-by: Senan Kelly <senan@senan.xyz>
2022-03-14 23:38:09 +00:00
sentriz
c7862761bd support parsing floats 2022-03-10 00:49:05 +00:00
sentriz
74c955b723 refactor: ioutil -> io 2022-03-10 00:49:05 +00:00
sentriz
5420f01089 refactor(mockfs): automatically clean up with t.Cleanup() 2022-03-02 15:19:12 +00:00
sentriz
9d406afb1f refactor(scanner): take seed from fuzzer 2022-03-02 09:30:51 +00:00
sentriz
d6492c1521 refactor(scanner): switch ext() path 2022-02-27 20:56:53 +00:00
sentriz
e56f64a758 feat(subsonic): sort artist album list
fixes #197
2022-02-25 21:00:24 +00:00