WTV Organizer Plugin for Windows 7 Media Center files (1 Viewer)

thlucas

Portal Pro
February 11, 2011
133
146
Omaha, NE
Home Country
United States of America United States of America
Please report any bugs / feature requests to this thread.

Download Link

https://www.team-mediaportal.com/extensions/movies-videos/wtv-organizer

Download Link (pre MP 1.2.0 Beta Versions)

Link to Attached File

Wiki Link

http://wiki.team-mediaportal.com/User:thlucas/WTV_Organizer_PlugIn

Change Log Link

http://wiki.team-mediaportal.com/User:thlucas/WTV_Organizer_PlugIn/Change_Log

Plugin Summary

I've created a new Process Plugin for MP that organizes Windows 7 Media Center WTV files so that they are recognized by the MP-TVSeries Plugin scanning process.

Plugin Description


I am recently new to MediaPortal and still use Windows7 Media Center (64-bit) for live TV watching, though I like to watch recorded TV in MediaPortal. I love the fanart and TV watching capabilities of MP-TVSeries, but quickly became irritated at the fact that it did not recognize the Win7MC WTV files. So I decided to write an MP plugin to ease my irritations.

Windows7 Media Center recorded TV folder paths are specified in the plugin configuration options. The plugin simply reads the metadata in the WTV file, does a search of TheTVDB.com database for matching series name, and renames the WTV file to "<series> - <season>x<episode> - <title>.wtv". It also moves the file into a new sub-directory with the Series name.

For example, "Chuck_2010_12_31_07_00_00.wtv" would be renamed to "Chuck - 4x7 - Chuck versus the Intersect.wtv" and moved to a sub-folder beneath the recorded TV folder path named "Chuck". Note that you can rename the .WTV files in the WMC7 Recorded TV folder to anything, as long as you keep the .WTV file extension; WMC7 still lists and plays them correctly, as it uses the metadata in the file to list the episode in the WMC7 interface.

As for TheTVDB.com processing, it searches the TheTVDB.com database for series names that "Starts With" the WTV file metadata series name. It will process all episodes of each found series until it matches on the episode name and original air date. For example, when it searches for "Castle", it finds "Castle", "Castle (2009), etc" from TVDB.com. It process all episodes of "Castle" and does not find a match, then it processes all episodes of "Castle (2009)" and finds the match based upon episode name and air date. If it can't find a match, then the .WTV file is not renamed (ie will not appear in the MP-TVSeries list) and you will need to manually rename it.

All of this assumes the following MP requirements:
1) MP-TVSeries installed.
2) MP configuration - add ".wtv" file extension to "Video File Extensions".

Also note that this will NOT work on Windows XP, as only WMC7 recognizes the .WTV format / extension. This might work for DVR-MS files on Vista, but I have not tested it as I don't have Vista installed anymore. It uses the DirectShow "StreamBufferRecordAttributes" interface to retrieve WTV metadata.

Cheers!
 

Attachments

  • Process Flow 1.jpg
    Process Flow 1.jpg
    68.5 KB
  • Plugin Configuration 1.jpg
    Plugin Configuration 1.jpg
    76.1 KB
  • Plugin Configuration 2.jpg
    Plugin Configuration 2.jpg
    30.7 KB
Last edited:

Dadeo

Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    thlucas

    You may have wondered why your listing for WTV Organizer did not yet appear in the Downloads listings. We were debating about it because normally we list only plugins that support the current stable version of MP, i.e. 1.1.x and you indicated it was only tested in 1.2.0.

    However, in the interest of supporting your development, and since you clearly indicated it is a Preview version, we added your listing, hopefully you will get more testers and results for 1.1.x as well.

    So download link is WTV Organizer.

    Thanks for contributing to MP!!! Now let's see how many WMC users you can woo! :p
     

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    Home Country
    United States of America United States of America
    Hi Dadeo,

    I also posted the plugin in the forum section, as I thought the main site Plugin submission process was not being monitored. Please note that the main site Plugin version (1.0.0.0) is already out of date, as the version in the forum thread (1.0.0.1) is newer. I will work on testing it with the MP 1.1.1 version, as well as adding the plugin compatibility check attributes for MP 1.2.0. On that note ...

    The "CompatibleVersion" attribute is confusing! Do I list the actual version information as it appears on the MediaPortal.exe? Or do I use the descriptive version? For example, in the docs it says the 1.2.0 Beta = 1.1.7.0 - which do I specify in the attribute value - "1.2.0" or "1.1.7.0"? What about for the 1.1.1 version? I'm thinking that it will probably be the AssemblyVersion (ie Product Version), but yo uknow what they say about assumptions. :) Anyway, it sounds like the developers need to publish a list of MP version constants that they want us to use, as well as keep them updated for future versions. The same goes for the "UsesSubsystem" attribute - not for sure what to put there.

    I also have a question about MSI vs MPE installers. I tried going with the MPE route originally, but ran into problems with another plugin that I wrote (Google Calendars) that uses the Google GData API. Catavolt informed me that it broke another plugin that he had, which uses a different version of the Google GData API. To get around this, I had to use an MSI installer to install the Google GData API into the Global Asembly Cache (GAC) which supports multiple versions of the same assembly name. The MPE installer does not have this capability, that I know of anyway. I guess my question is are we allowed to publish plugin installers in an MSI format in the main site Plugin submission? I currently have to ZIP up the MSI and add as an attachment to the forum posts to make it available.

    That's all I have for now. I appreciate your assistance, feedback, and any guidelines you can give to a fairly new MP plugin developer. Thanks!

    Todd
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    All good questions Todd and I will try to find out the answers! But I'll tell you what I know so far.
    The "CompatibleVersion" attribute is confusing! Do I list the actual version information as it appears on the MediaPortal.exe? Or do I use the descriptive version? For example, in the docs it says the 1.2.0 Beta = 1.1.7.0 - which do I specify in the attribute value - "1.2.0" or "1.1.7.0"? What about for the 1.1.1 version? I'm thinking that it will probably be the AssemblyVersion (ie Product Version), but yo uknow what they say about assumptions. :) Anyway, it sounds like the developers need to publish a list of MP version constants that they want us to use, as well as keep them updated for future versions. The same goes for the "UsesSubsystem" attribute - not for sure what to put there.
    You are correct and I have already raised this issue about SVN compatibility. You should use the official release number 1.2.0 - which of course is not an option in the listing yet. Originally we thought to only support extensions for stable releases so new users would not get confused. Usually the forums are used for test versions or extensions for test releases. So we did not really plan for test release. Of course, that raises the question why we even have SVN compatibility listed!

    Your question about sub systems is beyond my knowledge, but I will try to forward your question and see if I can get an answer for you.

    I also have a question about MSI vs MPE installers. I tried going with the MPE route originally, but ran into problems with another plugin that I wrote (Google Calendars) that uses the Google GData API. Catavolt informed me that it broke another plugin that he had, which uses a different version of the Google GData API. To get around this, I had to use an MSI installer to install the Google GData API into the Global Asembly Cache (GAC) which supports multiple versions of the same assembly name. The MPE installer does not have this capability, that I know of anyway. I guess my question is are we allowed to publish plugin installers in an MSI format in the main site Plugin submission? I currently have to ZIP up the MSI and add as an attachment to the forum posts to make it available.
    Yes you are allowed to post MSI installers. I will see if it can be supported without needing to zip the file. Of course we encourage MPEI so that users have a standard way to install all extensions. However, we are aware that development is required for MPEI, especially for MP 1.2.0. Your case is one good example and I have heard of a similar case with BrowseTheWeb and ScoreCenter plugins that install different versions of HtmlAgilityPack. There are some other limitations with MPEI we would like to fix as well, but it always boils down to the time developers are willing to donate, and of course the priorities - we have way too many! The good news is we usually get to everything at some point!

    The best way to get action is always to post bug reports OR post specific issues i.e. about MPEI in the Skins and Plugins Installer (MPEI) support forum. The goal is to get a team member to confirm the issue so they can add it to our Issue Tracker. That is the key to getting things to happen in MP!
     

    ap90033

    MP Donator
  • Premium Supporter
  • March 24, 2011
    198
    10
    Home Country
    United States of America United States of America
    Will this ever handle other file types other than wtv? It seems to do a beautiful job whereas the other filetypes (like avi, mpeg) dont seem to be handled the same way...
     

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    Home Country
    United States of America United States of America
    Will this ever handle other file types other than wtv? It seems to do a beautiful job whereas the other filetypes (like avi, mpeg) dont seem to be handled the same way...

    Sorry, but it was designed to process WTV file types only - there are currently no plans to handle other files types.
     

    ap90033

    MP Donator
  • Premium Supporter
  • March 24, 2011
    198
    10
    Home Country
    United States of America United States of America
    This is the best thing EVER! It works so well and SIMPLE. I dont suppose you could be talked into working on something that would replace the recording/tv guide part Media Center does so well and integrate it into MP? I know there are a zillion ways to get EPG/guides and record tv in MP. But none are easy and it seems around 99% of it is geared towards non usa users (no offense guys) and after hours of fighting with it I still cant get reliable TV and Recording with MP (compared to MCE which you run through setup and it just works). I think they have a great product just focused on other users which is fine. I would (as I can, I currently am out of work and do contract work) be happy to throw some money towards this effort and I think it would possibly make MP even More Popular here in the US. :)
    I just hate using two products to do basically the same thing watch my shows...

    If I ask PLEASE a lot would you think about it? PLEASE??? :)

    I would test and do whatever I could to help... :D
     

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    Home Country
    United States of America United States of America
    Thanks for the props, but I just don't have the time right now to devote to the TV Server development. I agree with you, in that the MP TV Server stability has a ways to go before it matches WMC, as well as the ease of setup and configuration. That is why I wrote this plugin in the first place, so I could have the best of both worlds. I love MP for watching recorded shows, and I love the stability of WMC for recording shows. Maybe I will find some time in the future, but just can't right now.
     

    ap90033

    MP Donator
  • Premium Supporter
  • March 24, 2011
    198
    10
    Home Country
    United States of America United States of America
    Help please? I am running this still but it doesnt seem to be working. For example Chase_WITNDT_2011_05_21_19_57_00.wtv has not been renamed and it has been sitting there for a couple of hours and i have the scan running every 16 minutes.... Any ideas? Thanks.
     

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    Home Country
    United States of America United States of America
    Help please? I am running this still but it doesnt seem to be working. For example Chase_WITNDT_2011_05_21_19_57_00.wtv has not been renamed and it has been sitting there for a couple of hours and i have the scan running every 16 minutes.... Any ideas? Thanks.

    Sorry for the reply delay - it's graduation season and I've been travelling.

    It looks like there are 2 series entries for "Chase" in the Online TV Database - An open directory of television shows for HTPC software search results:
    "Chase"
    "Chase (2010)"

    The process will scan both series, trying to match on date and episode name. If you look at the properties for the "Chase_WITNDT_2011_05_21_19_57_00.wtv" file in question, what does Windows 7 say the "Episode Name" and "Original Air Date" are? TheTVDB.com lists the episodes for 05/21 as:
    "Chase (2010)" - episode for 05/21 = "Annie".
    "Chase" - episode for 05/21 = nothing.

    Note that the process will not be able to rename files where the Episode Name or Original Air Date is not set correctly, or does not match what is specified in theTVDB.com database for the particular date of the recording.

    Hope it helps!
     

    Users who are viewing this thread

    Top Bottom