Simple redirection utility needed (1 Viewer)

jimekus

Portal Member
July 13, 2012
23
3
73
Home Country
New Zealand New Zealand
Hi,

I'm investigating how to get a failover command developed. Such as :

FAILOVER <\\server\sharedfolders\SD02 | local HDD j:\SD02> TO <local HDD j:\SD02 | \\server\sharedfolders\SD02|>

My local need on different PCs doesn't have to have high availability and I don't mind knowing I have to run a batch file to trip a redirection on/off switch. Remember I can't use drive addresses to work around my large number of \\Ryzen lan folders.

The actual problem I'm encountering is not knowing what to call this lack of an obvious use-case for a missing Lan folder redirection facility. It is the only thing stopping me using MediaPortal to play local files when the \\Ryzen tower backup is hibernated. Now I only use MediaPortal locally as a reference database and the offline files are shown in red or getting subtitles, trailers and stuff. The fact that MediaPortal catalogs my large backup PC and not my download PC is an evolutionary design, but it means one database spread among many machines, so each can quickly know what's online or offline.

My Mediaportal 1.27, specifically MovingPictures uses addresses like \\Ryzen\SD02, and if Ryzen is hibernated I want all calls to \\Ryzen\SD02 to be transparently switched to the physical J:\SD02, but because there is no synced J:\HD02 it still reports \\Ryzen\HD02 as disconnected and thus the colored names only show what is connected when Ryzen is offline. In other words Ryzen holds all current bidirectional backup that spreads out among many machines, but also orphaned files, such as in HD02, which hopefully has an offline or offsite backup.

I investigated DFS-N and still want a simpler standalone custom commandline. Alternatively how do I go about asking for an open source MovingPictures option to look at a local read only redirection list. I'm not in the least incovenienced by not yet having a failover command as using local shortcuts provides another source to maintaining my "already watched" list with reasonable accuracy.

Jim
 
Last edited:

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,421
    1,887
    I use basic drive to network mapping with T: for TV-Shows and S: for movies, and I run everything in a basic script before MediaPortal is allowed to execute, so that I know it points to the right Samba share and not show the media in orange color as "offline".

    Code:
    @Echo Off
    :NoNetwork
        ping [IP-of-Server-with-Samba-Share] -n 1 -w 30000
        IF NOT EXIST "T:\status.txt" NET USE S: /DELETE
        IF NOT EXIST "T:\status.txt" NET USE S: "\\Samba-Share\Movies" /PERSISTENT:YES
        IF NOT EXIST "T:\status.txt" NET USE T: /DELETE
        IF NOT EXIST "T:\status.txt" NET USE T: "\\Samba-Share\TV Shows" /PERSISTENT:YES
        IF NOT EXIST "T:\status.txt" ping 1.1.1.1 -n 1 -w 5000
        IF NOT EXIST "T:\status.txt" Goto NoNetwork
    pause

    That would be easy to modify to map another Samba share, or a local drive, but the problem on a local drive is that Moving-Pictures will use the HDD volume serial number to detect drive/folder removal and quick changes, so be sure to configure it proper. NTFS folder mapping is an easy solution around that, but then of course you have to keep the folders in sync or media entries will be auto-added, and auto-removed from your database.

    PS: The T:\ and S:\ drives are what Moving-Pictures is configured on to import from. It's easy to change that on an existing setup with some SQLite database editing, or to do an import swap, or in worst case just do a fresh reimport.
     

    jimekus

    Portal Member
    July 13, 2012
    23
    3
    73
    Home Country
    New Zealand New Zealand
    It's definitely worth a look at your solution, thanks. And yes I too thought there might be some HDD volume serial number issue. I know there is MediaPortal 2, but with a quick clone of ProgramData to many PCs my MP1 catalog is easily updated.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,421
    1,887
    Yup, and the reason why mine does the 30sec ping-wait (it's instant if it responds) to my Samba share server is indeed to ensure it is awake/up/available, because for me there is no point in continuing with MediaPortal if it's offline under normal conditions, and can use a different shortcut to launch MediaPortal if needing to bypass.

    And if you have a mixture of shares/drives with different content then Moving-Pictures and MP-TVSeries will simply flag the media in 'orange' to show the offline status. The key is to ensure that both plugins don't think you deleted the media and thereby updating themselves to remove their respective database entries.

    Now MP-TVSeries is easy, because you can use map Samba shares locally. I use "\\HTPC\F$\TV Shows" for example to link to a local harddisk, but MovPic will detect that this is a local drive with volume serial number and overwrite the share. To fix that you have to use NTFS folder mapping or symbolic links.
     

    jimekus

    Portal Member
    July 13, 2012
    23
    3
    73
    Home Country
    New Zealand New Zealand
    ....

    Now MP-TVSeries is easy, because you can use map Samba shares locally. I use "\\HTPC\F$\TV Shows" for example to link to a local harddisk, but MovPic will detect that this is a local drive with volume serial number and overwrite the share. To fix that you have to use NTFS folder mapping or symbolic links.
    --
    So are you saying I should be right using a folder mapping of my local hard drive like \\Ryzen5\j\SD02 instead of j:\SD02
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,421
    1,887
    For MP-TVSeries that will work.
    MovPic is smarter, and will auto convert \\Ryzen5\$J\SD02 to J:\SD02, but then NTFS folder mapping or symbolic links can come to your rescue.
     

    jimekus

    Portal Member
    July 13, 2012
    23
    3
    73
    Home Country
    New Zealand New Zealand
    Got into Disk Management to Change Drive Letter and Path for J: but found the "Mount in the following empty NTFS folder" & "Browse" are both grayed out. Diskpart using an Admin CMD allowed me to Select Volume and Assign it to an empty NTFS folder. You've been a great help.
     

    Users who are viewing this thread

    Similar threads

    Good work guys!
    Good work guys!
    We are proud to present MediaPortal 2.2.1 After the release of MediaPortal 2.2 Final the team focussed on improving usability and...
    Replies
    1
    Views
    3K
    Hi everyone, I found a problem with MP 1.9.0 which apparently is still around with 1.13.0 and wanted to let you know about my findings. I have a DVB-S setup (Hauppauge Win-TV 5500 HVR) and the previous scan revealed a lot of TV and radio stations. The scanner appears to add the radio stations first into the channels table so they get...
    Hi everyone, I found a problem with MP 1.9.0 which apparently is still around with 1.13.0 and wanted to let you know about my...
    Hi everyone, I found a problem with MP 1.9.0 which apparently is still around with 1.13.0 and wanted to let you know about my...
    Replies
    0
    Views
    1K
    • Sticky
    Thanks for this RoChess, I've attached logs after the ****************** when I used "Refresh from IMDB+" (log1) and when I sent it back to the importer (log2).
    Thanks for this RoChess, I've attached logs after the ****************** when I used "Refresh from IMDB+" (log1) and when I sent it...
    The IMDb+ scraper-script and plugin combination for Moving-Pictures is the first scraper to support custom options, allowing you to...
    Replies
    180
    Views
    25K
    DC12V is the correct power. The LC8808 is a 3-channel constant current LED drive with resumable data transfers and internal display patterns. There are three open-drain constant current outputs, with a build-in PWM of gray scale. The range of input power is from +9V to +15V, and voltage-endurance of LED port is +12V. There is a...
    DC12V is the correct power. The LC8808 is a 3-channel constant current LED drive with resumable data transfers and internal...
    Introduction Over time there have been many Windows alternatives to Atmowin and under Linux there is Bobilight however there is...
    Replies
    352
    Views
    190K
    • Locked
    This doesn't appear to support Argus TV 2.1. My recorded tv page is empty when StreamedMP is the active theme, yet properly populated when Titan is the active theme.
    This doesn't appear to support Argus TV 2.1. My recorded tv page is empty when StreamedMP is the active theme, yet properly...
    StreamedMP for MediaPortal v1.3 is now ready. This release is considered stable, thanks to all those who have helped improve the...
    Replies
    17
    Views
    7K
    Top Bottom