• 1
  • 5
  • 6
  • 7
  • 8
  • 9(current)
WIP CommandLine
My scripts are:

Radarr
Link

Sonarr
Link

os.environ.get('EmberMediaManager') is set to
python:
D:\\EmberMediaManager\\Ember Media Manager.exe

My last log on Sonarr:
python:
pythonw.exe at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
pythonw.exe at System.Windows.Forms.Control.WndProcException(Exception e)
pythonw.exe at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
pythonw.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnUnhandledException(UnhandledExceptionEventArgs e)
pythonw.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.raise_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
pythonw.exe at Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
pythonw.exe at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
pythonw.exe Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
pythonw.exe ERROR:EmberMediaManager:Ember Media Manager failed with: 255
pythonw.exe INFO:EmberMediaManager:Ember Media Manager: running on PID: (9716)
pythonw.exe INFO:EmberMediaManager:TV Show Internal ID: 128
pythonw.exe INFO:EmberMediaManager:TV Show TVDB ID: 253463
pythonw.exe INFO:EmberMediaManager:TV Show Full Path: T:\TV\Black Mirror
pythonw.exe INFO:EmberMediaManager:TV Show Title: Black Mirror
pythonw.exe INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-scanfolder', u'"T:\\TV\\Black Mirror"', u'-nowindow']
pythonw.exe INFO:EmberMediaManager:TV Show Black Mirror already on kodi's library. Scan folder for new episode.
pythonw.exe INFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.

EDIT: while browsing my EMM log I saw this error at the same timestamp as previous python script:
Code:
2019-06-05 10:22:13.4798;Ember_Media_Manager.My.MyApplication;Ember_Media_Manager.My.MyApplication.MyApplication_Startup;1;INFO;====Ember Media Manager starting up====;
2019-06-05 10:22:13.5678;Ember_Media_Manager.My.MyApplication;Ember_Media_Manager.My.MyApplication.MyApplication_Startup;1;INFO;====Version 1.4.90 x64;
2019-06-05 10:22:19.7072;EmberAPI.Database;EmberAPI.Database.Connect_MyVideos;1;ERROR;Connect_MyVideos    Unable to open media database connection.;"EXCEPTION OCCURRED:System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized()
   at System.Data.SQLite.SQLiteLog.Initialize()
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at EmberAPI.Database.Connect_MyVideos()*   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized()
   at System.Data.SQLite.SQLiteLog.Initialize()
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at EmberAPI.Database.Connect_MyVideos()"
2019-06-05 10:22:19.7322;Ember_Media_Manager.My.MyApplication;Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException;1;ERROR;EmberAPI;"EXCEPTION OCCURRED:System.NullReferenceException: Object reference not set to an instance of an object.
   at EmberAPI.Database.LoadAllGenres()
   at Ember_Media_Manager.frmMain.frmMain_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)*   at EmberAPI.Database.LoadAllGenres()
   at Ember_Media_Manager.frmMain.frmMain_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"

Could this be the culprit?
Image Image
Reply
Finaly!

Googled a bit the problem and ended up copying 
Code:
SQLite.Interop.dll
from x64 folder to EMM root folder where the
Code:
Ember Media Manager.exe
is placed.

All is working now. 

Don't understand why it worked for movies scraping but it is working now Smile
Image Image
Reply
@redglory that issue has been around for about a year, not just a python problem https://forum.kodi.tv/showthread.php?tid...pid2732437
Reply
Ok thx.

Works for now
Image Image
Reply
That's strange, all DLL's will be indexed manually at the start and before the command line will be exequeted. I'ill check that, bug has been added to the tracker: Link
Reply
(2019-06-07, 09:30)DanCooper Wrote: That's strange, all DLL's will be indexed manually at the start and before the command line will be exequeted. I'ill check that, bug has been added to the tracker: Link
I'm having same problem and I already have the file on the root of EmberMediaManager.exe

This only happens for tv shows...

I had to call my script using powershell script as on latest Sonarr version you can't no longer pass arguments...
python:
python2w C:\ProgramData\Sonarr\scripts\EmberMediaManager\main.py

I can't even get anything on EMM logs.

If I run my script directly on powershell it calls it without a problem.
Image

Ran again with same error on Sonarr log file:
python:
powershell.exe at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
powershell.exe at System.Windows.Forms.Control.WndProcException(Exception e)
powershell.exe at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
powershell.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnUnhandledException(UnhandledExceptionEventArgs e)
powershell.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.raise_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
powershell.exe at Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
powershell.exe at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
powershell.exe Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
powershell.exe ERROR:EmberMediaManager:Ember Media Manager failed with: -1073740771
powershell.exe INFO:EmberMediaManager:Ember Media Manager: running on PID: (15192)
powershell.exe INFO:EmberMediaManager:TV Show Internal ID: 149
powershell.exe INFO:EmberMediaManager:TV Show TVDB ID: 366026
powershell.exe INFO:EmberMediaManager:TV Show Full Path: T:\TV\Typewriter
powershell.exe INFO:EmberMediaManager:TV Show Title: Typewriter
powershell.exe INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['C:\\ProgramData\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-scanfolder', u'"T:\\TV\\Typewriter"', u'-nowindow']
powershell.exe INFO:EmberMediaManager:TV Show Typewriter already on kodi's library. Scan folder for new episode.
powershell.exe INFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.

My application folder
Image
Image Image
Reply
I've ended up creating executable python script and call it on Sonarr (created it with options: -w (No Console) -F (Onefile).

It works like a charm
Image Image
Reply
hey all,

I'm trying to work out the commandline switches to rescrape the thumb and nfo for a single episode only, but just cannot get it working.
I would like add automation into my daily script where I can tell Ember to rescrape episodes with missing thumb, plot, rating etc.
I'm hoping to extract strFilePath from SQLite into a text file, adding the correct switches.

has anyone done this before?
thanks Smile
4x R-Pi4b LibreELEC v10 | Aeon Nox: SiLVO | Flirc cases
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.4.19 | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
Reply
(2021-05-25, 16:23)zerocool_ie Wrote: hey all,

I'm trying to work out the commandline switches to rescrape the thumb and nfo for a single episode only, but just cannot get it working.
I would like add automation into my daily script where I can tell Ember to rescrape episodes with missing thumb, plot, rating etc.
I'm hoping to extract strFilePath from SQLite into a text file, adding the correct switches.

has anyone done this before?
thanks Smile
I don't think you can scrape a single episode. But better ask @DanCooper
Image Image
Reply
(2021-05-25, 16:23)zerocool_ie Wrote: I'm trying to work out the commandline switches to rescrape the thumb and nfo for a single episode only, but just cannot get it working.
It's not possible.
But I could add that if you specify a path to a movie/tvshow/episode, only that path will be scrapped. For example (same for all other types):
Code:
-scrapemovies [ScrapeType] single "D:\Movie\Avatar\Avatar.mkv" [ScrapeModifier]
Would that help?

For Ember 3.0 i've planned to implement a JSON interface like in Kodi to get the ID of a video to modify/scrape/whatever a video with this ID like you whould do in the GUI. But that takes time Big Grin
Reply
(2021-05-27, 01:21)DanCooper Wrote:
(2021-05-25, 16:23)zerocool_ie Wrote: I'm trying to work out the commandline switches to rescrape the thumb and nfo for a single episode only, but just cannot get it working.
It's not possible.
But I could add that if you specify a path to a movie/tvshow/episode, only that path will be scrapped. For example (same for all other types):
Code:
-scrapemovies [ScrapeType] single "D:\Movie\Avatar\Avatar.mkv" [ScrapeModifier]
Would that help?

For Ember 3.0 i've planned to implement a JSON interface like in Kodi to get the ID of a video to modify/scrape/whatever a video with this ID like you whould do in the GUI. But that takes time Big Grin

thanks @redglory & @DanCooper 
That option would be great to have at some point down the line - I'm sure there are more important features you are working on Smile
4x R-Pi4b LibreELEC v10 | Aeon Nox: SiLVO | Flirc cases
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.4.19 | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
Reply
Hi!

I make a .bat file to use CLI command:
@echo off
if not "%1" == "min" start /MIN cmd /c %0 min & exit/b >nul 2>&1
"C:\DLAProg\Ember Media Manager\Ember Media Manager.exe" -scanfolder "U:\Film" -scrapemovies newauto all
exit


If i run it as logged in user, the  .bat runs good without any problem. The scraping is succesfull.

I want to run it automatically from SONARR/RADARR(also in the windows), but i got this error on loading window(during Load database):
"Object reference not set to ad instance of an object."

From log i got this: link

Can somebody help me please?
Reply
  • 1
  • 5
  • 6
  • 7
  • 8
  • 9(current)

Logout Mark Read Team Forum Stats Members Help
CommandLine0