I have to move the folder with all tv series files (1 Viewer)

LennyW

Portal Pro
July 19, 2012
207
11
52
Home Country
Germany Germany
Hi!
I have to move my TV-series files to another network share. Is there an option to "tell" MP-TVseries that the files are now in \\server2\series instead of \\server1\video\series. I had to add some of the series manually and would like to keep them in the database.

Best regards
LennyW
 

HomeY

Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    You should be good by adding the new share to import settings, then move all your files, and (if you like) you can remove the old share afterwards. Database should automatically update the file locations. But just to be sure i would make a backup of your TVSeries database, which can be found in C:\ProgramData\Team MediaPortal\MediaPortal\database\
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    Or you could run SQL query (if you know what is it) which will rewrite all paths in db.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    The SQL commands are:

    UPDATE ImportPathes SET Path = REPLACE(Path, '\\server1\video\', '\\server2\');​

    and:

    UPDATE local_episodes SET EpisodeFilename = REPLACE(EpisodeFilename, '\\server1\video\', '\\server2\');​

    So be sure to shut MediaPortal down, make a backup of "TVSeriesDatabase4.db3" (just incase), move all the files and then use any SQLite tool to run the above SQL queries on your MP-TVSeries database.
     

    LennyW

    Portal Pro
    July 19, 2012
    207
    11
    52
    Home Country
    Germany Germany
    Thank you all!
    It seems that the way HomeY has suggested is working without issues. In this case I do not have to mess with the database. I guess it is safer this way with my VERY limited SQL knowledge.

    Best regards
    LennyW
     

    4Fred

    MP Donator
  • Premium Supporter
  • December 8, 2005
    370
    54
    50
    Jönköping
    Home Country
    Sweden Sweden
    Maybe a more detailed instruction how to do this? Maybe even in wiki?
    I'm pretty sure more people will be needing this at some point.
     

    scythe000

    Portal Pro
    July 6, 2008
    379
    15
    The SQL commands are:

    UPDATE ImportPathes SET Path = REPLACE(Path, '\\server1\video\', '\\server2\');​

    and:

    UPDATE local_episodes SET EpisodeFilename = REPLACE(EpisodeFilename, '\\server1\video\', '\\server2\');​

    So be sure to shut MediaPortal down, make a backup of "TVSeriesDatabase4.db3" (just incase), move all the files and then use any SQLite tool to run the above SQL queries on your MP-TVSeries database.
    Code:
    UPDATE ImportPathes SET Path = REPLACE(Path, 'Z:\TV Series\', '\\vault\e\TV Series\');
    UPDATE local_episodes SET EpisodeFilename = REPLACE(EpisodeFilename, Z:\TV Series\', '\\vault\e\TV Series\');
    Not working for me. The first line runs fine by itself, but the second line just runs forever. i tried narrowing it down to just one show, and it still hangs.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Code:
    UPDATE ImportPathes SET Path = REPLACE(Path, 'Z:\TV Series\', '\\vault\e\TV Series\');
    UPDATE local_episodes SET EpisodeFilename = REPLACE(EpisodeFilename, Z:\TV Series\', '\\vault\e\TV Series\');
    Not working for me. The first line runs fine by itself, but the second line just runs forever. i tried narrowing it down to just one show, and it still hangs.

    You typo-ed on the quoting of 'Z: without that important quote SQL will freak out (as it does)
     

    Users who are viewing this thread

    Top Bottom