Does not warn when deleting folders

And a fix has been made, but I’ll however not release a new version just for that

You can in the meantime use this build: https://github.com/ukdtom/ExportTools.bundle/archive/tommy-work.zip

And huge thanks for not only spotting it, but also report it

1 Like

Great response time! Thank you. I downloaded that version. It seems to work, but I had to tweak it. I had both “title” options turned off (unchecked). I found now (with the new version) I was getting N/A for what appeared to be (did not thoroughly check!) the cases where the title matched the sort title. For example, if the name of the movie was “The Foo,” I got “Foo” in the sort title. If the name of the movie was “Foo,” I got N/A in the sort title. (The title always seems to be correct.) So I checked the box that said “copy in title if sort title is blank,” and it now seems to do what I expect. Note that the web interface to Plex shows both the title and sort title separately, and allows you to change both. It would appear that they are separate “fields” in the Plex underlying database. But maybe not – maybe it’s just the GUI showing me the sort title as the title when the internal sort title is blank (mirroring what Plex does internally, because Plex does seem to always know the correct sort title). I don’t know. I do know I got what I expected when I tested earlier with the Python Plex API, so I suspect something funny goes on under the hood with ExportTools and these two fields. If they are two separate Plex fields and the sort title is simply initialized by Plex with “Foo” (under both of the above cases), then ExportTools seems to not be pulling the data accurately, which might depend on the option settings. I guess, as long as I check the box, I am getting what I want, so that’s good. If I spot anything really weird, I will report back. Thanks again.

Earlier I did say I wanted blank or N/A if the field was blank. That never seems to be the case in the Plex GUI. So I figured if I spotted a blank or N/A it would mean possible database corruption I should look into. To clarify, I don’t really WANT blank or N/A to show up. I want what’s supposed to be there, basically as shown by the Plex GUI. By “Plex GUI” I am talking about the interface I use in Google Chrome. I want to “compute” in Excel, Access, Python, etc. with what I see in the Plex GUI.

If sort title is not specifically set by the user, or determined by Plex to be set, it’s not part of the XML, but is instead a just in time calculated field.
As such, what tricked me the first time

In other word
If a movie title is The Foo then PMS will automatically put in a sort title named Foo

If movie title is Foo then the sort title field doesn’t need to be present, but is autoset to title by the WebClient

You can see it in the XML for a movie yourself
https://support.plex.tv/articles/201998867-investigate-media-information-and-formats/

Also see ArticleStrings in this tech note:
https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/

I will check these links out. I just checked the first. What’s frustrating is, based on its wording, it starts by implying there is one (1) (singular) audio track in my video. This is at the heart of what I have been trying to figure out. (ExportTools code should show me. But I’ve been busy just using its output – not studying its code. Like I’ve said, I have a lot to learn. Of course the question is how much should I have to learn just to make simple decisions about my media?) Anyway, I will keep reading. I will add more to this post if there’s something relevant. Wait – one more thing. It does occur to me that what I think of as a movie is actually one of a list of videos. I could be confusing what’s a video with a movie, etc. Somehow there would be one movie per audio codec, but that combination is one instance of a list of another object. Whatever. My main point is I haven’t been able to divine this object hierarchy, and it runs counter to my intuition and what I’ve been reading online in the Python Plex API. I will continue reading these links, and perhaps end up studying code to see just what I am missing here. One interesting observation: unless I missed something, a video can have, say, “dca - dca - ac3” but when you look at the actual audio-codec field, it will say dca-ma. That “dca - dca - ac3” might really mean “dts-ma 5.1, dts 5.1, dolby stereo”. While I don’t understand why Plex chooses to use dca, I don’t understand why the output doesn’t say dca-ma for one of those dca’s! (I am not talking about which is currently seleted, which seems to be all N/A’s except for one “1”, and picks off the one out of the sequence “in use.”) I will read more…

FOLLOW-UP 1: I of course have used “Get Info,” but I never bothered to look at the XML. The XML and the Python Plex API are not completely in sync (it seems to me). But I should still be able to use the API to muddle through things. I can see the XML layout, and the stream information I have been looking for is in the XML, but it does NOT seem to be returned by the API. I have tried countless ways to get a the stream information. None have worked. Here is very simplified code template that shows what SHOULD WORK as far as I can tell. (NOTE: This is not how I would code this in practice, but it does show you an “object hierarchy” that I think should work to pull the streams.)

from plexapi.myplex import MyPlexAccount
account = MyPlexAccount('foo','bar')
plex = account.resource('fnord').connect() # returns a PlexServer instance ***ONLY*** if DISABLE REMOTE ACCESS is in effect!?!?!?
movies = plex.library.section('Movies')
movies.search()[0].media[0].parts[0].streams
[]

The list of streams is always empty! I have tried 90,000,000 ways to get this to work. I am beginning to wonder if there isn’t a bug in the Python Plex API. But still I muddle on…

P.S. I am quite happy with using ExportTools, and if I knew about it before I began this whole Python Plex API thing, we would probably not be having this discussion. I would still like to figure this API thing out, but ExportTools is quite adequate to solve the original problems I had.

As already said, I do NOT know that API, and have no intention to learn it…

I digest the XML myself, and if you find, that ExportTools doesn’t reflect what’s in the XML, I for sure would love to hear about it.

Regarding the API that you use, I happens to know, that the devs are alive @ reddit but fail to see them here though

So maybe try and ask dev Q’s regarding their api for the plex api there:
https://www.reddit.com/r/PleX

Otherwise, skip their API, and connect directly, as I do, and already showed you a link to the code I use

I was just commenting – I was not expecting you to help me figure out the API thing. I’ll shut up about the API thing from now on (which, again, was also an excuse to learn more about Python). I find I can use ExportTools, and would recommend to anyone to use that instead of rolling your own. Once I have the ExportTools output, I can do anything I want. Thanks for your time and insights through all this, dane22. Bye for now.

1 Like

Sorry, and got it wrong here, and sounded wrong when reading it again :frowning:

I wasn’t trying to shut you down, but read it as a Q to me…

SORRY

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.