Indexing and flagging offline removable USB / ESATA / FIREWIRE harddrives in library?
#31
You beat me, I just registered
http://www.xbmc.org/trac/ticket/7266

I tried to explain myself in the ticket, please feel free to mark mine as duplicate and merge with the one you just opened.
Reply
#32
Please check:

Visual offline indicator status
Reply
#33
ronie Wrote:there's been several requests for 'offline' indication before.
most users seem to be wanting to see some kind of offline media flag (similar to the other media flags) for this.

the only way i can think of, from a skinning point of view, is to add an 'offline' tag to the filename (or foldername) for offline media:
e.g. /home/media/movies/Harry Potter.offline.avi
or e.g. /home/media/movies-offline/Harry Potter.avi

this way i can check the filename (and/or foldername) in the skin and display the flag accordingly.

btw, to avoid false positives, 'offline' might not be the best string to add and there has to be some kind of consensus between everyone what string to use, so it works for everyone.

I know this is an old post you made, but I've just come to the conclusion that I'd quite like offline flagging....

I'm curious if the way you handled CDArt (by having the user specify the root folder of Music), could offline flagging be implemented by path, or similar?

So... the end user needs to create a source to their offline media, scans it all to the library, then detaches it. They then set the skin 'offline root' to the same path... The skin then displays a flag if the paths match?

Of course when I say match, I really mean 'substring' exists... so the media.pathname contains 'offlineroot.path' name.

Doable?

Not suggesting you implement this in transparency, just curious because you (in my opinion) implemented the best way of dealing with CDArt... and suspect offline flagging MIGHT be achievable with a similar technique.
Reply
#34
good question....i don't actually know if you can do substring matching between two info labels.

i suppose this is what we're looking at:
substring(listitem.filenameandpath,$INFO[skin.string(offlineroot_path)])


hmmm...i don't think it'll work, but i'll test it tonight.


....nope, tested it, doesn't work.


edit:
moving this thread to XBMC Feature Suggestions
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#35
ronie Wrote:good question....i don't actually know if you can do substring matching between two info labels.

i suppose this is what we're looking at:
substring(listitem.filenameandpath,$INFO[skin.string(offlineroot_path)])


hmmm...i don't think it'll work, but i'll test it tonight.


....nope, tested it, doesn't work.


edit:
moving this thread to XBMC Feature Suggestions

hummm wonder why that didn't work... there's not some weird quotes or anything around one of the strings is there? I might have a play with this tomorrow too...


alternatively, this is cheesy (and I don't like it) but how about reverse logic... show 'online' media ;-)
ListItem.path + online.png, or even sexier... ListIem.path + "\..\online.png" which means you only need to put ONE online.png image at the root of your media and voila! e.g.

Movies\
--- online.png
--- Starwars
------ Starwars.avi
--- Superman
------ Superman.avi

If the file isn't there (e.g. offline) you don't see it!

if you wanted to show a flag for offline instead of online, you COULD have two image controls, the lowest one showing offline, which was overlayed with an 'online.png' for media that was online (effectively hiding the offline flag)... the downside to this is that the skin has to supply the correct 'overlay' image to use for online media (and tell the users to put that image at the root of their media)
Reply
#36
AnalogKid Wrote:hummm wonder why that didn't work... there's not some weird quotes or anything around one of the strings is there? I might have a play with this tomorrow too...

most likely it doesn't work because the second part of the equation needs to be the actual string and not some info label.

AnalogKid Wrote:alternatively, this is cheesy (and I don't like it) but how about reverse logic... show 'online' media ;-)
ListItem.path + online.png, or even sexier... ListIem.path + "\..\online.png" which means you only need to put ONE online.png image at the root of your media and voila! e.g.

Movies\
--- online.png
--- Starwars
------ Starwars.avi
--- Superman
------ Superman.avi

If the file isn't there (e.g. offline) you don't see it!

if you wanted to show a flag for offline instead of online, you COULD have two image controls, the lowest one showing offline, which was overlayed with an 'online.png' for media that was online (effectively hiding the offline flag)... the downside to this is that the skin has to supply the correct 'overlay' image to use for online media (and tell the users to put that image at the root of their media)

that's very very creative and i'm sure it would work, but i don't like it either ;-)

it would be much easier to tell people to have an 'offlinemedia' string in their path when they add movies to the library (as mentioned in my first reply).
that way, one could just use substring(listitem.path,offlinemedia) to check whether or not to display the offline flag.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#37
I'm wondering what's an offline flag good for. Even with it, you still won't know what source is that media from. Maybe it's good if you have few offline sources only, like 1 online and 1 offline. But if you have 1 online 10 offline (CD/DVD/USB drives) it won't help a bit.

Media flag with source name and online/offline status is on the other hand something which makes much more sense to me. Add a dialogue which actually requests that offline source instead of "This file is no longer available" and we may have a perfect offline sources solution. Just my 2c...
Reply
#38
ezechiel1917 Wrote:I'm wondering what's an offline flag good for. Even with it, you still won't know what source is that media from. Maybe it's good if you have few offline sources only, like 1 online and 1 offline. But if you have 1 online 10 offline (CD/DVD/USB drives) it won't help a bit.

i guess this doesn't have to be an issue if you properly name your folders when you scan them to the library, like this:

Movies-offlinemedia-DVD1\
--- Harry Potter
------ Harry Potter.avi
--- Indiana Jones
------ Indiana Jones.avi

Movies-offlinemedia-DVD2\
--- Starwars
------ Starwars.avi
--- Superman
------ Superman.avi

the name of the source will be available to the skin using listitem.path
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#39
ronie Wrote:i guess this doesn't have to be an issue if you properly name your folders when you scan them to the library, like this:

Movies-offlinemedia-DVD1\
--- Harry Potter
------ Harry Potter.avi
--- Indiana Jones
------ Indiana Jones.avi

Movies-offlinemedia-DVD2\
--- Starwars
------ Starwars.avi
--- Superman
------ Superman.avi

the name of the source will be available to the skin using listitem.path

I use something like that already, but it's more like workaround solution than proper xbmc feature Wink What I meant is, if someone would consider to implement offline media support it should be done with a quality check approach.
Reply
#40
ronie Wrote:most likely it doesn't work because the second part of the equation needs to be the actual string and not some info label.



that's very very creative and i'm sure it would work, but i don't like it either ;-)

it would be much easier to tell people to have an 'offlinemedia' string in their path when they add movies to the library (as mentioned in my first reply).
that way, one could just use substring(listitem.path,offlinemedia) to check whether or not to display the offline flag.

Ah, the reason for not being a fan of the 'offline' string in the media path is this...

For DVD archives, it's fine.... they truly are 'offline'.
But... for my style of 'offline'...I'm talking about them being on some potentially transient / removeable drive or server. So if the server is 'down'... I'd like to see it as 'offline'. For this reason, the 'offline' string is not appropriate because it's a permanent state in the XBMC db, rather than a transient state... it's just a much more dynamic situation.

Seems there are really two sort of offline... 1) Archived and 2) Not Accessible I'm really thinking of the 'not accessible' situation where the flag has to be shown dynamically.
Reply
#41
Truly we could say that there's a difference between:
  • Offline items
  • Offlineable items

(No, I don't know if "offlineable" it's a word). But as AnalogKid says DVDs added through dummy files will be always offline (unless ripped that's a different story). We have no valid solution right now to visually mark those files, hence the request.

The world of removable media though it's full of drives/shares with files than can vary from online/offline/online/etc.. status that's why the feature it's being trickier to implement since the discussion in the ticket I opened has evolved to cover these 2 'separate' worlds: The Always Offline vs The Undecided Status Cool
Reply
#42
ezechiel1917 Wrote:I use something like that already, but it's more like workaround solution than proper xbmc feature Wink What I meant is, if someone would consider to implement offline media support it should be done with a quality check approach.

i can only agree with that.

hope it's clear to everyone we're only discussing possible temporary workarounds here, until proper support gets implemented in xbmc.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#43
ronie Wrote:i can only agree with that.

hope it's clear to everyone we're only discussing possible temporary workarounds here, until proper support gets implemented in xbmc.

Absolutely, making a neat trick (or two) as tidy as possible.

I believe this would be relatively easy for XBMC if they could designate specific paths as 'local' (online), 'Archive' (permanently offline) or 'Server' (intermittently offline).

Any media on a local drive would be online, anything on a DVD drive / removable drive would be offline, and anything on a Server drive / SMB would be potentially offline. Having ListItem.isOffline as a boolean would be fine (I think).
The boolean returned would fast for Local and Archive material, but slower for SMB, since this would be determined at runtime either by checking for the existence of each and every media file, OR the presence of the root SMB share (quicker).



Alternatively a method to see if a file exists i.e. ListItem.mediafileavailable might also work (with the issue that it might be slower to check the media file is available).
Reply
#44
AnalogKid Wrote:Any media on a local drive would be online, anything on a DVD drive / removable drive would be offline, and anything on a Server drive / SMB would be potentially offline. Having ListItem.isOffline as a boolean would be fine (I think)..

DVD drive / USB drive media can also be online if it's currently present in system (correct disc already inserted) Status should be dynamically reflected by a check, but I don't like it, because it could wake up drives/network shares in sleep mode etc.

Exposing source types and names much make more sense on the other hand.

Movie1 - DVD - dvd_movies01
Movie2 - SMB - nas_share_xxx
Movie3 - HDD - movies
Movie4 - USB - movies_archive_01
Movie5 - HTTP - WebServer1
etc..

I know it looks more complicated, but if source type is exposed to skin, skinner can choose which source would be offline/online by himself or use source type+source name directly.
I don't think xbmc should decide itself what is online/offline either by some predefined rules which might not reflect current situation or by checking real status upon browsing because it could slow things down, unless implemented some smart method.
I still have no clue what's online/offline status good for, before you actually select something to play, so someone please tell me.
Reply
#45
That would be a great feature, and im looking for the same thing myself. I have like 30 disks with movies on and id really like it if it was possible to get a prompt for the disk with the media you click on.
I would love it. And I think it would be great to have the possibilty to just find the disk with the relevant movie or series or song on.
I see there hasnt been any development on this for a few months. Anyone out there that possibly could help a newbie get this to work?

larionlarion
Reply

Logout Mark Read Team Forum Stats Members Help
Indexing and flagging offline removable USB / ESATA / FIREWIRE harddrives in library?1