[solved] MP will not delete recordings that are on NAS (1 Viewer)

framug

Super Moderator
  • Team MediaPortal
  • January 31, 2005
    4,934
    919
    South of France
    Home Country
    France France
    Thanks again for the suggestions. I'll try updating MP when I get the chance and see if it's any better.
    MP 1.23 increased the timeout delay for NAS.
    Please, again and for last, try with latest MP version and, report with logs (as debug) if it doesn't work for you.
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    OK, MP 1.23 still won't delete those files.
    I'll make a new log later and upload it (may not be until tomorrow though).
    Does Watchdog not force the log mode to debug anymore? If not I'll switch it manually first.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    4,934
    919
    South of France
    Home Country
    France France
    Well, 1 second was clearly not enought for NAS in single-seat on the past.
    Today, timeout is 1.5 seconds but, in case of client/server, maybe 2 seconds are needed ?
    Don't know..
    We are not magicians (at least, not all the time) :)
    That's why sometimes, we need more accurate informations.
    It help us and you (and all others users), if our crystal ball want to help us to fix this problem. ;)
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    OK, had a chance to make a new log, with TV Server manually switched to debug this time. It does show the attempt to delete the file now - but I still can't tell why it's failing, so I'll have to pass it to the experts again :)

    Oh, @framug - if you weren't joking in your last post then I apologise if you think I'm expecting miracles from you - I know what it's like to be hassled by users (I'm a software developer in my day job) and certainly didn't intend that. I'm not much of an expert on Windows/Linux mixed networking though, and certainly don't know how MP TV Server works, so I'm grateful of any help I can get on here.
     

    Attachments

    • MediaPortalLogs_05_01_20__21_32.zip
      2 MB

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,577
    8,223
    Home Country
    New Zealand New Zealand
    CyberSimian is right. The TV service is responsible for deleting files. Therefore the Windows user running the TV service process must have appropriate permissions on the NAS. On this point...

    1. Rob, you said:
    Regarding users, the MP client and TV Server do run under different Windows users, but the user they're connecting to the NAS with is the same one (as in the user on the NAS, not in Windows), and this user has full rights to that directory.

    I don't understand what you're saying here. As far as I'm aware, TV Server does not have any explicit NAS credential configuration. It just attempts access with the current Windows user.

    2. If I recall correctly, updating MP (including TV Server) may blow away customisations in the Windows service properties for the TV service (startup properties, run user etc.). Since you've updated from MP 1.21, please make sure that the Windows service properties for the TV service - in particular: run as user - are still all as you expect.


    From the perspective of the log files...
    About all I can say is that the "DeleteRecordingOnDisk" log entries are not followed by any " - deleting '<file name>'" entries. To me this suggests that either the particular recording doesn't have an files (I'd be surprised if this is the case) or the Windows user running the TV service process cannot even list the files in the corresponding recording directory.

    Are you able to confirm whether the file "\\HEDGEHOGNAS\media\OldRecordings\Sound Waves_ The Symphony of Physics - BBC Four - 2017-03-05.ts" and/or its containing directory actually exists on the NAS?
    ...and what files - other than the TS file - associated with that recording (eg. thumbnail, XML metadata file) are present in that directory?

    Since you're a developer, here is the relevant code:
    https://github.com/MediaPortal/Medi...ce/DiskManagement/RecordingFileHandler.cs#L44
    https://github.com/MediaPortal/Medi...e/DiskManagement/RecordingFileHandler.cs#L118
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    Thanks @mm1352000 - the files definitely exist, and can be played from "Recordings". Is it just _deleting_ that is handled by TVServer, and the playback is done by Mediaportal? If so, then fiddling with the user on TVServer may help. I may be mixing up two different things here I think...
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,577
    8,223
    Home Country
    New Zealand New Zealand
    the files definitely exist, and can be played from "Recordings".
    Okay.

    Is it just _deleting_ that is handled by TVServer, and the playback is done by Mediaportal? If so, then fiddling with the user on TVServer may help. I may be mixing up two different things here I think...
    To directly answer your question: it depends. :)

    In your case I'm fairly sure the answer is "yes - only deleting is handled by TV Server". I say that because it appears like at some stage you've chosen to enable the use of UNC paths for recording playback instead of using RTSP:
    Advanced Options

    (from your MediaPortal client settings file)
    Code:
    <section name="tvservice">
      ...
      <entry name="usertsp">no</entry>
      ...

    Using UNC paths means that the MediaPortal client accesses and plays the recording files directly. Hence, the Windows user that you use to run the MediaPortal client must have at least read access to the files on the NAS.

    If you hadn't chosen to use UNC paths (ie. default behaviour = RTSP used for recording playback), the TV Server would stream the recording file from the NAS to MediaPortal [client]. In this case the Windows user used to run the TV service process would need at least read access to the files on the NAS.

    As I've previously indicated, for the TV Server always handles deleting. Therefore if you ever want to delete recordings, the Windows user used to run the TV service process will need write (or delete) access to the files on the NAS.

    Hope that's clear. :)
     

    RobNorthcott

    MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    Yes that makes sense, thanks (although I don't think I changed anything on purpose to do with the UNC/RTSP). But yes - I see what you mean about the user running TVService now. I tried just quickly changing the user for tvservice through services.msc to be the normal Windows user and that completely broke it (tvserver not able to run at all by the look of it) - but I'm short of time now, so I just put it back to default account and I'll have another look later when I can think about it more.

    As always, many thanks for the help :)
     

    Users who are viewing this thread

    Similar threads

    Well it's been a couple of days and we've had no more unable to play errors .
    Well it's been a couple of days and we've had no more unable to play errors .
    I've just upgraded the motherboard, CPU, ram, boot drives and PSU in my TV Server (always on), and am now having intermittent...
    Replies
    8
    Views
    1K
    Where hardcoded? Yes this code work when you watch movie and playTimePercentage < _watchedPercentage, And if playTimePercentage < _watchedPercentage we only update playTimePercentage in movie, and dont touch watched flag ... IMHO its work, and work fine ...
    Where hardcoded? Yes this code work when you watch movie and playTimePercentage < _watchedPercentage, And if playTimePercentage <...
    I believe that the design for VideoDatabaseV5 originated in the Kodi design for a similar database. Somewhere down the line the MP...
    Replies
    34
    Views
    766
    I have upgraded to MP2 from MP1 and all works except that when I record TV shows, they record fine on the NAS share but they don't show up in 'Recordings' unless I manually reimport. Also I cant delete watched recordings using MP2 - it doesn't give any errors, just doesn't delete the recording. Its strange because it seems all the...
    I have upgraded to MP2 from MP1 and all works except that when I record TV shows, they record fine on the NAS share but they don't...
    I have upgraded to MP2 from MP1 and all works except that when I record TV shows, they record fine on the NAS share but they don't...
    Replies
    0
    Views
    603
    Sorry logfiles might help...
    Sorry logfiles might help...
    From a beginner seeking further help. OK so my tv recordings go into default location and appear on the TV menu. Also if I copy wtv...
    Replies
    16
    Views
    2K
    Ok, the importer also remembers the queue of items that are still needed to be processed in settings file. If there is something stuck, it will try again on next server start and probably stuck again. But removing the media source also removes the associated queue. The server's TV plugin automatically creates the media sources for...
    Ok, the importer also remembers the queue of items that are still needed to be processed in settings file. If there is something...
    Hi, I’ve been struggling with MP 2 now for several weeks. Initially all was fine. Then in the client, the listings of recorded TV...
    Replies
    8
    Views
    911
    Top Bottom