| Drag + Drop in gen2 3.072 | |
|
|
Author | Message |
---|
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Drag + Drop in gen2 3.072 Fri Jul 31, 2009 1:03 am | |
| Hi,
I tried dropping movies and folders onto the list box but as far as I can see that did nothing, am I missing something? I monitored the folder for .nfo etc to appear so wasn't just looking via the UI.
If I drop a folder I assume it will scan that whole subtree?
Thanks, Dennis | |
|
| |
StormyKnight VIP
Posts : 556 Join date : 2008-10-08 Location : Australia
| Subject: Re: Drag + Drop in gen2 3.072 Fri Jul 31, 2009 6:18 am | |
| I was able to get this to work, but I think that the folder inwhich the movie is in must be one already defined in the preferences....
Folders are not yet supported for drag & drop. | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Fri Jul 31, 2009 10:11 am | |
| - StormyKnight wrote:
- I was able to get this to work, but I think that the folder inwhich the movie is in must be one already defined in the preferences....
That could have been the issue, not sure now, will try again next time - StormyKnight wrote:
- Folders are not yet supported for drag & drop.
Oh well :-( Thanks, Dennis | |
|
| |
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Drag + Drop in gen2 3.072 Fri Jul 31, 2009 12:23 pm | |
| Just too confirm that folders are not yet supported.
Although I can see why people would want them to be.
Media files in folders that are not defined in the preferences do get scraped, with nfo, fanart and backdrop created, but they will not be added to the list until such a time as it added to the preferences. | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Sat Aug 01, 2009 12:55 am | |
| - billyad2000 wrote:
- Media files in folders that are not defined in the preferences do get scraped, with nfo, fanart and backdrop created, but they will not be added to the list until such a time as it added to the preferences.
I will retry a movie later which is outside my preferences (In a "staging area"), but ideally it would show up until MC was restarted, but if there is a difficulty in making this happen then I'd be happy with that :-) | |
|
| |
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Drag + Drop in gen2 3.072 Sat Aug 01, 2009 1:04 am | |
| It is no real issue to add it, but it would be more difficult to remove it on startup if the cache is used.
Either way, on startup (without cache), or on rebuild (with cache) the movie would not be added to the list which would in my oppinion lead to confusion. | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Sat Aug 01, 2009 6:27 am | |
| - dbareis wrote:
- StormyKnight wrote:
- I was able to get this to work, but I think that the folder inwhich the movie is in must be one already defined in the preferences....
That could have been the issue, not sure now, will try again next time Dennis I have tried again (on v3.080) on an ".avi" within a subfolder that would be found in a "Media Search" and dragged it onto the list box, nothing happens other than the listbox refreshes. I have tried the drag with both left ond right mouse buttons. Thanks, Dennis | |
|
| |
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Drag + Drop in gen2 3.072 Sat Aug 01, 2009 11:44 am | |
| - dbareis wrote:
- dbareis wrote:
- StormyKnight wrote:
- I was able to get this to work, but I think that the folder inwhich the movie is in must be one already defined in the preferences....
That could have been the issue, not sure now, will try again next time Dennis I have tried again (on v3.080) on an ".avi" within a subfolder that would be found in a "Media Search" and dragged it onto the list box, nothing happens other than the listbox refreshes. I have tried the drag with both left ond right mouse buttons.
Thanks, Dennis What is the path and filename of your avi? | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Sat Aug 01, 2009 12:07 pm | |
| - billyad2000 wrote:
- dbareis wrote:
- dbareis wrote:
- StormyKnight wrote:
- I was able to get this to work, but I think that the folder inwhich the movie is in must be one already defined in the preferences....
That could have been the issue, not sure now, will try again next time Dennis I have tried again (on v3.080) on an ".avi" within a subfolder that would be found in a "Media Search" and dragged it onto the list box, nothing happens other than the listbox refreshes. I have tried the drag with both left ond right mouse buttons.
Thanks, Dennis What is the path and filename of your avi? I've tried all sorts of movie names and so I don't think that matters, the root folder is "T:\$Movies$\#UNSORTED (tmp)" | |
|
| |
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Drag + Drop in gen2 3.072 Sat Aug 01, 2009 9:55 pm | |
| - dbareis wrote:
- I've tried all sorts of movie names and so I don't think that matters, the root folder is "T:\$Movies$\#UNSORTED (tmp)"
I just tested that exact path with the filename "Alien.avi" and it scraped as expected, the nfo, tbn and fanart were created, but it wasnt added to the list since the folder is not included in the preferences. I did notice that the list updated far more frequently than expected causing an annoying flicker, this has been fixed for the next version so that the list will only update after the file has been scraped, and only then if the movie is to be added. | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Sun Aug 02, 2009 1:39 am | |
| - billyad2000 wrote:
- dbareis wrote:
- I've tried all sorts of movie names and so I don't think that matters, the root folder is "T:\$Movies$\#UNSORTED (tmp)"
I just tested that exact path with the filename "Alien.avi" and it scraped as expected, the nfo, tbn and fanart were created, but it wasnt added to the list since the folder is not included in the preferences.
I did notice that the list updated far more frequently than expected causing an annoying flicker, this has been fixed for the next version so that the list will only update after the file has been scraped, and only then if the movie is to be added. In my case "T:\$Movies$\#UNSORTED (tmp)"[/ is subfolder of moview dir in prefs. I copied .avi and renamed to "Alien.avi" in "T:\$Movies$\#UNSORTED (tmp)\Alien". I notice now that as well as flashing, I get status bar messabe about movie dropped, there for very very short time. Sometimes doesn't appear, perhaps normal "Profile:" msg redrawn too quickly over it. I have been watching for ".nfo" file creation and not the listbox. I waited 5 minutes and tried again after restarting MC. Still not there. I also tried the movie in "T:\$Movies$\#UNSORTED (tmp)" (as per your case)... The movie got picked up and the processing of that movie took about 40 seconds (after folder scan complete). Bye, Dennis | |
|
| |
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Drag + Drop in gen2 3.072 Sun Aug 02, 2009 4:12 pm | |
| I need more feedback for this issue. What is it exactly that is causing MC to fail for that particular folder. I've added the code from the drag and drop method of the listbox - Code:
-
Dim files() As String files = e.Data.GetData(DataFormats.FileDrop) Dim path As String For f = 0 To UBound(files) If IO.File.Exists(files(f)) Then ' This path is a file. Dim file As String For g = 0 To UBound(files) Try Dim skip As Boolean = False For Each item In fullmovielist If item.fullpathandfilename = files(g) Then skip = True Exit For End If Next For Each item In droppeditems If item = files(g) Then skip = True Exit For End If Next If skip = False Then droppeditems.Add(files(f)) Catch ex As Exception
End Try Next Else If IO.Directory.Exists(files(f)) Then ' This path is a directory. Dim di As New IO.DirectoryInfo(files(f)) Dim diar1 As IO.FileInfo() = di.GetFiles() Dim dra As IO.FileInfo
'list the names of all files in the specified directory For Each dra In diar1 Try Dim skip As Boolean = False For Each item In fullmovielist If item.fullpathandfilename = dra.FullName Then skip = True Exit For End If Next For Each item In droppeditems If item = dra.FullName Then skip = True Exit For End If Next If skip = False Then droppeditems.Add(dra.FullName) Catch ex As Exception
End Try Next End If End If Next If droppeditems.Count > 0 Then If Not bckgrounddroppedfiles.IsBusy Then ToolStripStatusLabel4.Visible = True 'ToolStripProgressBar4.Visible = True bckgrounddroppedfiles.RunWorkerAsync() End If End If The above includes support for folder drops, ready for the next build. For some reason the path of the file your dropping is causing it not to be added. I have not the faintest idea what the problem is. | |
|
| |
StormyKnight VIP
Posts : 556 Join date : 2008-10-08 Location : Australia
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 4:58 am | |
| Just to clarify Billy is this a summary of your question?
"T:\$Movies$\#UNSORTED (tmp)\Alien\Alien.avi" Doesn't work but "T:\$Movies$\#UNSORTED (tmp)\Alien.avi" does?
Also if I correct I see that you have a FOR NEXT LOOP (variable f) to loop through all the dropped files/folders then you check if they are files or folders, then in the files section you again loop thru all the dropped items again (variable g). Is there are reason for this?
Also you have a line DIM File as String, but I don't see any use of File.
In addition I see the double use of DIM Skip as Boolean, but I 'm not sure if this would be an issue or possible? since it shouldn't occur that someone has dropped both folders & files at the same time....
Last edited by StormyKnight on Mon Aug 03, 2009 5:58 am; edited 2 times in total | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 5:55 am | |
| - StormyKnight wrote:
"T:\$Movies$\#UNSORTED (tmp)\Alien\Alien.avi" Doesn't work but "T:\$Movies$\#UNSORTED (tmp)\Alien.avi" does?
I'm not sure he tried the first, but either way I tried both and they both fail for me, but so has any other path I've tried (including ones on other drives), but both drives are NTFS (which hopefully shouldn't matter). I have .Net 3.5 installed with the hotfix/patch that is recommended. Bye, Dennis | |
|
| |
StormyKnight VIP
Posts : 556 Join date : 2008-10-08 Location : Australia
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 6:12 am | |
| Am I right to understand then that no files can be dragged & dropped no matter where they are put or what they are called on your computer? The only thing I can think of is the leading $ sign, I think it means something special on NTFS systems.....I'm assuming you use the leading $ to list the folder at the top of the folder list, can I get you to try _ (underscore) instead? Can you let me know also if you have tried a file in c:\movies ? NTFS uses metafiles, I'm wondering if this is upsetting something in NET perhaps? http://en.wikipedia.org/wiki/NTFS#MetafilesAll these system files start with a $ sign.... Cheers | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 10:03 am | |
| - StormyKnight wrote:
- Am I right to understand then that no files can be dragged & dropped no matter where they are put or what they are called on your computer?
The only thing I can think of is the leading $ sign, I think it means something special on NTFS systems.....I'm assuming you use the leading $ to list the folder at the top of the folder list, can I get you to try _ (underscore) instead?
Can you let me know also if you have tried a file in c:\movies ?
NTFS uses metafiles, I'm wondering if this is upsetting something in NET perhaps?
http://en.wikipedia.org/wiki/NTFS#Metafiles
All these system files start with a $ sign....
Cheers I have now tried "alien.avi" in: 1. C:\movies\alien (NTFS) 2. F:\movies\alien (FAT32) Both of these fail also. As .NET and/or Media companion don't work very well on a machine which is busy (but cpu not near 100%) I have also tried this when nothing else is going on. Thanks, Dennis
Last edited by dbareis on Mon Aug 03, 2009 10:40 am; edited 1 time in total | |
|
| |
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 10:32 am | |
| - StormyKnight wrote:
- Just to clarify Billy is this a summary of your question?
"T:\$Movies$\#UNSORTED (tmp)\Alien\Alien.avi" Doesn't work but "T:\$Movies$\#UNSORTED (tmp)\Alien.avi" does?
Also if I correct I see that you have a FOR NEXT LOOP (variable f) to loop through all the dropped files/folders then you check if they are files or folders, then in the files section you again loop thru all the dropped items again (variable g). Is there are reason for this?
Also you have a line DIM File as String, but I don't see any use of File.
In addition I see the double use of DIM Skip as Boolean, but I 'm not sure if this would be an issue or possible? since it shouldn't occur that someone has dropped both folders & files at the same time.... I see what you mean about the loop, i've remeoved it, as I have the unused variable. They would not stop the program scraping "T:\$Movies$\#UNSORTED (tmp)\Alien\Alien.avi" as for the variable "skip" Since the loop is dealing with only a single dropped item at a time, then that is what it skips. It is declared only within the file branch, or for a dropped folder it is declaired within the loop that loops through the files. It works ok, i checked. | |
|
| |
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 10:53 am | |
| Never mind, I think I sussed it.
@dbareis By any chance am I right in thinking you use Foldermode to get the title of the media. There was a bug in the method I used to get this and have just fixed it.
Looking at the folder drop method I also need to add some additional checking, at the moment all media files are added, if whole folders are dropped then this would result in unwanted files getting scraped (cd2, rar files etc). I will upload a fix soon. I'm at work today, but i'll definately have it uploaded by the end of tomorrow. | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 11:25 am | |
| - billyad2000 wrote:
- Never mind, I think I sussed it.
@dbareis By any chance am I right in thinking you use Foldermode to get the title of the media. There was a bug in the method I used to get this and have just fixed it. I do have "Use Folder Names" ticked in the preferences. Looking forward to teh new version :-) Thanks, Dennis | |
|
| |
StormyKnight VIP
Posts : 556 Join date : 2008-10-08 Location : Australia
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 12:04 pm | |
| Thanks Billy, I forgot to add in that post that I didn't see those issues as a direct cause, but just as a possible future issue. I don't use folder mode so that is why I had no issues I guess... Also Billy I may have mentioned this before have you thought of having some sort of logging of what MC is doing. By default it can be turned off, but if someone is having a particular problem, then a log file may help. I know it can add a lot of code, but it can also make finding the issues a lot quicker. If for example all the preferences where listed at the top of the log file, then the use folders selection may have been the early clue. As MC gets bigger & better its going to be harder & harder to work out what combination of settings a user has set & what folder structures they are using.... Just trying to save you some diagnostic time thats all | |
|
| |
dbareis Senior Member
Posts : 223 Join date : 2008-12-08
| Subject: Re: Drag + Drop in gen2 3.072 Mon Aug 03, 2009 12:30 pm | |
| - StormyKnight wrote:
- Also Billy I may have mentioned this before have you thought of having some sort of logging of what MC is doing. By default it can be turned off, but if someone is having a particular problem, then a log file may help.
I know it can add a lot of code, but it can also make finding the issues a lot quicker. If for example all the preferences where listed at the top of the log file, then the use folders selection may have been the early clue.
As MC gets bigger & better its going to be harder & harder to work out what combination of settings a user has set & what folder structures they are using....
Just trying to save you some diagnostic time thats all Yes please... I logging often saved the developer more time and effort than it costs during development as well. Often you will be able to choose the level of logging from nothing through to "kitchen sink". Bye, Dennis | |
|
| |
Sponsored content
| Subject: Re: Drag + Drop in gen2 3.072 | |
| |
|
| |
| Drag + Drop in gen2 3.072 | |
|