Skip to content

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

License

Notifications You must be signed in to change notification settings

wh00p/Emby-fix-dateadded-gpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published