• 1
  • 5
  • 6
  • 7
  • 8(current)
  • 9
WIP CommandLine
(2018-04-17, 17:25)macel Wrote: I have a script that scrapes the show as soon as it is recorded, this works nicely but I end up with a lot of missing or inaccurate metadata/images (e.g. often the rating is just based on 1 vote or there is no episode poster image yet).

What I was hoping to do was to rescape all the data again later (e.g. every couple days) once there has been enough time for the data to show up on tvdb/trakt/etc.

Make sense, but how do you set the episodes to "marked"? Via settings "mark neew episodes"?
Reply
(2018-04-17, 19:41)DanCooper Wrote:
(2018-04-17, 17:25)macel Wrote: I have a script that scrapes the show as soon as it is recorded, this works nicely but I end up with a lot of missing or inaccurate metadata/images (e.g. often the rating is just based on 1 vote or there is no episode poster image yet).

What I was hoping to do was to rescape all the data again later (e.g. every couple days) once there has been enough time for the data to show up on tvdb/trakt/etc.

Make sense, but how do you set the episodes to "marked"? Via settings "mark neew episodes"? 
Right.

And then when I get around to it I go through all the marked episodes and unmark everything that has all the metadata I want.
Reply
(2018-04-18, 06:13)macel Wrote:
(2018-04-17, 19:41)DanCooper Wrote:
(2018-04-17, 17:25)macel Wrote: I have a script that scrapes the show as soon as it is recorded, this works nicely but I end up with a lot of missing or inaccurate metadata/images (e.g. often the rating is just based on 1 vote or there is no episode poster image yet).

What I was hoping to do was to rescape all the data again later (e.g. every couple days) once there has been enough time for the data to show up on tvdb/trakt/etc.

Make sense, but how do you set the episodes to "marked"? Via settings "mark neew episodes"?  
Right.

And then when I get around to it I go through all the marked episodes and unmark everything that has all the metadata I want. 
Ok, I wanna check your CL later today.
Reply
(2018-04-15, 08:08)macel Wrote: I tried to create a scheduled task that would rescrape all marked TV episodes, I used on the latest nightly build:
Code:
-profile "Default" -nowindow -scrapetvshows markedauto episodeall

But this does not seem to accomplish what I tried to do. I probably misunderstood something? 
Find out the reason why it's not working for you:
"-scrapetvshows markedauto" scraps only marked tv shows, not marked episodes. "episodeall" means only that also all episode content will be scraped for this tv shows.
Looks like I've to add another CL parameter like "-scrapetvepisodes" to get that running. I've to check some cases if that will work without issues.
Reply
(2018-04-19, 13:28)DanCooper Wrote: Looks like I've to add another CL parameter like "-scrapetvepisodes" to get that running
If you are doing this can you add so it's something like -scrapetvepisodes "episode_path" episodeall or -scrapetvepisodes "series_path" episodeall
Reply
(2018-04-19, 15:14)komplex Wrote:
(2018-04-19, 13:28)DanCooper Wrote: Looks like I've to add another CL parameter like "-scrapetvepisodes" to get that running
If you are doing this can you add so it's something like -scrapetvepisodes "episode_path" episodeall or -scrapetvepisodes "series_path" episodeall
I think that's possible to add.
Reply
(2018-04-16, 09:58)DanCooper Wrote:
(2018-04-08, 07:29)icegod001 Wrote:
(2018-04-07, 13:06)DanCooper Wrote: If you use an 1.4.8.x Alpha or daily version you've to use "extrafanarts" and "extrathumbs" instead of "efanarts" and "ethumbs", otherwise all ScrapeModifiers after the wrong ones will be ignored.

But the propblem is that it looks like there is a bug with "missing" and "meta". If you enable "meta" than every movie will be scraped, even the meta data is already scraped. Atm there is no column in the main data table that says meta is there or not. I can fix that with the next database upgrade that I've planned for multiple rating support. So atm you've to remove "meta" from your command line (and fix efanarts and ethumbs if you use one of the latest versions) as workaround. 
Thanks. I am using 1.4.8.0 so I have updated my command.
I wasn't having any issues with it scraping all movies, but have removed meta from the command just to be safe.
Ember still seems to be behaving the same. I'll illustrate with the picture.
I have a movie with some of the images already downloaded. So I ran the modified command from my previous post but the existing files get redownloaded or the very least their modified timestamp get updated for some reason.
Files before running the command.
Image
Files after running the command. Same file has redownloaded (modified timestamp has been updated).
Image
I also tried enabling the keep existing Option in the GUI. But that didn't help.
Image

Thanks  
Ember re-save all images, trailers. themes and NFOs each time a movie is saved to the database. All of this content will be read from disc or if new scraped from internet to memory and saved on evere file name that's enabled in settings. So even nothing has been scraped or changed, the files will be re-written. The reason is that in this way you can be shure that you don't have any different pictures of one image type and all enabled file names are really there.
"Keep extisting" means that no new image will be scraped if one is already existing, even if you run a re-scrape on this image type. In this case existing images can only be re-scraped manually in the "Select Image" dialog or in the "Edit" dialog. But also with this settings the images will be re-saved on every time the media will be (re-)saved to database. 
Thanks for the clarification. Makes sense Smile. Guess I'll have to come up with another way of doing what I want to do Smile
Reply
Code:
ember -scanfolder "F:\test\movies\Goosebumps (2015)" -scrapemovies allauto all
This scrapes all movies inside
Code:
"F:\test\movies\"
I only need to it scrape the movie inside the given folder

EDIT:
Doing
Code:
ember -scanfolder "F:\test\movies\Goosebumps (2015)" allauto all
Just gives you
Code:
2018-06-17 15:04:03.6954,EmberAPI.CommandLine,EmberAPI.CommandLine.RunCommandLine,1,TRACE,Call CommandLine,
2018-06-17 15:04:03.6954,EmberAPI.CommandLine,EmberAPI.CommandLine.RunCommandLine,1,WARN,[CommandLine] Invalid command: allauto,
2018-06-17 15:04:03.6954,EmberAPI.CommandLine,EmberAPI.CommandLine.RunCommandLine,1,WARN,[CommandLine] Invalid command: all,
Reply
Code:
ember -scanfolder "F:\test\movies\Goosebumps (2015)" -scrapemovies allauto all

That command does two things:
  • scan the folder "Goosebumps"
  • (re-)scrapes all movies (allauto)

You've to use:
Code:
ember -scanfolder "F:\test\movies\Goosebumps (2015)" -scrapemovies newauto all
ember -scanfolder "F:\test\movies\Avatar" -scrapemovies newauto all
ember -scanfolder "F:\test\movies\Die Hard" -scrapemovies newauto all

All movies will be reset to "not new" before each database update (-scanfolder is the same like a DB update, but only on a specified folder). So you can/have to rescrape all "new" movies after each scan/database update.

Maybe it will be a good idea to implement
Code:
ember -scanfolder "F:\test\movies\Goosebumps (2015)" auto all
to set all new added movies after a "-scanfolder" as "to scrape". I've added a feature request for that: Link
Reply
The problem is ember doesn't know the file "Goosebumps (2015).mkv" has been changed because the DB hasn't been updated since replacing the old file with the new, so doing
Code:
ember -scanfolder "F:\test\movies\Goosebumps (2015)" -scrapemovies newauto all
does nothing

(2018-06-17, 16:25)DanCooper Wrote: Maybe it will be a good idea to implement
Code:
ember -scanfolder "F:\test\movies\Goosebumps (2015)" auto all
to set all new added movies after a "-scanfolder" as "to scrape". I've added a feature request for that: Link
Yeah is what i need
Reply
After reading this thread, I think that it could be possible to make a docker image out of Ember Media Manager and use the command line, the only thing is to figure out how to set the settings since docker has no GUI.

I have never built a docker image but will start looking and see if I can pull this off if I do my automatic set up will be complete, with almost no interaction. Maybe someone here with more knowledge about creating docker images can help.

A docker image will help those with automatic setups like myself and could be run from any OS. Ember is way more powerful scraping images that any tool.

My set up

1 - Filebot gets the movie from the download folder and moves it to my library folder, it also renames it using "themobiedb" it also renames the subtitles and adds the language suffix.
2 - Then Emby Media Server adds only the NFO.
3 - Once in a while I turn on my windows computer and run Ember to add the images.

Step 1 and 2 are completely unattended by setting a Task in my synology NAS, I could have Emby or filebot add the images but they don't add the extrafanart, actors also the rename the images differently
Reply
@DanCooper I'm haveing trouble tunning EMM from commandline without splash screen where updating tvseries.

Tried putting -nowindow as first and last command but it always shows the splashscreen and when running from python suprocess it throws an exception:

python:

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.
Close

My command:
python:

INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-nowindow', u'-scanfolder', u'"T:\\TV\\Billions"']
Close

EDIT: I think it was the Trakt dialog that was trying to pop... will try again Smile
Image Image
Reply
(2019-04-15, 00:03)redglory Wrote: @DanCooper I'm haveing trouble tunning EMM from commandline without splash screen where updating tvseries.

Tried putting -nowindow as first and last command but it always shows the splashscreen and when running from python suprocess it throws an exception:

python:

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.
Close

My command:
python:

INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-nowindow', u'-scanfolder', u'"T:\\TV\\Billions"']
Close

EDIT: I think it was the Trakt dialog that was trying to pop... will try again Smile
It was not the trakt popup...

I've disabled trakt and the problem persists...

When I run it using CMD it works and popup doesn't show. But when I try with Popen it throws the exception.

I'm confused as I have one script for movies that works and is the same (with the necessary adjustments) as the one for tvshows...

Will try to find out the problem.

EDIT: Tried to run script inside CMD and it worked. No splash screen opened and no error. 
python:
λ C:\Python27\python.exe D:\Sonarr\scripts\EmberMediaManager\main.py
INFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.
INFO:EmberMediaManager:TV Show None not yet on kodi's library. Set Full Update.
INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-updatetvshows', u'-scrapetvshows', u'newauto', u'all', u'-nowindow']
INFO:EmberMediaManager:TV Show Title: None
INFO:EmberMediaManager:TV Show Full Path: None
INFO:EmberMediaManager:TV Show TVDB ID: None
INFO:EmberMediaManager:TV Show Internal ID: None
INFO:EmberMediaManager:Ember Media Manager: running on PID: (10844)
INFO:EmberMediaManager:Ember Media Manager ran sucessfully for: 197 seconds

Next step was change Sonarr script from
python:
c:\Python27\pythonw.exe
to 
python:
c:\Python27\python.exe
to match CMD command and it didn't work. Changed again to pythonw.exe

Same error:
python:

pythonw.exeLogged from file main.py, line 11920:37
pythonw.exeTypeError: not enough arguments for format string20:37
pythonw.exemsg = msg % self.args20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 329, in getMessage20:37
pythonw.exerecord.message = record.getMessage()20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 465, in format20:37
pythonw.exereturn fmt.format(record)20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 734, in format20:37
pythonw.exemsg = self.format(record)20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 861, in emit20:37
pythonw.exeTraceback (most recent call last):20:37
pythonw.exeat System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)20:37
pythonw.exeat System.Windows.Forms.Control.WndProcException(Exception e)20:37
pythonw.exeat System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)20:37
pythonw.exeat Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnUnhandledException(UnhandledExceptionEventArgs e)20:37
pythonw.exeat Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.raise_UnhandledException(Object sender, UnhandledExceptionEventArgs e)20:37
pythonw.exeat Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException(Object sender, UnhandledExceptionEventArgs e)20:37
pythonw.exeat System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)20:37
pythonw.exeUnhandled 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.20:37
pythonw.exeINFO:EmberMediaManager:Ember Media Manager: running on PID: (9608)20:37
pythonw.exeINFO:EmberMediaManager:TV Show Internal ID: 14320:37
pythonw.exeINFO:EmberMediaManager:TV Show TVDB ID: 36089320:37
pythonw.exeINFO:EmberMediaManager:TV Show Full Path: T:\TV\Chernobyl20:37
pythonw.exeINFO:EmberMediaManager:TV Show Title: Chernobyl20:37
pythonw.exeINFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-scanfolder', u'"T:\\TV\\Chernobyl"', u'-nowindow']20:37
pythonw.exeINFO:EmberMediaManager:TV Show Chernobyl already on kodi's library. Scan folder for new episode.20:37
pythonw.exeINFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.20:37
Image Image
Reply
The notification module is disabled?
Reply
(2019-06-05, 09:36)DanCooper Wrote: The notification module is disabled?
Yupp
Image

What is puzzling me is why it works for movies and not tvshows with the same EMM instance and using a similar python script. I just adjust the commands accordingly.
Image Image
Reply
  • 1
  • 5
  • 6
  • 7
  • 8(current)
  • 9

Logout Mark Read Team Forum Stats Members Help
CommandLine0