GithubHelp home page GithubHelp logo

wh00p / emby-fix-dateadded-gpl Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 44 KB

Public GPL version. Fix the albums date added using one of its songs date added.

License: GNU General Public License v3.0

JavaScript 100.00%
emby emby-server emby-api node-js

emby-fix-dateadded-gpl's Introduction

Emby-fix-dateadded-gpl

Public GPL version. Fix the albums date added using one of its songs date added.

DISCLAIMER

  1. You understand the risk of using this script and you accept the risk it.
  2. By using this software you will not hold me (the author) responsible to any negative impact on your library.
  3. The software is provided "as-is", you can enhance and change the code to fit your need.
  4. And above all, you should do a backup of your library before any operation.

Hypothesis:

  1. The files creation date and last modified date of the files, folders and sub folders are correct and like you wanted them.
  2. The server is using SSL.
  3. You have access to emby Server with a admin user

What it does

  1. it will list all the albums, for each album it will take the first song.
  2. if the "date added" is different, it will take use the one from the song in the album and save the metadata.

Dependencies (use npm):

  1. "node": "^16.6.1",
  2. "request": "^2.88.2",
  3. "winston": "^3.3.3",
  4. "winston-daily-rotate-file": "^4.5.5"

Before starting

  1. Do a backup of your library!
  2. Configure the api key in /src/data/mb-api-token.json
  3. Configure "embyUserId", "embyDeviceId", "embyMusicAlbumParentId", "embyServerHost" and "embyServerPort" in /src/data/mb-device-config.json

API key

Please follow the guide here: https://github.com/MediaBrowser/Emby/wiki/Api-Key-Authentication and paste the API key in the json file.

embyUserId

Go into the user profile with the admin rights, check the URL, you'll see the embyUserId. Copy and paste it in the config file. image

embyDeviceId

  1. Go into the dashboard
  2. In the Devices section, click on Devices (as in screenshot)
  3. And select the last device you used to connect with your user account (it does not really matter)
  4. Check in the url, you'll see the id. Copy and paste the value in "embyDeviceId" in the config file. image

embyMusicAlbumParentId

Here it's all about the albums with the wrong added date.

  1. From Home, go into Music library image
  2. Once in the music library, check the url, you should see parentId. Copy and paste this value in "embyMusicAlbumParentId" in the config file. image

Run

Please verify that you have the correct dependencies and the right NodeJS version. node .\src\fix-mb-music-date_added.js

emby-fix-dateadded-gpl's People

Contributors

wh00p avatar

Stargazers

 avatar

Watchers

 avatar

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.