Some cleanup, fixes typos and grammar errors

This commit is contained in:
Deluan 2022-12-06 20:09:03 -05:00
parent c5f7cf97f4
commit f206d81afd
8 changed files with 10 additions and 9 deletions

View File

@ -14,7 +14,7 @@ Please read the following [Code of Conduct](https://github.com/navidrome/navidro
## Issues
Found any issue or bug in our codebase? Have a great idea you want to propose or discuss with
the developers? You can help by submitting an [issue](https://github.com/navidrome/navidrome/issues/new/choose)
to the Github repository.
to the GitHub repository.
**Before opening a new issue, please check if the issue has not been already made by searching
the [issues](https://github.com/navidrome/navidrome/issues)**

View File

@ -1,6 +1,6 @@
This folder abstracts metadata lookup into "agents". Each agent can be implemented to get as
much info as the external source provides, by using a granular set of interfaces
(see [interfaces](interfaces.go)].
(see [interfaces](interfaces.go)).
A new agent must comply with these simple implementation rules:
1) Implement the `AgentName()` method. It just returns the name of the agent for logging purposes.
@ -9,4 +9,4 @@ A new agent must comply with these simple implementation rules:
For an agent to be used it needs to be listed in the `Agents` config option (default is `"lastfm,spotify"`). The order dictates the priority of the agents
For a simple Agent example, look at the [placeholders.go](placeholders.go) agent source code.
For a simple Agent example, look at the [placeholders](placeholders.go) agent source code.

View File

@ -113,7 +113,7 @@ func (a *artwork) getImagePath(ctx context.Context, id string) (path string, las
return
}
// If it is a mediaFile and it has cover art, return it (if feature is disabled, skip)
// If it is a mediaFile, and it has cover art, return it (if feature is disabled, skip)
if !conf.Server.DevFastAccessCoverArt && mf.HasCoverArt {
return mf.Path, mf.UpdatedAt, nil
}

View File

@ -29,7 +29,7 @@ func (h *Hook) Levels() []logrus.Level {
return h.AcceptedLevels
}
// Fire redacts values in an log Entry that match
// Fire redacts values in a log Entry that match
// with keys defined in the RedactionList
func (h *Hook) Fire(e *logrus.Entry) error {
if err := h.initRedaction(); err != nil {

View File

@ -152,7 +152,7 @@ func isDirOrSymlinkToDir(baseDir string, dirEnt fs.DirEntry) (bool, error) {
// isDirIgnored returns true if the directory represented by dirEnt contains an
// `ignore` file (named after consts.SkipScanFile)
func isDirIgnored(baseDir string, dirEnt fs.DirEntry) bool {
// allows Album folders for albums which eg start with ellipses
// allows Album folders for albums which e.g. start with ellipses
if strings.HasPrefix(dirEnt.Name(), ".") && !strings.HasPrefix(dirEnt.Name(), "..") {
return true
}

View File

@ -253,7 +253,7 @@ func Authenticator(ds model.DataStore) func(next http.Handler) http.Handler {
}
}
// JWTRefresher updates the expire date of the received JWT token, and add the new one to the Authorization Header
// JWTRefresher updates the expiry date of the received JWT token, and add the new one to the Authorization Header
func JWTRefresher(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()

View File

@ -222,7 +222,7 @@ func (b *broker) listen() {
c.diode.put(msg)
case c := <-b.unsubscribing:
// A client has detached and we want to
// A client has detached, and we want to
// stop sending them messages.
delete(clients, c)
log.Debug("Removed client from event broker", "numClients", len(clients), "client", c.String())

View File

@ -7,11 +7,12 @@ import (
type IndexGroups map[string]string
// ParseIndexGroups
// The specification is a space-separated list of index entries. Normally, each entry is just a single character,
// but you may also specify multiple characters. For instance, the entry "The" will link to all files and
// folders starting with "The".
//
// You may also create an entry using a group of index characters in parenthesis. For instance, the entry
// You may also create an entry using a group of index characters in parentheses. For instance, the entry
// "A-E(ABCDE)" will display as "A-E" and link to all files and folders starting with either
// A, B, C, D or E. This may be useful for grouping less-frequently used characters (such and X, Y and Z), or
// for grouping accented characters (such as A, \u00C0 and \u00C1)