Git Product home page Git Product logo

api's Introduction

Universal Media Server

Universal Media Server CI Crowdin

Universal Media Server Universal Media Server is a DLNA, UPnP and HTTP/S Media Server. It is capable of sharing video, audio and images between most modern devices. It was originally based on PS3 Media Server by shagrath, in order to ensure greater stability and file-compatibility.

To see a comparison of popular media servers, click here

Universal Media Server supports all major operating systems, with versions for Windows, Linux and macOS. The program streams or transcodes many different media formats with little or no configuration. It is powered by FFmpeg, MediaInfo, OpenSubtitles, Crowdin, MEncoder, tsMuxeR, AviSynth, VLC and more, which combine to offer support for a wide range of media formats.

Current Project Members

Sponsors

Become a sponsor

Links

Thanks

Thanks for major code contributions:
Thanks for documentation and contributions to the community:
  • DeFlanko
  • meskibob
  • Optimus_prime
  • otmanix
  • squadjot
Thanks for significant/frequent language translations:
Special Thanks:
  • boblinds and snoots for the network test cases :)
  • sarraken, bleuecinephile, bd.azerty, fabounnet for the support and feedback
  • ...And you!

api's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar js-kyle avatar renovate-bot avatar renovate[bot] avatar subjunk avatar surfaces avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

sshyran surfaces

api's Issues

Decide whether to use Node 14

Node 14 got released and has some nice things like improved performance and the optional chaining feature. We could wait until it hits LTS in October or be early adopters. Thoughts?

[DepShield] (CVSS 7.5) Vulnerability due to usage of express:4.17.1

Vulnerabilities

DepShield reports that this application's usage of express:4.17.1 results in the following vulnerability(s):

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.memoize:4.1.2

Vulnerabilities

DepShield reports that this application's usage of lodash.memoize:4.1.2 results in the following vulnerability(s):


Occurrences

lodash.memoize:4.1.2 is a transitive dependency introduced by the following direct dependency(s):

ts-jest:24.3.0
        └─ lodash.memoize:4.1.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of express:4.16.4

Vulnerabilities

DepShield reports that this application's usage of express:4.16.4 results in the following vulnerability(s):

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Don't store dummy episode titles

We have this code in the client, that should probably be in the API instead:

			/**
			 * Sometimes if OpenSubtitles doesn't have an episode title they call it
			 * something like "Episode #1.4", so discard that.
			 */
			episodeName = StringEscapeUtils.unescapeHtml4(episodeName);
			if (episodeName.startsWith("Episode #")) {
				episodeName = "";
			}

Circular dependency warnings

Node14 now warns about circular dependencies. We have some warning printed on start now.

The issue in our case is from the mongodb native driver, which is used by Mongoose. It is in the process of being fixed, so it will be resolved once there is a new Mongoose version available with the mongo driver upgrade

Automattic/mongoose#8842

Support lookups via IMDb ID

This is something we currently do in UMS so we should probably do that here before our first release too. I don't think it is used much but we support adding the IMDb ID into the filename itself and looking up from that.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.get:4.4.2

Vulnerabilities

DepShield reports that this application's usage of lodash.get:4.4.2 results in the following vulnerability(s):


Occurrences

lodash.get:4.4.2 is a transitive dependency introduced by the following direct dependency(s):

pm2:4.2.3
        └─ vizion:2.0.2
              └─ lodash.get:4.4.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.sortby:4.7.0

Vulnerabilities

DepShield reports that this application's usage of lodash.sortby:4.7.0 results in the following vulnerability(s):


Occurrences

lodash.sortby:4.7.0 is a transitive dependency introduced by the following direct dependency(s):

jest:24.9.0
        └─ jest-cli:24.9.0
              └─ jest-config:24.9.0
                    └─ jest-environment-jsdom:24.9.0
                          └─ jsdom:11.12.0
                                └─ data-urls:1.1.0
                                      └─ whatwg-url:7.0.0
                                            └─ lodash.sortby:4.7.0
                                └─ whatwg-url:6.5.0
                                      └─ lodash.sortby:4.7.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Bump yarn

1.22.4 is available on my server so we should bump to that

Always return JSON

Our responses are JSON when there is a result, but strings when there isn't. We should change that to have predictable types. Something like:

{ message: "Metadata not found" }

for no results

Incorrect line numbers in stacktraces

In our tests we are getting impossible line numbers, possibly due to ts-node (that's a guess).
e.g.

console.error
    Error: title is required
        at Object.exports.getBySanitizedTitle (/home/travis/build/UniversalMediaServer/api/src/controllers/media.ts:3018:11)
        at /home/travis/build/UniversalMediaServer/api/src/routes/media.ts:314:25
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:42:32)
        at /home/travis/build/UniversalMediaServer/api/node_modules/koa-router/lib/router.js:368:16
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:42:32)
        at /home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:34:12
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-router/lib/router.js:373:31)
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:42:32)
        at bodyParser (/home/travis/build/UniversalMediaServer/api/node_modules/koa-bodyparser/index.js:95:11)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at /home/travis/build/UniversalMediaServer/api/src/app.ts:624:3
        at /home/travis/build/UniversalMediaServer/api/src/app.ts:584:5

Cannot read property 'match' of undefined

https://www.universalmediaserver.com/api/media/a04cfbeafc4af7eb/884419440

TypeError: Cannot read property 'match' of undefined
    at LibID.extend (/Users/kyle-dev/umsapi/node_modules/opensubtitles-api/lib/identify.js:71:36)
    at /Users/kyle-dev/umsapi/node_modules/opensubtitles-api/index.js:209:42
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Object.exports.getByOsdbHash (/Users/kyle-dev/umsapi/src/controllers/media.ts:89:14)
    at /Users/kyle-dev/umsapi/src/routes/media.ts:7:3
    at bodyParser (/Users/kyle-dev/umsapi/node_modules/koa-bodyparser/index.js:95:5)
    at /Users/kyle-dev/umsapi/src/app.ts:35:3
    at /Users/kyle-dev/umsapi/src/app.ts:23:5

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.findindex:4.6.0

Vulnerabilities

DepShield reports that this application's usage of lodash.findindex:4.6.0 results in the following vulnerability(s):


Occurrences

lodash.findindex:4.6.0 is a transitive dependency introduced by the following direct dependency(s):

pm2:4.2.3
        └─ vizion:2.0.2
              └─ lodash.findindex:4.6.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Support searching by metadata

The UMS client currently looks for a match to the OS hash, and if that fails it looks for a metadata match based on a sanitised title. We should allow that to happen through our API too.

Add support for more data

I found this example of what a very good result from OMDb can be like, and it would be cool to support that. It's from http://www.omdbapi.com/?i=tt3896198 but you need your API key too, which is free.

I think we should store all of the fields. They can all make a richer web interface experience.

{"Title":"Guardians of the Galaxy Vol. 2","Year":"2017","Rated":"PG-13","Released":"05 May 2017","Runtime":"136 min","Genre":"Action, Adventure, Comedy, Sci-Fi","Director":"James Gunn","Writer":"James Gunn, Dan Abnett (based on the Marvel comics by), Andy Lanning (based on the Marvel comics by), Steve Englehart (Star-Lord created by), Steve Gan (Star-Lord created by), Jim Starlin (Gamora and Drax created by), Stan Lee (Groot created by), Larry Lieber (Groot created by), Jack Kirby (Groot created by), Bill Mantlo (Rocket Raccoon created by), Keith Giffen (Rocket Raccoon created by), Steve Gerber (Howard the Duck created by), Val Mayerik (Howard the Duck created by)","Actors":"Chris Pratt, Zoe Saldana, Dave Bautista, Vin Diesel","Plot":"The Guardians struggle to keep together as a team while dealing with their personal family issues, notably Star-Lord's encounter with his father the ambitious celestial being Ego.","Language":"English","Country":"USA","Awards":"Nominated for 1 Oscar. Another 14 wins & 52 nominations.","Poster":"https://m.media-amazon.com/images/M/MV5BNjM0NTc0NzItM2FlYS00YzEwLWE0YmUtNTA2ZWIzODc2OTgxXkEyXkFqcGdeQXVyNTgwNzIyNzg@._V1_SX300.jpg","Ratings":[{"Source":"Internet Movie Database","Value":"7.6/10"},{"Source":"Rotten Tomatoes","Value":"85%"},{"Source":"Metacritic","Value":"67/100"}],"Metascore":"67","imdbRating":"7.6","imdbVotes":"526,626","imdbID":"tt3896198","Type":"movie","DVD":"22 Aug 2017","BoxOffice":"$389,804,217","Production":"Walt Disney Pictures","Website":"N/A","Response":"True"}

[DepShield] (CVSS 7.5) Vulnerability due to usage of debug:2.6.9

Vulnerabilities

DepShield reports that this application's usage of debug:2.6.9 results in the following vulnerability(s):


Occurrences

debug:2.6.9 is a transitive dependency introduced by the following direct dependency(s):

debug:2.6.9

express:4.16.4
        └─ body-parser:1.18.3
              └─ debug:2.6.9
        └─ debug:2.6.9
        └─ finalhandler:1.1.1
              └─ debug:2.6.9
        └─ send:0.16.2
              └─ debug:2.6.9

morgan:1.9.1
        └─ debug:2.6.9

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

ESLint

Do we want ESLint? Or is there a better thing?

media.spec timeouts locally

If I run yarn test, the file media.spec.ts gets timeouts on all of the should statements. The other files then pass.

Think about API versioning

Old clients should continue to work forever, so we need a way to identify which version of the API the client was designed to consume

Express error handler

The express error handler at the moment doesn't suit an API project as it displays the error to the developer as an HTML page.

Errors should be logged to the console in development

Allow use of the private OMDb server

@js-kyle Since we are using your fork of imdb-api and the owner doesn't seem to be paying attention to the things we have contributed, I suggest we add the support for private.omdbapi.com to your fork, what do you think?
It would be ideal to be able to pass that option as a parameter

Return different results for temporary failures vs. real failures

We need to make sure that we are returning a different error/message depending on whether a lookup has failed due to a real failure to find it (both APIs returned no results, or the results were not complete enough), or just a temporary failure e.g. high server load from the third parties.
We should also make sure that those temporary failures don't result in a FailedLookup being written, since in those cases it would be better to try until a real result is received, even if that result is just that they don't have that record.

We may already do some of this so this story involves some review too.

Get movie and episode ratings

This one is potentially tricky so I made a separate story. Most of our information never changes except to start existing, but ratings are changeable, do we care? It's probably pretty low stakes, so one option is to not really care about it. Another option is to periodically update it in a similar way to how we check for missing lookups.

Thoughts @js-kyle ?

Don't expire good records

Happy to discuss this but I think it would be good to remove the document expiry on MediaMetadata. I know it makes it convenient for progressively adding more fields but given that we are attempting to cache rate-limited services, it stops us from accumulating good results over time. Thoughts?

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.foreach:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.foreach:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.foreach:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

pm2:4.2.3
        └─ vizion:2.0.2
              └─ lodash.foreach:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Create database models

Our most immediate model should allow us to store metadata that we receive from OpenSubtitles, for easier and throttle-free use in UMS.
It should store data like the IMDb ID, associated genres, actors, episode title, season number, episode number, movie year, etc.

Handle empty responses from Open Subtitles

Sometimes if open subtitles can't find metadata based on a specific hash it will return an empty response - how should that be handled?

Options:

  • create the empty record, so subsequent lookups return empty db documents
  • avoid creating the incomplete document

Store TV series too

At the moment our code has a concept of a TV episode, but not a TV series. OMDb has the concept of a show and I think we should too. It would let us make our web interface way nicer - if a user goes to a folder for a show, instead of just shows a list of seasons, we could list our nice data for the show that isn't tied to any particular episode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.