1.10.0 • Published 2 years ago

shougun v1.10.0

Weekly downloads
36
License
ISC
Repository
github
Last release
2 years ago

shougun

Take command of your media

What?

shougun is a programmable, extensible, embeddable, media management framework. That's a lot of adjectives, but it's intended for a lot of uses.

My primary use is integration with a voice assistant and a Chromecast, which looks like this:

// ShougunBuilder is a convenient, typesafe, fluent interface for building a
// Shougun instance with whatever features you desire.
const shougun = await ShougunBuilder.create()

    // play back on a specific chromecast device
    .playOnNamedChromecast("Family Room TV")

    // call this multiple times to scan multiple local folders
    .scanFolder("~/Movies")

    // adds support for querying configured Babbling apps and considering those
    // results in findMedia
    .includeBabblingMedia()

    // track episode watch progress in a sqlite db
    .trackInSqlite("shougun.db")

    // use a phonetic matcher for queries, suitable for use with voice assistants
    .matchByPhonetics()

    // allow Shougun to keep the Node process alive; since this is for
    // a long-running server, we ought to do this since it enables various
    // internal optimizations
    .allowProcessKeepalive()

    // construct the instance
    .build();

onPlaybackRequest(async (query: string) => {

    // find the best match to the query from all configured sources
    const found = await shougun.findMedia(query);
    if (!found) {
        throw new Error("no match");
    }

    // play the found media on the configured output surface (a Chromecast).
    // if `found` appears to be a TV series, Shougun will automatically resume
    // wherever you left off
    console.log("Playing", found);
    await shougun.play(found);
});
1.9.2

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.8.7

2 years ago

1.10.0

2 years ago

1.8.6

3 years ago

1.8.5

3 years ago

1.8.2

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.9

3 years ago

1.7.8

3 years ago

1.8.4

3 years ago

1.8.3

3 years ago

1.7.3

3 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.4

3 years ago

1.7.2

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.1

3 years ago

1.6.0

4 years ago

1.5.9

4 years ago

1.5.8

4 years ago

1.5.7

4 years ago

1.5.6

5 years ago

1.5.5

5 years ago

1.5.4

5 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago