Move TV Films: Move WMC recorded films to another folder

mrsilver

Posts: 63
Joined: Mon Oct 20, 2014 5:01 pm
Location:

HTPC Specs: Show details

Move TV Films: Move WMC recorded films to another folder

#1

Post by mrsilver » Sat Nov 15, 2014 4:49 pm

This program (for Microsoft Windows) will move all Windows Media Center recordings that are films into a different folder. This is useful if you wish to stop your "Recorded TV" folder from containing a mixture of films and TV and also if you view and/or manage these films in a third party application (such as Media Browser, XBMC or Plex).

As an example, if you recorded Double Jeopardy on Film4 then this program can rename the file from Double_Jeopardy_Film4_2014_10_21_20_58_00.wtv to Double Jeopardy (1999)\Double Jeopardy (1999).wtv and move this to a directory of your choice.

This program was inspired by MoveRecordedTVMovies (by Andy Boura) and was originally written when the program was unavailable to download for a period of time. It also adds a number of useful additional pieces of functionality, plus the Visual Basic .NET source code is available for people who want to make further modifications.

More information and download: http://www.fourteenminutes.com/code/move_tv_films/

If you have any questions, comments or bug reports, please use this thread to report them.

User avatar
mmatheny

Posts: 134
Joined: Wed Jun 15, 2011 4:05 pm
Location:

HTPC Specs: Show details

#2

Post by mmatheny » Wed Jan 21, 2015 8:17 pm

OK - I tried this program and it dropped metadata for 80% of the movies it moved. What went wrong??
Mike

bob_p

Posts: 268
Joined: Fri Jul 08, 2011 4:47 pm
Location:

HTPC Specs: Show details

#3

Post by bob_p » Thu Jan 22, 2015 2:11 pm

When I manually copy the files from Recorded TV to a separate folder I created for Recorded Movies, the meta data isn't displayed and RESUME always starts back at the beginning of the recording (running WMC 8.1).

User avatar
CyberSimian

Posts: 516
Joined: Mon Jun 20, 2011 5:52 pm
Location: Southampton, UK

HTPC Specs: Show details

#4

Post by CyberSimian » Thu Jan 22, 2015 3:57 pm

bob_p wrote:When I manually copy the files from Recorded TV to a separate folder I created for Recorded Movies, the meta data isn't displayed
I am still using Vista, but I also move recorded TV files to folders residing in the "Video" section. The metadata is still available. Move the focus to the thumbnail for the file you want to see, and press the INFO button instead of the OK button. From the info popup you can select the detailed programme information (metadata). I would assume that WMC 8.1 is the same.
bob_p wrote:RESUME always starts back at the beginning of the recording
A long-standing limitation in WMC (Vista is the same).

-- from CyberSimian in the UK

User avatar
mmatheny

Posts: 134
Joined: Wed Jun 15, 2011 4:05 pm
Location:

HTPC Specs: Show details

#5

Post by mmatheny » Sat Jan 24, 2015 6:33 pm

No go - there is NO metadata for many of the moved movies. Can I move them back to the Recorded TV folder and get my metadata back?
Mike

User avatar
mmatheny

Posts: 134
Joined: Wed Jun 15, 2011 4:05 pm
Location:

HTPC Specs: Show details

#6

Post by mmatheny » Sat Jan 24, 2015 6:37 pm

Answer is YES - if I move the move back to Recorded TV the metadata is back!
Mike

User avatar
Crash2009

Posts: 4357
Joined: Thu May 17, 2012 12:38 am
Location: Ann Arbor, Michigan

HTPC Specs: Show details

#7

Post by Crash2009 » Sat Jan 24, 2015 7:49 pm

mmatheny wrote:Answer is YES - if I move the move back to Recorded TV the metadata is back!
The RecordedTV folder is kind of a magical folder, in the sense, that it is all ready tied to your Metadata Scraper (likely YAMM). This is why your metadata dis-appears when the file is moved to a different folder. To get the metadata to show again when the movie file is in the new folder, all you have to do, is open up WMC go to tasks/media libraries/movies/next/add folders/on this computer/navigate to the hard drive that contains your new movie folder/and put a checkmark beside it. After this is done your movies should magically start appearing in WMC Movies like this.
Attachments
MediaLibtaryMovies002.jpg
MediaLibtaryMovies.jpg

mrsilver

Posts: 63
Joined: Mon Oct 20, 2014 5:01 pm
Location:

HTPC Specs: Show details

#8

Post by mrsilver » Thu Jan 29, 2015 8:01 pm

Apologies for the delayed response.

I'm busy prepping a new version which fixes a couple of bugs, added two new features and also has some instructions on how to use YAMMM to get movie meta-data to be shown within the "movie library" in WMC.

(To be honest, I still recommend using Media Browser over WMC's own movie library)

User avatar
Crash2009

Posts: 4357
Joined: Thu May 17, 2012 12:38 am
Location: Ann Arbor, Michigan

HTPC Specs: Show details

#9

Post by Crash2009 » Fri Jan 30, 2015 3:56 am

mrsilver wrote:(To be honest, I still recommend using Media Browser over WMC's own movie library)
I think YAMMM came with my Ceton tuner install.

Either way, you have to add the media folder to the library, otherwise Metadata Services won't know where to look.

There are 3 pieces to my puzzle, I use:

WMC to manage the tuners and the DRM.
WMC Server as a bond between WMC and MB3.
MB3 to stream my non-DRM to LAN, WAN, and all my oddball devices.
Attachments
ServerWMC.JPG
MB3MetaArt.jpg
MB3MediaLocations2.jpg

ruff_hi

Posts: 79
Joined: Sun Nov 02, 2014 6:24 pm
Location:

HTPC Specs: Show details

#10

Post by ruff_hi » Fri Jan 30, 2015 5:41 pm

excellent. someone already ported this to vb .net. I'm going to grab a copy of the code as I would like an option to drop the '(1999)' elements in the folder / movie name.

mrsilver

Posts: 63
Joined: Mon Oct 20, 2014 5:01 pm
Location:

HTPC Specs: Show details

#11

Post by mrsilver » Sat Jan 31, 2015 11:26 am

ruff_hi wrote:excellent. someone already ported this to vb .net. I'm going to grab a copy of the code as I would like an option to drop the '(1999)' elements in the folder / movie name.
To be honest I wouldn't really recommend doing this because it means that you won't be able to differentiate between two films of the same name released in different years - such as the pretty good 1990 film Total Recall and the no-so good 2012 remake with Colin Farrell.

Having said that, it is pretty easy to do so. The key function is called Get_Year which attempts to extract the year from the string provided to it - which can be either the Year meta-data field, the OriginalReleaseTime meta-data field or (as a last resort) the sub-title.

There are plenty of clean (and dirty ways) to do this but the easiest one is to always make Get_Year return -1. It'll still be called three times and spam the logs when you use verbose mode (which is why it isn't the cleanest solution) but requires the least amount of modifications.

In Module1.vb look for the following:

Code: Select all

    ' Get_Year
    ' Given a string, see if a four digit year can be extracted from it. If it cannot
    ' then -1 is returned.

    Function Get_Year(text As String) As Integer

        Get_Year = -1
        If text = "" Then Exit Function
and change it to:

Code: Select all

    ' Get_Year
    ' Given a string, see if a four digit year can be extracted from it. If it cannot
    ' then -1 is returned.

    Function Get_Year(text As String) As Integer

        Get_Year = -1
        Exit Function  ' Always return no year found
        If text = "" Then Exit Function
If there is enough demand for it, I can add a /NY flag into the code to do this from the command line.

User avatar
Crash2009

Posts: 4357
Joined: Thu May 17, 2012 12:38 am
Location: Ann Arbor, Michigan

HTPC Specs: Show details

#12

Post by Crash2009 » Sat Jan 31, 2015 3:18 pm

mrsilver wrote:
ruff_hi wrote:excellent. someone already ported this to vb .net. I'm going to grab a copy of the code as I would like an option to drop the '(1999)' elements in the folder / movie name.
To be honest I wouldn't really recommend doing this because it means that you won't be able to differentiate between two films of the same name released in different years - such as the pretty good 1990 film Total Recall and the no-so good 2012 remake with Colin Farrell.
I agree. WMC doesn't need any help organizing by year.
Attachments
WMCmoviesByYear.jpg

mrsilver

Posts: 63
Joined: Mon Oct 20, 2014 5:01 pm
Location:

HTPC Specs: Show details

#13

Post by mrsilver » Mon Feb 02, 2015 7:48 pm

Move TV Films 1.1 released

Changes in this release:
  • Added /ND option to prevent a directory for the film being created.
  • Added /NR option to prevent the recorded programme being renamed.
  • Fixed a bug which meant that a recording that already existed was being incorrectly overwritten.
  • Fixed a bug which meant that log files over 7 days old weren't being deleted.
  • Updated copyright dates.
  • Changed all references of "folder" to "directory" for consistency.
  • Updated instructions to explain how to show movies in "movie library" within Windows Media Center.
More information and download: http://www.fourteenminutes.com/code/move_tv_films/

If you have any questions, comments, feature requests or bug reports, please use this thread to report them.

ruff_hi

Posts: 79
Joined: Sun Nov 02, 2014 6:24 pm
Location:

HTPC Specs: Show details

#14

Post by ruff_hi » Tue Feb 03, 2015 3:02 pm

mrsilver wrote:If there is enough demand for [an option to drop the year], I can add a /NY flag into the code to do this from the command line.
That is where I was planning to head ... include a command line that drops the year and make modifications to the code to also skip the 'no year warnings'. I'd be happy to make the changes and send you a change log.

mrsilver

Posts: 63
Joined: Mon Oct 20, 2014 5:01 pm
Location:

HTPC Specs: Show details

#15

Post by mrsilver » Sun Feb 15, 2015 6:54 pm

Hi everyone,

I have a new version (1.2) ready to release which adds a /NY option for those people who don't want the year in the directory and/or filename.

If anyone has any further requests or bug reports can they please let me know so I can address them before I release this?

Thanks!

ruff_hi

Posts: 79
Joined: Sun Nov 02, 2014 6:24 pm
Location:

HTPC Specs: Show details

#16

Post by ruff_hi » Thu Jul 23, 2015 11:53 am

I am finally cycling (or looking to cycle) back to this. I have a NAS set up, ethernet home network, one extender (ceton) that seems to get moved around between the TVs ... but ... so far, all of my content is on my office PC.

Is the .net source code available for this as I would like to make mods to move all of my recorded shows, not just movies, to specific directories, etc.

mrsilver

Posts: 63
Joined: Mon Oct 20, 2014 5:01 pm
Location:

HTPC Specs: Show details

#17

Post by mrsilver » Sat Jul 25, 2015 2:15 pm

ruff_hi wrote:I am finally cycling (or looking to cycle) back to this. I have a NAS set up, ethernet home network, one extender (ceton) that seems to get moved around between the TVs ... but ... so far, all of my content is on my office PC.

Is the .net source code available for this as I would like to make mods to move all of my recorded shows, not just movies, to specific directories, etc.
Yes, full source code is available from the website. I don't include it in the main download because the majority of people probably aren't interested in it.

(Sorry for the delayed response, I never got an email from the board telling me that there were new postings.)

ruff_hi

Posts: 79
Joined: Sun Nov 02, 2014 6:24 pm
Location:

HTPC Specs: Show details

#18

Post by ruff_hi » Tue Jul 28, 2015 9:24 pm

I was thinking of moving this to a windows version that did all of what it currently does but includes ...
- writes set up info to an xml file
- opens a config screen when executed with the shift key depressed
- uses a default config.xml file unless a config xml file is provided as part of the command line

Thoughts?

mrsilver

Posts: 63
Joined: Mon Oct 20, 2014 5:01 pm
Location:

HTPC Specs: Show details

#19

Post by mrsilver » Sat Aug 01, 2015 11:49 am

ruff_hi wrote:I was thinking of moving this to a windows version that did all of what it currently does but includes ...
- writes set up info to an xml file
- opens a config screen when executed with the shift key depressed
- uses a default config.xml file unless a config xml file is provided as part of the command line

Thoughts?
Could be interesting!

I didn't create a GUI simply because I'm comfortable with using the command line, but there may be others out there who would prefer something a little more point and click.

ruff_hi

Posts: 79
Joined: Sun Nov 02, 2014 6:24 pm
Location:

HTPC Specs: Show details

#20

Post by ruff_hi » Sun Oct 11, 2015 10:15 pm

I finally got some time to look at this only to find that my version of Visual Studio is an older version of yours ... and I can't open the solution. I guess I will have to C&P from the underlying files.

Post Reply