Kodi Community Forum
1.3.x dev q: Where in code does the "Reload Show" code start - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+---- Forum: Ember Media Manager (https://forum.kodi.tv/forumdisplay.php?fid=195)
+---- Thread: 1.3.x dev q: Where in code does the "Reload Show" code start (/showthread.php?tid=166179)



1.3.x dev q: Where in code does the "Reload Show" code start - rassilon22 - 2013-06-01

I received a bunch of tv episodes from my brother in person (~200GB worth) of one tv show while I was back home visiting family.
Unfortunately, the file naming schemes are beyond insane and I'd ideally like to keep the folder structure the way it is.
(For the majority of the run of the show (Doctor Who), you had story arcs that ran 4-8 episodes long.) This is how the folders are structured currently.
I was hoping one of the developers would point in the general vicinity of where to start teasing out the code in EMM 1.3.1.13 for episode finding so I can edit each of the episodes manually via the pretty Ember UI to generate the necessary .NFO file for XBMC.

Once I have the starting point I can unravel the rest with some hacky code to get the job done.

Thanks,
Bill


RE: 1.3.x dev q: Where in code does the "Reload Show" code start - m.savazzi - 2013-06-01

look for scraper in the frmMain follow the execution starting from the menu command. Depends on what is the "start"
ember is a multi threaded, multi executable (main and modules) application...


RE: 1.3.x dev q: Where in code does the "Reload Show" code start - rassilon22 - 2013-06-02

So I found the answer to my question.
Once I unravelled the code I made two changes that were able to get me moving forward: (so far)

* EmberAPI\clsAPIScanner.vb: ScanTVSourceDir subroutine:
Use: GetDirectories("*.*", SearchOption.AllDirectories) instead of just "GetDirectories.Where...." when constructing inList values.

* frmMain.vb: SelectEpisodeRow subroutine:
If the season and episode couldn't be detected the file path text box wasn't getting populated.

The solution here was to add the call to fillScreenInfoWithEpisode after setting currShow in the case we don't call LoadEpisodeInfo:

Master.currShow = Master.DB.LoadTVEpFromDB(Convert.ToInt32(Me.dgvTVEpisodes.Item(0, iRow).Value), True)
Me.fillScreenInfoWithEpisode()

This way my arbitrary directory tree for Doctor Who will have all of the video files detected by the scanner for manual fixing the season and episode numbers.
This also helps scanning directory trees where the directory structure underneath the tv show root are sometimes at the mercy of all-season torrent directory structure.

It looked like these changes would be safe enough to apply for all users of Ember.

Thoughts?

The only issue I had with XBMC and the folder structure was needing to tick the "this tree is all one tv show" at the root of the tv show.

Thanks for continuing to work on such a great tool,
Bill


RE: 1.3.x dev q: Where in code does the "Reload Show" code start - m.savazzi - 2013-06-02

Not sure of the side effects with messy folders in the video structure.

Please post the code in the developer thread Smile