Jump to content

Emby API - Change Path


Steve Cartman

Recommended Posts

Steve Cartman

My Movie scan is very slow (About 6500 movies)

My MetaData (NFO file) and images are in the same folder as the video file.

But all the movies are in the same folder. /Movies

I have decide to change the folder structure to the following:

/Movies/First Letter of Title/Movie folder/Movie

So for example for the movie:  Wings (1927) [tmdbid=28966].mkv

the structure would be:  /Movies/V/Wings (1927) [tmdbid=28966]/Wings (1927) [tmdbid=28966].mkv

I have written a program to create the folders, and move the files to the correct movie folder. (Including the NFO file)

Now here's the problem: I am using the API to change the path:

From:  /Movies/Wings (1927) [tmdbid=28966].mkv

To:    /Movies/V/Wings (1927) [tmdbid=28966]/Wings (1927) [tmdbid=28966].mkv

But path is not updated in the NFO file:  /Movies/V/Wings (1927) [tmdbid=28966]/Wings (1927) [tmdbid=28966].NFO

AND a new NFO is created in:   /Movies

Attached is the log:

Search for this line in the log: 

2022-12-28 14:33:41.427 Debug App: Saving nfo metadata for /Movies2/Movies/Wings (1927) [tmdbid=28966].mkv to /Movies2/Movies/Wings (1927) [tmdbid=28966].nfo.

 

 

 

 

 

 

 

 

 

embyserver (7).txt

Link to comment
Share on other sites

18 minutes ago, Luke said:

Hi, what api are you using to change the path? We don't even have such a thing.

Probably he's using this: https://dev.emby.media/reference/RestAPI/ItemUpdateService/postItemsByItemid.html

@Steve Cartman - You can't update an item's path this way. You need to perform a library scan to update the item locations.

Link to comment
Share on other sites

Steve Cartman
5 hours ago, softworkz said:

Probably he's using this: https://dev.emby.media/reference/RestAPI/ItemUpdateService/postItemsByItemid.html

@Steve Cartman - You can't update an item's path this way. You need to perform a library scan to update the item locations.

I read the item with this API: http://192.168.2.16:8096/emby/Users/xxxxxxxxxxxxxxxxxxxx/Items/29931?api_key=xxxxxxxxxxxxxxxxxxxxx

I change the path (JSON  Parse)

I post it back. 

(I know the post works, because I use it to change Genre, Community Rating and Critic Rating)

 

Edited by GrimReaper
Removed serverid & api key
Link to comment
Share on other sites

10 minutes ago, Steve Cartman said:

(I know the post works, because I use it to change Genre, Community Rating and Critic Rating)

Yes it works, that's what it's intended for. But:

3 hours ago, softworkz said:

You can't update an item's path this way.

PS: You might want to edit out your API key from the post.

Link to comment
Share on other sites

Steve Cartman
2 hours ago, softworkz said:

Yes it works, that's what it's intended for. But:

PS: You might want to edit out your API key from the post.

My Bad. Can't seem to edit a post. Could you edit  api key or delete post.

Link to comment
Share on other sites

Happy2Play
11 minutes ago, Steve Cartman said:

My Bad. Can't seem to edit a post. Could you edit  api key or delete post.

done

  • Like 1
  • Haha 1
Link to comment
Share on other sites

At the same time, I've written to Abo, asking why I cannot edit posts in this specific section.
We're such a good forum - nobody can say we wouldn't care about users 🙂 

  • Haha 1
Link to comment
Share on other sites

4 hours ago, softworkz said:

We're such a good forum - nobody can say we wouldn't care about users

Indeed, since I manage to do that before I drink my first cup of coffee :)

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...