MovieFan's Database Tool for Plex

Not a Linux user so I cannot provide detailed explanations, but my script uses a specific scripting program called MortScript to read and execute the script.  I know Linux has a scripting feature so you probably could rewrite my script into a Linux version, but I have no idea how.  I have basic programming skills so I do not understand all the intricacies of coding, but the language MortScript uses is very easy to understand, no cryptic commands or things like that.  If someone wants to try and convert my script into a Linux script, I will provide any assistance I can, but I know it is something I cannot do myself.

The tool is 2 parts, the script which is a plain text file with the extension mscr, and a zipped file with a few exe programs.  The zip file is in the first post, the script is scattered around the thread.  You put these exe files in the same location as the script.  You run the MortScript.exe file on its own which will associate the mscr extension, so then you only need to double click on the mscr file to run it.

It is best to have the DB file on the same drive as the script, but not necessary.  Although you may run into DB corruption issues running over a network.  I have tested with the DB on a networked drive and had no issues.  I have also run my script with no issues while PMS was running, even though it is recommended to shut down PMS before doing any database work.  The easiest and safest way is to copy the DB to the same folder as the script.  Also put the m3u file in this location.  Run the script and follow the screen.  Hopefully it is self explanatory.  When done, backup the original DB and copy this modified version over.

Note:  The script defaults to looking for the DB in the original userdata location.  You can change this from within the script, there is a command for that, or make a backup of your original DB file and let the script modify the original.

thx for quick responding. 213.gif

Give it a try the coming days, see how it works (not today, gonna sleep soon).

Anyway, your awesome!

PS: Maybe useful for anybody stumbling about to edit the very first post to point to the recent script  + zip files?

Yeah.  The versions in my responses were not meant to be official.  I just provided them to try to fix a problem.  The version I run personally is different from the ones in my responses because I am testing different things.  Once I have a version I feel I want to make official, I will update the first post.

Let me know if you have any ideas for extra features.

Never mind updating, only my opinion. its just in your hand, isn't it?

Already mentioned above: When it works (looking forward) export function would be nice.

First post updated with newest version of my script.

When I try to run this script on Windows 7 32-bit I get this following error:

"This version of C:\7MC\MortScript.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher."

Is there a 32-bit version?

I have only even seen 1 version of MortScript.  I thought it was 32-bit because I have used it on 32-bit systems in the past.  Not sure what is causing that error for you.

I've discovered that the mortscript.exe runs OK on my Windows 8.1 workstation.  So are there some prerequisits for it that may not be installed on my Win 7 'server'?

Can you run it in compatibility mode?

I've discovered that the mortscript.exe runs OK on my Windows 8.1 workstation.  So are there some prerequisits for it that may not be installed on my Win 7 'server'?

That is really odd.  I have never known Mortscript to require any prerequisites.  Let me dig out an older version of the program I have lying around and see if that will help you.

Can you run it in compatibility mode?


No, I tried that - running as Vista - and it didn't work.

Version 0.2.3.0 2014/11/28.

New Feature

Modify user settings

See first post for script file.

The mortscript.exe that is in the Support Files Zip download runs on both my Windows 8 64-bit and Windows 7 64-bit.  It won't run on Windows 7 32-bit.

Here is a slightly older version.  I do not know if this will help.  Like I said, I thought it was 32-bit.

Well, i can't delete and import playlists (also import the exported playlistst). rename and export are working. i see no error or logs.

I use the actually plex server on whs 2011.

KR JiKoPo

Here is a slightly older version.  I do not know if this will help.  Like I said, I thought it was 32-bit.

This version works on my Windows 7 32-bit.  Weird.

My PMS database is on D: drive (along with all the other PMS AppData\Local data files), so I had to browse to choose it - com.plexapp.pluggins.library.db.

However, playlists do not import.  If I choose 3-Import Playlist, then it allows me to choose my .m3u file, then it goes straight back to the Playlist sub-menu.

If I choose 1-List Existign Playlists it says there are no playlists, which is wrong.  I have one playlist which shows up in Web & PHT.

I tried a few other options from the menu, and none of them do anything either.

When I enable debig mode it displays the command that is going to be issued and then opens a CMD window and appears to stop processing.

If I choose the 5-Plex Users option I get a dialog that shows a SQL command, then a CMD window, which I exit, then I get the User sub-menu.  If I choose any option on this list (1-4) it just returns to the main menu immediately.

G.

Ok.  I found a problem with the script/  Working on a fix right now.

MovieFan,

I am trying to export the poster images with your tool and script v0.2.3.0 and it starts ok but doesn't go through the whole library.  In my library folder I have sub-folders for each letter of the alphabet.  The script pulls some images from different folders then goes back to the main menu.  It leaves a window open that says Processing Movies.... in the background but never does anything else.  Below is a sample of what it exported.  Am I doing something wrong?  Thanks for the help.

11/29/2014  19:50:29  Poster Saved: C:\Users\Farnsworth\Videos\Movies\M\Merle Haggard - In Concert (Part 1).jpg
11/29/2014  19:50:29  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\M\Merle Haggard - In Concert (Part 1)-fanart.jpg
11/29/2014  19:50:29  Poster Saved: C:\Users\Farnsworth\Videos\Movies\M\Merle Haggard - In Concert (Part 2).jpg
11/29/2014  19:50:29  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\M\Merle Haggard - In Concert (Part 2)-fanart.jpg
11/29/2014  19:50:29  Poster Saved: C:\Users\Farnsworth\Videos\Movies\A\ADJUSTMENT_BUREAU.jpg
11/29/2014  19:50:29  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\A\ADJUSTMENT_BUREAU-fanart.jpg
11/29/2014  19:50:29  Poster Saved: C:\Users\Farnsworth\Videos\Movies\A\ALASKAN_HOMECOMING.jpg
11/29/2014  19:50:29  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\A\ALASKAN_HOMECOMING-fanart.jpg
11/29/2014  19:50:29  Poster Saved: C:\Users\Farnsworth\Videos\Movies\A\AMAZING_GRACE.jpg
11/29/2014  19:50:29  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\A\AMAZING_GRACE-fanart.jpg
11/29/2014  19:50:30  Poster Saved: C:\Users\Farnsworth\Videos\Movies\A\APOLLO_18.jpg
11/29/2014  19:50:30  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\A\APOLLO_18-fanart.jpg
11/29/2014  19:50:30  Poster Saved: C:\Users\Farnsworth\Videos\Movies\A\ARiverRunsThroughIt.jpg
11/29/2014  19:50:30  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\A\ARiverRunsThroughIt-fanart.jpg
11/29/2014  19:50:30  Poster Saved: C:\Users\Farnsworth\Videos\Movies\A\ATFIRSTSIGHT.jpg
11/29/2014  19:50:30  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\A\ATFIRSTSIGHT-fanart.jpg
11/29/2014  19:50:30  Poster Saved: C:\Users\Farnsworth\Videos\Movies\A\AUSTRALIA Homecoming.jpg
11/29/2014  19:50:30  Artwork Saved: C:\Users\Farnsworth\Videos\Movies\A\AUSTRALIA Homecoming-fanart.jpg
11/29/2014  19:50:30  Poster Saved: C:\Users\Farnsworth\Videos\Movies\B\BEST OF MARK AND BILL 1.jpg

@clowg - I found the problem in my script but I am not sure how to fix it.  It might be a bug in the scripting program itself.  The code I have to download the movie posters is causing the import to not work even though the downloading part works, which makes no sense to me.  I am still trying to find a fix.

@86nymets - That background window is just a status page.  I forgot to add a Done message so you know it finished.  You have to manually close that out.  Did all your posters not get downloaded?

New version up 0.2.3.1.  Easier fix than I thought.  I still could not figure out what was causing the problem but breaking out the portion of the code into it's own subroutine seams to have fixed the issue.  Guess I will have to test all the features next time even if I do not touch their code.