Jump to content


Photo

Native path smb:// prefix too fragile with erroneous slashes

Kodi SMB

  • This topic is locked This topic is locked
7 replies to this topic

#1 zenwryly OFFLINE  

zenwryly

    Member

  • Members
  • 22 posts

Posted 23 February 2018 - 08:31 PM

If you use "Native (Direct Paths)" in the Emby for Kodi add-on and the library's "Shared network folder" on the Ember server side has erroneous slashes in it, the add-on silently doesn't add the "smb://" prefix leading to unhelpful errors that don't help lead the user to fixing their error.  I wonder if it might be possible to either validate the "Shared network folder" setting warning for duplicate slashes or mixed forward and backward slashes on the Emby server side and/or make the logic for when to prepend "smb://" less picky on the Kodi add-on side, such as just doing it for every path that starts with "\\".

 

In my case, I mistakenly entered a single forward slash later in the "Shared network folder" windows network path, e.g.: "\\server\share\foo/bar".  Without anything pointing out the mix of slashes, it took me forever to finally notice them after many failed debugging sessions, especially since cutting and pasting the paths into Windows Explorer worked just fine. In another user's case, they mistakenly entered a trailing back slash in the "Shared network folder" resulting in a double back slash for the full path: https://emby.media/c...hs/#entry448373

 

Emby Server 3.2.70.0

Kodi 17.6

Emby for Kodi add-on 3.0.11a

 

I apologize for the lack of a debug log file.  All previous instances of the error messages have already been overwritten since I fixed the "Shared network folder" and done a "Repair local database (force update all content)" and my libraries are too large to do that twice as I'd have to do to reproduce the issue.



#2 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12580 posts
  • Local time: 12:31 PM

Posted 23 February 2018 - 08:39 PM

The add-on defaults to smb:// if the path starts with "\\"path\to\file.

 

If your path starts with only one slash, local linux path start that way and so the add-on can't default to smb://.

 

What you are talking about is not possible without breaking paths for other os. The add-on should warn you before syncing, because it validates one of your file paths. Did you not get such a warning: {File path} was not found. Stop syncing?

Let me know.


Edited by Angelblue05, 23 February 2018 - 11:23 PM.


#3 zenwryly OFFLINE  

zenwryly

    Member

  • Members
  • 22 posts

Posted 24 February 2018 - 03:43 PM

The add-on defaults to smb:// if the path starts with "\\"path\to\file.

 

Apparently that's not current logic the add-on uses.  Tthe add-on didn't prepend "smb://" as I described above:

 

>> In my case, I mistakenly entered a single forward slash later in the "Shared network folder" windows network path, e.g.: "\\server\share\foo/bar"

 

Regarding:

 

If your path starts with only one slash, local linux path start that way and so the add-on can't default to smb://.

 

FYI, I'm running everything on Linux.  At any rate, those paths start with a *forward* slash, and only *one*.  What OS'es or environments, aside from Windows network paths, start with *back* slashes and exactly *two*?

 

Regarding:

 

Did you not get such a warning: {File path} was not found. Stop syncing?

 

Yes, as well as similarly unhelpful errors in the log.  This issue I'm reporting is not that there weren't errors, it's that the errors weren't helpful in finding the user error.  Hence the suggestion that a validation warning be given in the library "Shared network folder" field for common errors such as mixed forward and backward slashes or double slashes anywhere but the beginning.



#4 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12580 posts
  • Local time: 12:31 PM

Posted 24 February 2018 - 10:50 PM

I've not seen anyone with this issue... I've rebuilt my library two days ago and it used smb just fine. The forward slash would not cause this, there is already a logic implemented in the add-on, that if the path itself contains backslashes, it will substitute those forward slashes for backslashes. smb:// depends on if the path in emby starts with \\, so I'm not sure why it wasn't working. Having a Kodi log would be helpful to troubleshoot https://emby.media/c...port-a-problem/

 

The shared network folder from the server library settings? You can post server requests here: https://emby.media/c...ature-requests/


Edited by Angelblue05, 24 February 2018 - 10:52 PM.


#5 zenwryly OFFLINE  

zenwryly

    Member

  • Members
  • 22 posts

Posted 25 February 2018 - 10:38 AM

> I've not seen anyone with this issue

 

You have now.

 

Having a Kodi log would be helpful

 

See my OP regarding the log.

 

The shared network folder from the server library settings?

 

Yes, as per my OP.



#6 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12580 posts
  • Local time: 12:31 PM

Posted 25 February 2018 - 03:21 PM

What I meant is without a log, it is impossible to validate what you said and fix the issue you faced, because I'm not able to replicate this on my side. I understand that you don't have the Kodi log, but as I stated, the forward slash would have been self corrected by the add-on. Something else must have played a role too.

This is a free project that was put together by a few Emby users. Emby for Kodi is not an official emby app. You are free to use any alternative. I don't need to put up with your attitude, when I'm just trying to help.

I don't work for Emby, I pointed you to the FR forums so you can post to have the shared network field validated, I think it is a good idea. I just don't know what more I could do add-on side, beyond changing the warning message that the file is not found, with the path displayed.


Sent from my iPhone using Tapatalk

#7 zenwryly OFFLINE  

zenwryly

    Member

  • Members
  • 22 posts

Posted 25 February 2018 - 06:03 PM

I am a long time core contributor to open source projects.  I never volunteered you for a "job".  It was unclear when you mentioned the log that you had digested that part of my OP.  Ditto for "Shared network folder".  Interesting that you feel I was giving attitude.

 

Regardless, if you want to reply with a knee-jerk "WONTFIX", that's fine.  No need to try and rationalize it as something else with token responses.  I'll consider your last reply as closing this as "WONTFIX".

 

Thank you for your contributions.



#8 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12580 posts
  • Local time: 12:31 PM

Posted 25 February 2018 - 06:39 PM

Sorry if I mistook your attitude. I never said that I won't fix. What I said is there really is nothing that could be fixed in the add-on beyond what is already in place.

I would like very much to fix the issue you had about the smb:// not being substituted. But if your path started with two backslash, even with the forward slash in the middle of the path, then something else was not behaving correctly beyond a simple replace function. But since you can't provide your log and I can't replicate it... and here we are.


Sent from my iPhone using Tapatalk


Edited by Angelblue05, 25 February 2018 - 06:57 PM.






Also tagged with one or more of these keywords: Kodi, SMB

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users