Import watched data from myTV (1 Viewer)

Neff

Portal Member
February 22, 2011
19
4
Home Country
United Kingdom United Kingdom
I'm slowly moving to MediaPortal from using SenseIt's MyTV WMC plugin and I'm just wondering if there is anyway of exporting the watched show data from that application and using it to set the watched flags in My TVSeries?

MyTV uses a SQL-Server database and I'm comfortable enough with that to be able to extract data myself but is there a way I can use that data to set watch flags in My TV Series?
 

Neff

Portal Member
February 22, 2011
19
4
Home Country
United Kingdom United Kingdom
I've worked out how to do it.

In the configuration program for the TV Series plugin, on the General tab there is an option to import or export watched data, from exporting the data and looking at the file I managed to work out it was of the form <TVDBseriesId>_<seasonNum>x<EpisodeNum>.

So in the old MyTV database use the following query:

SELECT
CAST(SER.TvDBid AS VARCHAR(20))+'_'+CAST(SEA.season AS VARCHAR(2))+'x'+ CAST(EPS.EpisodeNumber AS VARCHAR(2))
FROM
myTV.dbo.tvepisodes EPS
LEFT OUTER JOIN
myTV.dbo.tvseasons SEA
ON
SEA.id = EPS.seasonid
LEFT OUTER JOIN
myTV.dbo.tvseries SER
ON
SER.id = EPS.seriesid
WHERE
EPS.lastViewed IS NOT NULL
ORDER BY
SER.SeriesName,
SEA.season,
EPS.EpisodeNumber


Save the result as a text file with the extension watched (e.g. mytv.watched) then just import it from the genral tab in the configuration program.
 

Users who are viewing this thread

Top Bottom